WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] nextgen search engine search by tags only (7 posts)

  1. roberthq
    Member
    Posted 3 years ago #

    I just got the new nextgen search engine v0.6.0 working and thanks to Alex Rabe, it actually works. Thank you Alex.

    I use nextgen gallery with a shopping cart plug-in, wp-estore, and I have duplicated products spanning into many categories. So when someone does a search with this new tool, it brings up many duplicates. I figure there must be a way to have it only search tags, that way I can add tags to only once instance and get no duplicates. I'm not a php pro, but know code. I've been searching both the "search.php" and "nggSearch.php" and have yet to find a way or a place to make this change. Does anyone know?

    Thanks for Reading
    RRG

  2. roberthq
    Member
    Posted 3 years ago #

    I found the answer though the help of Janet Taylor, her response below. Look in the nggSearch.php file for the following...

    $this->search_result = array_merge( (array) $nggdb->search_for_images( $wp->query_vars['s'] ), (array) nggTags::find_images_for_tags( $wp->query_vars['s'] , ‘ASC’ ));
    
    remove
    (array) $nggdb->search_for_images( $wp->query_vars['s'] ),
    
    so that the final line reads:
    $this->search_result = array_merge( (array) nggTags::find_images_for_tags( $wp->query_vars['s'] , ‘ASC’ ));

    best of luck, I hope it helps.
    RRG

  3. Meginoz
    Member
    Posted 3 years ago #

    Can someone please tell me where you get this NextGen Search Engine? I've seen quite a few posts about it, but can't find any reference to it either by searching WordPress.org or Google. It sounds like just what I'm looking for. Where is it????

  4. James
    Happiness Engineer
    Posted 3 years ago #

  5. Meginoz
    Member
    Posted 3 years ago #

    I looked at that one, but it sounds like it just lets you search your galleries in the admin screen to find a particular gallery - I'm wanting something that will search on the image tags and display the images that have a particular tag.

  6. Meginoz
    Member
    Posted 3 years ago #

    Oh, I think I just found it:
    http://alexrabe.de/2010/01/13/search-for-images/
    Had to google on "nggsearch.php" to find it - for some reason Alex seems to have a whole lot of stuff on his site that I never find by going straight to the site, I always just stumble across stuff by googling.

  7. bluejpro
    Member
    Posted 3 years ago #

    I got it to work too --

    everything but the pagination.

    Does anyone have the pagination working for results that are over the "number of images per page"?

Topic Closed

This topic has been closed to new replies.

About this Topic