Hi,
I have a quite customised install of Zenphoto, and want to exclude one of the 2 albums I have from being searched.
The customised bit is relevant as it means I am not inserting the search form using php, so I don't think the method posted elsewhere in the forum is relevant. I guess it needs to be done in template-function.php or somewhere.
I thought of specifying in the Search function that only the album named (or with albumid) X was to be searched. Or I thought it would be possible to add a hidden function in the search saying always match album name/id.
Can either of these be done?
I would really appreciate some help with this! I have tried searching but not found any help.
Thanks in advance.
Phil
Comments
-- see follow up post below instead --
The problem I have is that I don't use printSearchForm so I can't pass it variables there. Can you point me to where else I can define the album to search? Perhaps wherever the default is set?
Lastly, do i specify the album by name or id?
Thanks very much for the quick reply.
Phil
-- thanks --
I would still appreciate any advice on how to specify which album to search however.
Thanks again,
Phil
Sorry I don't think you read my message, or it wasn't clear. I did read the link, but I am not using printSearchForm and have a static form hard coded into my pages.
I eventually found the relevant variable in the form was "inalbums". I set this in the hidden variable field and it works great. So if it helps anyone else, setting inalbums to the name of the folder as it appears on disk limits the search to that folder.
If you want to pass the variable in the url it is http://xxxx/zenphoto/index.php?p=search&words=SEARCHWORD&inalbums=ALBUMNAME
It will still be good to set it in one place if possible, perhaps a "default value" can be set somewhere?
All the best,
Phil
The best would actually to make a custom printSearchForm() function for the theme if the original form setup does not fit your needs (although it should be possible to style that via css quite exensively).
Thanks again,
Phil