Move images to specific image folder?

Phoca Gallery - image gallery extension
hjdt
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 09 Aug 2010, 18:50

Move images to specific image folder?

Post by hjdt »

Hi all,

I'm experimenting with Phoca galleries at the moment to see if it works for my site. There's something I don't understand: if I upload a picture (or multiple pics) with the images menu I can select a category for the item(s) I want to upload and the pics are placed in that category. If I look at the filename that is displayed in the Images menu I see that all files are placed in the same directory (mywebsite/phocagallery) wether or not I uploaded them in a different category. For now this seems OK but if I want to upload hundreds of pictures and they are all placed in the same directory this would become a big mess. It's also very messy that the images I uploaded during earlier uploads are still visible when I open the "Multi Add" menu again.

So, two questions I have:
1- Would it be possible to upload or move the images I uploaded to a specific category folder using Phocagallery
2 - Is it possible to delete the files from the "Multiple Add" menu without deleting them from my website


Best regards,
Michel
imperialWicket
Phoca Enthusiast
Phoca Enthusiast
Posts: 78
Joined: 28 Feb 2010, 15:39

Re: Move images to specific image folder?

Post by imperialWicket »

It is important to note the distinction between the files on your server and the Phoca Images/Categories in your database. Your Joomla site references the database to retrieve details about Phoca Images that must display and the categories to which they belong. The Joomla install has very little knowledge of the actual files and the directory structure to which they belong. The files on your server are located wherever you upload them. This does not indicate any association with a particular category. Another way to word this is that there is no relationship between FTP folders and categories.

That said - it is probably a good idea to organize your images into folders for organizational and administrative convenience.

So -

1. The Phoca Gallery Admin section for Multiple Add includes two functionalities - One is a simple, upload-only, FTP client. The Second is a Multiple Add section that generates Phoca Image (database) details for the files that you select (ie, loading the location of the image, the category you choose, creating the necessary thumbnails).

It is possible to upload to a particular folder, simply create the folder, navigate to it, and upload the images. Note that if you move the files on your server, the Phoca Gallery database details for those files will no longer be accurate, and you will see broken image links on your site. This is just like creating a shortcut to a file in Windows, and then moving the target file to a new location. The shortcut does not automatically update. In this case, you must either manually correct the Phoca Image details in the database, or delete the Phoca Image (the database record) using the Phoca Gallery Admin utilities and then regenerate the necessary Phoca Images.

2. You can not delete actual files from your server using the Phoca Gallery Admin section, use an FTP client, it is faster and easier.

I find that it is easier to upload all images via an FTP client (something like FileZilla or CyberDuck) to the folder that makes the most organizational sense. After the uploads are completed, go to the multiple add section, and select all of the appropriate images and add them to a category. You can accomplish this same technique within the Multiple Add interface, but you lose the ability to delete and move files once uploaded.

Hope this helps; you should continue your Phoca Gallery investigation and learn more about the component, it is a great suite of extensions.


Jan - has anyone requested moving the uploader to its own section under Phoca Gallery Images, so that uploading is more obviously distinguished from the Multiple Add interface?
hjdt
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 09 Aug 2010, 18:50

Re: Move images to specific image folder?

Post by hjdt »

Thank you for your lenghty answer. You made it perfectly clear what to do. I think you may have done this before!! And as of your last sentence: I surely will 'cause I'm sure there are still plenty of things to explore for men, both in website building as well as in the phoca galleries component.

Best regards,
Michel
jestick
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 12 Aug 2010, 15:11

Re: Move images to specific image folder?

Post by jestick »

The poster asked the question that I wanted to ask, I don't think the question was understood so I will ask again more clearly.
After uploading files using "multiple add" the uploaded files continue to be listed in future sessions when "Multiple add" is used.

I have tried selecting these files and assigning them to a category, but the files remain listed under "Multiple Add".
This is confusing since it is hard to see which files have just been uploaded, and which are there from previous sessions.

Is there a way to clear the records that appear in this list without removing the actual images. I need to do this because I want site owners to do their own uploads. With all these confusing "Old files" in the list, I cannot pass it over in that condition.

Is there a SQL script of other method for clearing the records of the uploaded files from the Multiple Add list?
webansvarlig
Phoca Enthusiast
Phoca Enthusiast
Posts: 53
Joined: 01 Feb 2008, 03:09

Re: Move images to specific image folder?

Post by webansvarlig »

The files listed on, when doing a multiple add, is the files on the server (FTP).

When you choose the files you want to add to a specific category, then phoca gallery will create thumbnails to the selected images and point them to the category.

You just need to keep track on what images you have created categories to.

In my case. I allways assign them to category, before I forget it.
jestick
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 12 Aug 2010, 15:11

Re: Move images to specific image folder?

Post by jestick »

Thank for you reply but you totally missed the point.
I assigned the images to categories using "Multiple Add" already. As I understand it, the files should then be cleared from the "Multiple Add" list. But the files remain listed there. New files that I upload and assign to categories are cleared as expected. But some files are never cleared, and I want to remove them from this list. I don't want to delete the files, I just don't want them cluttering up the "Multiple Add" List
imperialWicket
Phoca Enthusiast
Phoca Enthusiast
Posts: 78
Joined: 28 Feb 2010, 15:39

Re: Move images to specific image folder?

Post by imperialWicket »

From Components -> Phoca Gallery -> Images:

Click Multiple Add in the top toolbar.

If your admin interface is using English, there is a "Details" section. Within this section is a listing of "Filenames". This is simply a directory listing with a default base directory of JOOMLA_INSTALL/images/phocagallery/.

