ZenphotoCMS Forum
search - 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 (/thread-102.html)



search - bcarver - 2005-10-09

Feature request: searching of image name, album, and description.

Should involve a simple SQL query and another page or two of PHP code.




search - trisweb - 2005-10-10

Yep, I know. Definitely on the list.




search - bcarver - 2005-10-10

Awesome.

Zenphoto is far and away the best photo gallery I've seen in a long time. Nice work.




search - herve - 2006-02-10

I have implemented a quick hack for the search feature. It needs to be integrated into the whole zenphoto framework (which I am not very familiar with). Files are at http://rv101.dyndns.org/~rv101/zen

[search.php] goes to your zen root document.
This is a copy of themes/default/index.php with a search form, and it uses next_search_album() instead of next_album(). In this files, the function next_search_album() may be integrated into the file zen/template-functions.php.

[classes.php] needs merging with zen/classes.php
This adds the method searchAlbums() to the Gallery class. It is a copy of the method getAlbums(), but does a SQL query instead of scanning a directory for albums. This code needs to be secured (nasty things can be done here).

[TODO]
1-SQL query code needs to be secured
2-Code needs to be integrated with the zenphoto framework (add maybe a new context, put search.php in themes)
3-Add the navigation index on the bottom of the search results

Hope this may be useful to someone
demo is available at http://gallery.rv101.dyndns.org




search - MACscr - 2007-01-09

Is search still not part of the core at all or am I blind?




search - MACscr - 2007-01-09

obviously the code has changed a little bit since this hack, if there isnt a core search yet, anyone mind helping me get this hack to work? I think the getalbums function has changed since this hack and since the searchalbums function is based of it, it wont work. I get the following error when i get a search result:

`Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /home/........./gallery/zen/classes.php on line 926

Warning: Illegal offset type in /home/.............../gallery/zen/classes.php on line 939`

Any ideas?




search - MACscr - 2007-01-10

i got it to work, just had to update the search class and the searchAlbums function for 1.06




search - forvwv - 2007-01-26

Can you please share the code with us?
Please.

Cheers!




search - trisweb - 2007-01-27

Indeed, getAlbums has changed around in what it returns, I'm sure you figured it out.

Please, share the code! :-) I might integrate it.




search - pirod - 2007-02-19

any updated source available for the search function to implement with 1.07?

I've got also the array_flip() error...

Thanks
Pierre




search - scalpa - 2007-06-09

hello
will you put a search function in this galery, later ? Soon ?
thanks




search - DarrellD - 2007-06-09

Scalpa, I already answered your question here. The search function will not be implemented until version 2.0 comes out.