search

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

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

Comments

  • trisweb Administrator
    Yep, I know. Definitely on the list.
  • Awesome.

    Zenphoto is far and away the best photo gallery I've seen in a long time. Nice work.
  • 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
  • Is search still not part of the core at all or am I blind?
  • 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?
  • i got it to work, just had to update the search class and the searchAlbums function for 1.06
  • Can you please share the code with us?
    Please.

    Cheers!
  • trisweb Administrator
    Indeed, getAlbums has changed around in what it returns, I'm sure you figured it out.

    Please, share the code! :-) I might integrate it.
  • any updated source available for the search function to implement with 1.07?

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

    Thanks
    Pierre
  • scalpa Member
    hello
    will you put a search function in this galery, later ? Soon ?
    thanks
  • Scalpa, I already answered your question here. The search function will not be implemented until version 2.0 comes out.
Sign In or Register to comment.