Support » Plugins » nextgen search engine search by tags only

  • Resolved roberthq

    (@roberthqprintsnet)


    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter roberthq

    (@roberthqprintsnet)

    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

    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????

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    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.

    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.

    Joanne

    (@bluejpro)

    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”?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘nextgen search engine search by tags only’ is closed to new replies.