Member
Member
bcarver   2005-10-09, 21:56
#1

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

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

Developer
Developer
trisweb   2005-10-10, 06:11
#2

Yep, I know. Definitely on the list.

Member
Member
bcarver   2005-10-10, 18:36
#3

Awesome.

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

Member
Member
herve   2006-02-10, 21:31
#4

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

Member
Member
MACscr   2007-01-09, 12:25
#5

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

Member
Member
MACscr   2007-01-09, 13:50
#6

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?

Member
Member
MACscr   2007-01-10, 04:14
#7

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

Junior Member
Junior Member
forvwv   2007-01-26, 23:15
#8

Can you please share the code with us?
Please.

Cheers!

Developer
Developer
trisweb   2007-01-27, 03:09
#9

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

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

Member
Member
pirod   2007-02-19, 10:44
#10

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

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

Thanks
Pierre

Member
Member
scalpa   2007-06-09, 07:20
#11

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

Member
Member
DarrellD   2007-06-09, 15:30
#12

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

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.