problem loading images in subfolders

Problem loading images in subfolders, a forum discussion on Jojo CMS. Join us for more discussions on Problem loading images in subfolders on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS
glouk glouk

28 May 2008
Posts: 46

Hi,

I made a custom admin page to manage my images and flv movies with two "upload files" fields (image and flv).

I ran a test and it worked : both files were uploaded (by the way, the "manage images section does not work at all for me - images are not uploaded and all directories appear empty even with all the files i ftped into them) in a folder created by jojo inside downloads : demo_medias (the table is demo_media).

Problem is I can't access them in the front : the link "images/demo_medias/200/myimage.jpg" appears broken.

If i move my image in downloads, the link "images/200/myimage.jpg" works.

What's the problem ? I know you've done it in the documentation : images/screenshots/default/image.gif

So what is wrong ?

And why does the image manager refuse to work ?
Rick Rick

28 May 2008
Posts: 336

Did you try "images/200/demo_medias/myimage.jpg"?

'images/' triggers the image loader script, which look for a resizing command (eg 200), then uses the rest of the path to find the image file.

(edit) Oops, didn't change the link after copy-pasting
glouk glouk

28 May 2008
Posts: 46

It worked ! thanks !

Now 4 more questions :

1. how come the image manager does not work ?

2. how can i specify where files should be uploaded in the admin, fieldedit... ?

3. in the admin, links between tables are made through primary keys, but in my shot list, CONCAT("id_film"," - ","shot_name") is not very usable... how do i get "film_title" from table "demo_film" with primary key "id_film" into the list instead of "id_film" ?

4. I would like to create a plugin to handle flv files... is there a way to simply tell jojo to handle such filetypes in such way, so that my flv's are displayed in the admin ?
Harvey

Core Developer

Harvey

29 May 2008
Posts: 327

1. We have had a few users complain about the image uploader not working - it's flash based, and this has been a problem. The dev version has a HTML alternative, which works around this. However, the image manager is not fully implemented, and we have a number of plans for this.

2. If the file is tied to a 'admin/edit/whatever/' type page, then the image will be uploaded to downloads/(NAME-OF-TABLE)s/filename.jpg - so if your table is named 'product', then the upload directory is 'downloads/products/'. While this worked great early on, it's time to give the admin user more control. The main issue is with tables like 'category', and the folder becomes 'downloads/categorys/' (which is poor spelling). We plan to address this in a future release.

3. We don't have a way of capturing the data from another table, sorry.

4. I'm assuming you are talking about a nice interface for uploading FLVs in a regular admin page. If so, there are 2 good options. Firstly, you can modify the 'fileupload' field type to give a nicer user interface for *.flv - if you go down this track, we would love to integrate your changes into the core. Otherwise, you can create a new field type, which involves adding a couple of lines to api.php and creating a PHP class which extends JOJO_Field - see the jojo_gallery3 plugin for an example of a custom field type.

This can be technical, but you seem to be finding your way around the system well enough. Feel free to contact me on msn (harvey at this domain) / skype (harveykane) if you need some specific help - happy to help.
Rick Rick

29 May 2008
Posts: 336

Hmmm... I got half way through making a custom image field to allow selecting of a previously uploaded image or upload a new one... then got distracted with N+, oops.
glouk glouk

29 May 2008
Posts: 46

About #3 : i found a workaround by using the ajax tree and specifying group 1 field and table. It's even better : my shots are threaded by film.

by the way, what is "parent field" in tabledata for ? could not figure out

about #4 : more than designing a nice interface for flv upload, i was more into functionnality. i.e. providing flv player services for the front and back ends, and yes, a new or hacked fileupload field type that will include an flv player, to allow for previewing of movies. I guess this should have the form of a plugin. I think I'll use the JW FLV Media player...


Harvey

Core Developer

Harvey

29 May 2008
Posts: 327

"parent" is used for relationships such as pages - where the "parent" field of the page is a reference to another record in the same table.

#3 - well done - we love the system of creating admin interfaces in Jojo, but the docs are non-existant. If you figured this out without any help, then respect.

#4 - Great idea - Jojo is screaming for a nice way of inserting YouTube style FLVs hosted locally. Start by using the standard fileupload widget, and making a plugin for the frontend, then have a go at a nice preview functionality for the backend.
glouk glouk

29 May 2008
Posts: 46

Well you know, jojo's main weakness is documentation ;)

As for now, my main sources of information have been the tabledata and fielddata tables...

Each time i tried Ajax tree, it did not work. So i looked into tabledata for article comments, i think, and figured out what fields had to be filled...
lynchpin

27 Jun 2008
Posts: 60

Hey Glouk:
You said:
About #3 : i found a workaround by using the ajax tree and specifying group 1 field and table. It's even better : my shots are threaded by film.

I have been able to link two tables together using td_categoryfield and td_categorytable, but I really need to use the tree to link 3 tables together. Did you accomplish something like that with the group1 field?
Harvey

Core Developer

Harvey

27 Jun 2008
Posts: 327

I don't think it's currently possible to have the menus automatically created based on 3 tables.

You can have 3 table relationships for a field using the many-to-many field type - an example of this is the 'groups' field on the 'edit users' page.

If you give me a more specific description of what you are trying to do, I can advise further.

You may have noticed the 'group2' option in the tabledata - this was designed for a certain type of 3 table relationship, but we never found a need for it, so the implementation of this hasn't been done. But if someone can prove a need for it, we can implement.
lynchpin

27 Jun 2008
Posts: 60

ok...this gets kinda complicated so feel free to walk away, but I think you will find it interesting anway.
We have created a Guitar Wrap widget in Flex. I then setup the database to be editable in Jojo for the widget. It has 4 applicable tables:
Guitar Brands
Guitar Types
Guitar Models
Color

Each brand has a set of types, and each type has a set of models and each model has a color.
The problem is that when they are adding models, they can't see which brand it is and they dont know which brand they are adding too (there are some types with the same name, but different brands)
You created an account on the site already. I gave you access to the widget editor if you want to take a look. There is also a link to the widget front end in there as we are building it (not ready for launch yet)
http://www.axewraps.com/admin/
I probably did terrible at explaining it, but if you check it out, I think you will understand.

Again, I don't expect you to spend a lot of time on this or solve all my problems, but like you said, it may be a beneficial feature to you or others.
I am mostly curious at this point, and not really desperate for a solution.

Also, we are in the process of compiling the database and this is actual content so be careful if you are messing around with records.

Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.