Make sure you have a working Joomla 1.5.x (I'm using 1.5.21) installation and the Phoca Gallery Component (I'm using 2.7.5) and Phoca Gallery Search Plugin (I'm using 2.7.1) are installed and enabled.
Enable SEF - this is tricky because your Phoca Gallery Images do not exist in proper Joomla categories, so Joomla does not really know how to build the SEF URL (Joomla uses the category alias to build the SEF URL). The way around this is to generate a phony menu item that will serve as a shell for housing all of your Phoca Gallery content.
- 1. Go to Menus - Menu Manager.
- 2. Select "New" from the Menu Manager toolbar.
- 3. Let's call the menu "hidden" (Unique Name = hidden, Title = hidden).
- 4. Go to Extensions - Module Manager.
- 5. Select "New" from the Module Manager toolbar.
- 6. Select Module Type "Menu", then "Next" from the Module: [New] toolbar.
- 7. Provide a Title - Something like, "PhocaGallery Utility" will do.
- 8. Set "Enabled" to "No", and choose the "Menu Name" option for "hidden" - the menu item we just created.
- 9. Go to Menus - hidden.
- 10. Select "New" from the Menu Item Manager: [hidden] toolbar.
- 11. Choose Menu Item Type Internal Link - Phoca Gallery - All Categories - Phoca Gallery Category List Layout
- 12. Provide a meaningful title, this alias will be in present in your SEF URLs to categories, I usually use "gallery" or "photos" ("gallery" is hard-coded in the downloadable files).
Now, enable SEF URLs and configure a Phoca Gallery instance. In order to get what I am dubbing "Better Searching" (support for any, exact, all options; thumbnail with modal popup; and categories that load to the correct location), you must replace two files:
Files available for download here: phocaGallerySearchMods
The phocagallery.php file is accessed when users initiate a search, and handles retrieving a search result dataset for the provided search criteria. It then passes the search result dataset to the Search Component, which uses default_results.php to display the results. The updated phocagallery.php file pulls slightly different data from the Phoca Gallery database tables, and then the updated default_results.php file checks to see if that data is included in the resultset. If default_results.php finds the Phoca-Gallery-specific data, it assumes the search result is an image and loads a different search result template.
Note that the files here will require modification to work properly if:
1. SEF is disabled.
2. You upload images to a custom directory (not images/phocagallery/).
3. You named the hidden menu item something other than "gallery"
This is working in a basic Joomla 1.5.21 install in Apache on XP, Win7, and Linux for me. I don't think I skipped any steps or left anything out, but if you encounter issues, hit the comments with any questions - it is entirely possible that I glossed over something that deserved more attention. If you are looking for a lot of help, or need heavy customization, don't forget about the Phoca Forums.