When you select a number of images, choose a category, then click the "Save" button in the toolbar, it doesn't move the image files anywhere. It simply makes a note in the database that those images are available in a particular category. If you subsequently move those images, the database will have inaccurate information, and if those categories are displaying on your site, they will display broken links.

If I understand you correctly, the "Multiple Add List" to which you refer is not a queue or a list of images to be added - rather it is a list of files (image files) that exist on your server, and are available to display in categories. Also, you can add the same image to multiple categories without having to upload it multiple times, this is a benefit to organizing the uploader in this way.

If you don't want the root of the phocagallery directory to be cluttered with image files. Before you upload files use the "Create Folder" button to generate a new folder for organization. Then in the details window, select that folder. Now upload your images, and they will upload into that folder. An alternative technique, as I mentioned in my earlier post, is to simply use an FTP client to upload images into the phocagallery directory, and whatever sub-directories you deem appropriate. After the images are on the server, they will display in the "Details" section, and you can add them to whatever categories you like.

I hope this helps.
hjdt
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 09 Aug 2010, 18:50

Re: Move images to specific image folder?

Post by hjdt »

If you don't want the root of the phocagallery directory to be cluttered with image files. Before you upload files use the "Create Folder" button to generate a new folder for organization. Then in the details window, select that folder. Now upload your images, and they will upload into that folder.
I will take this part of the explanation you gave in your latest post, When I try to repeat this the way I think you mean it, the photoas are placed in the phocagallery root folder and not in the category folder as you say. To rule out any errors on my part this is what I do, step by step:

- I go to the categories part of the menu
- Click "New" and create a folder that I give the title "Landscapes". Then I hit "Save"
-The folder shows up in my Categories menu
-I go to the Images menu
-In the lower part of the window I go to the "Folder" section and type Landscapes, then I hit "Create Folder"
-Then I go to the Java upload and select the images in the folder they are in on my PC.
-The files are now uploaded but not yet visible in the "Images" menu
-When I go to the "Images" menu I hit "Multiple Add"and select the files I just oplaoded. Before I hit the "Upload" button
I select "Landscapes" for category and also check the "Landscapes" tickbox in the "Filename" section.

Hitting the save button results in the files having a thumbnail created and processed. Now when I take a look at
the images menu I do see the listed files but they are NOT in the Landscapes folder but still in the root folder of the phocagallery program. I wanted to ad a screendump of how the images menu looks like after the afore mentioned workflow but it seems this is impossible so I posted it here: http://www.pbase.com/brenda_michel/image/127444442

Please tell me if this is what you meant and what (possibly) I did wrong.

Best regards,
Michel
imperialWicket
Phoca Enthusiast
Phoca Enthusiast
Posts: 78
Joined: 28 Feb 2010, 15:39

Re: Move images to specific image folder?

Post by imperialWicket »

Thanks for your detailed steps, they are extremely helpful. My instructions did lack some clarity, sorry about that. Before I provide additional details, I want to reiterate something I mentioned in my first post on this thread:
It is important to note the distinction between the files on your server and the Phoca Images/Categories in your database.
Here is the full exercise, step by step:
1. Select Components -> Phoca Gallery -> Images
2. Select Multiple Add
3. At the bottom of this page there is a "Folder" section with a "Create Folder" button - use this to create a folder.
4. Notice the page refreshes and the folder you just created appears in your list of "Filenames" in the "Details" area of the page.
5. Select that folder within the "Details" area.
6. Notice the list of "Filenames" in the "Details" area is now empty. This is because you are looking at the contents of the folder you just created.
7. Now that you are in the folder where you want to store your image files, use the uploader (whichever you prefer) to upload images files to that folder.
-------
NOTE: Everything up to step 7 can be accomplished with an FTP client, directly connecting to your server.
-------
8. After uploading image files, use the "Details" section of the page to select a Category with which to associate the image files. Use the image file checkboxes to determine which images to associate with the selected Category. Then click the "Save" button in the toolbar (top right section of the screen).
--------
NOTE: Step 8 initiates the generation of thumbnail images (unless you have thumbnail generation disabled), and creates database records that detail the Phoca Gallery Image. The database indicates where the image file is located on the server, title, alias, and many other attributes. This action does NOT copy the original file to a new location on your server.


After completing, you should have some number of Phoca Gallery Images associated with a Phoca Gallery Category that you selected. The image files should also be stored in a folder that you created, instead of in the root level of the phocagallery directory.

I would also note that it isn't a terrible idea to create matching folders and Phoca Gallery Categories (your "Landscapes" for example), but this can lead to confusion where the distinction between the directories/files on your server and the Phoca Gallery Categories/Images becomes blurred.

The above is all in the Multiple Add section. Now for the main Phoca Gallery Images screen (pictured in your screenshot):

As I said, the Phoca Gallery Categories are not Folders, your Phoca Gallery Images are all just database records, hierarchically at the same level. In order to see meaningful lists of Phoca Gallery Images on the main Images screen, use either the Filter on the top left (to search by title), or use the Category/State drop down options at the top right. These will allow you to view only the Phoca Gallery Images that belong to the criteria you select.

Hope this helps the admin area to be a little bit more clear.
rafaelcostaweb
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 25 May 2011, 19:26

Re: Move images to specific image folder?

Post by rafaelcostaweb »

You can also manage the folders from Joomla's media manager. (delete, create folders). However I don't know if problems can arise from doing that.

Rafael
Post Reply