![]() |
|
Search into an album - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Search into an album (/thread-5146.html) |
Search into an album - painful - 2009-05-06 I've search into forum several times without find a solution, so i'm gonna explain what i'm looking for. I'd like to do a search into a certain album, for example now if you search "photo" you'll find all the photos of all the albums that have the word "photo" in their meta. i'd like to have the possibility to do a search of "photo" into just an album, could anybody help me out? Search into an album - acrylian - 2009-05-06 The nightly build has the ability to do that but you have to set that specifially with a parameter for the Search into an album - painful - 2009-05-07 i've search into the nightly build the file, but it seems like the function printSearchForm looks like the previous one, so no differents i saw in it... Search into an album - acrylian - 2009-05-07 Then compare and read the documentation before the function: Old 1.2.4: Search into an album - painful - 2009-05-07 Allright i got it, i've replaced the function code with the new one...now how can i do the search into a specific album? Thanks for the patient... Search into an album - acrylian - 2009-05-07 By setting the parameter Search into an album - painful - 2009-05-07 shame...i thought it was possible just enter into the album for example "flowers", and do the search there with "rose" and display all the photos with "rose" in the meta tag... Search into an album - acrylian - 2009-05-07 But you can do that: Add the search form to album.php if not already there (as on most themes) and then set the parameter with something like Search into an album - painful - 2009-05-07 im sorry im not a developer :-) $album_list = array($_zp_current_album->name); just below the function function printSearchForm() But it doesn't work...so i'm asking where i have to add the array Thanks again for the fast reply... Search into an album - acrylian - 2009-05-07 You of course need to pass the parameter to the function. After your $album_list definition you need Please read also this: http://www.zenphoto.org/2008/04/how-to-read-the-zenphoto-functions-guide/ Search into an album - painful - 2009-05-07 sorry i don't understand...my function is: ` function printSearchForm($prevtext=NULL, $id='search', $buttonSource=NULL, $buttontext='', $iconsource=NULL, $query_fields=NULL, $album_list=NULL) { $album_list = array($_zp_current_album->name);
Search into an album - acrylian - 2009-05-07 All you need to add is the line I told above. I really recommend that you read our theming tutorial and get a little more familiar with how Zenphoto themes work before trying anything further. Search into an album - painful - 2009-05-07 obviously i've read your link...but i still don't understand where add the line... Search into an album - acrylian - 2009-05-07 Add it to your theme's album.php and/or image.php. If you don't understand what I am saying please really read the theming tutorial. Of course it is assumed that you have a little knowledge of html and css in general. Search into an album - painful - 2009-05-07 I did but it got the same result... while in my template-function.php i have: function printSearchForm($prevtext=NULL, $id='search', $buttonSource=NULL, $buttontext='', $iconsource=NULL, $query_fields=NULL, $album_list =NULL) am i in the right way? Search into an album - acrylian - 2009-05-07 It does work for me. I assume your really have updated to the nightly build, otherwise it of course will not work. Additionally you also have to set the search fields on the options or via the dropdown correctly. |