WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
NGG 2.0 and Image Search?? (36 posts)

  1. thebluebus
    Member
    Posted 1 year ago #

    Has anyone tried upgrading who uses the image search add on?
    The new version seems to have broken so many other things i'm expecting the worst!

    http://wordpress.org/plugins/nextgen-gallery/

  2. dimmone
    Member
    Posted 1 year ago #

    subscribe to the issue

  3. onerock
    Member
    Posted 1 year ago #

    What plugin are you looking to for?

    Nextgen Gallery Search or Nextgen Search Engine?

    If it is Nextgen Gallery Search, I have cobbled together a working version.

    I am going to attempt to get Nextgen Search Engine working, but I am very new at PHP coding.

  4. thebluebus
    Member
    Posted 1 year ago #

    this one
    http://alexrabe.de/2010/01/13/search-for-images/

  5. thebluebus
    Member
    Posted 1 year ago #

    just to confirm, as expected......doesn't work. no longer any way of searching images! :(
    i've got over 3500 photos in my gallery. no ability to search makes it unusable. It was always a bit of a hack to get working. Would love a real solution built into NGG.

  6. thebluebus
    Member
    Posted 1 year ago #

    error is:

    Fatal error: Call to undefined function nggCreateGallery() in /testwp/wp-content/plugins/nggSearch/nggSearch.php on line 64

  7. onerock
    Member
    Posted 1 year ago #

    Yes, this is what I was calling "Nextgen Search Engine" and I rely heavily on this feature as well.

    I agree that I would love to see this truly integrated into Nextgen Gallery, but I attempted to broach this idea in a comment on a blog post from the Nextgen Gallery website. It was moderated out of existence so, I am guessing that this will remain a plugin type feature. :) I have attempted email contact with Alex about help (paid) this past spring about the plugins functionality, not related to the 2.0 update. The email was unanswered, so I can only assume that Alex has abandoned this plugin feature because he is no longer associated with Nextgen Gallery.

    I believe that it will be upon the users of this plugin feature to update it to work with Nextgen Gallery 2.0 and above as an open source fork of Alex's work.

    I will be looking at retrofitting this plugin feature because it is a must have for my website. I am brand new with PHP programming so it will not be a quick turnaround, if at all, as there is a large learning curve to overcome. I may need to enlist paid resources to assist me with this, if I can't do it on my own.

    I am open to any advice or assistance from the Nextgen community at large to help with moving this project along.

    Thanks
    Scott

  8. Jean LeSheep
    Member
    Posted 1 year ago #

    Same problem here. Same Error. Even BOUGHT THE PRO VERSION 2 hours ago. I will have to return unless this image search feature gets resolved.

    It's not an option for my images not be searchable.

  9. w.bear
    Member
    Posted 1 year ago #

    food for thought:

    My "quick&dirty-solution":

    1 Goto .../nextgen-gallery/nggfunctions.php (Version 1.9.13 !!!)
    2 Copy the complete
    function nggCreateGallery($picturelist, $galleryID = false, $template = '', $images = false) {
    ...
    return $out;
    }
    3 Goto .../nggSearch/nggSearch.php
    Paste the complete function nggCreateGallery at the end of the file just before ?>
    4 At the top of the function nggCreateGallery add after line "global $nggRewrite;" this code:
    if (class_exists("nggRewrite")) $nggRewrite=new nggRewrite();

    Some CSS-Hacks amd it works like before...

    Please optimize if anyone has time - or offer a better solution... ;-)

  10. w.bear
    Member
    Posted 1 year ago #

    ah and delete the line:
    require_once (dirname (__FILE__) . '/lib/media-rss.php');

  11. thebluebus
    Member
    Posted 1 year ago #

    thanks w.bear. I'll give this a go later

  12. onerock
    Member
    Posted 1 year ago #

    Thanks w.bear, it worked. You are awesome! To optimize the code, I am looking to see if there is a way to link directly to the "Legacy" folder, where the original plugin files, are buried in NextGen Gallery 2.0.

  13. Clinton
    Member
    Posted 1 year ago #

    This fix also worked for me...thanks a ton w.bear! Now I just wish I could get the pagination working in search results. See it working on my site here:

    http://clintonwoodsphotography.com/?s=gorilla

    and the pagination issue here:

    http://clintonwoodsphotography.com/?s=mountain

  14. dimmone
    Member
    Posted 1 year ago #

    W.bear thank you very much! it worked!

  15. w.bear
    Member
    Posted 1 year ago #

    @Clinton

    Try to add this: (in the modified file nggSearch.php)

    global $nggRewrite;
    if (class_exists("nggRewrite")) $nggRewrite=new nggRewrite();

    after

    function __construct() {

    // no NextGEN Gallery, no addon
    if (!class_exists('nggGallery') )
    return;
    -->here

    and pagination should work ;-)

  16. Clinton
    Member
    Posted 1 year ago #

    w.bear to the rescue again...brilliant! Thanks so much!

  17. w.bear
    Member
    Posted 1 year ago #

    It looks like that the following code-line currently does not work for all users: (only works for a update if galImages was previously set)

    $maxElement = $ngg_options['galImages'];

    for example you can simply hard-code:

    $maxElement = 10; // 10 is the number of thumbs per page

  18. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    @thebluebus: for the record, we do plan to incorporate this kind of feature into the free version. We obviously have some other issues to sort out before we can get back to work on that kind of feature request.

    w.bear: huge thanks for jumping in with a short term fix.

  19. Clinton
    Member
    Posted 12 months ago #

    FYI...the latest update to NextGEN Gallery to 2.0.23 didn't play nicely with the above fix to NextGEN Search. Here's there error:

    Fatal error: Call to a member function id() on a non-object in
    .../wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/class.display_type_controller.php

    Going to try and revert back to 2.0.21. Photocrati, any word on when search will be baked into the solution? Thanks!

  20. w.bear
    Member
    Posted 12 months ago #

    @Clinton
    To make it work again - you can comment this out: (quick&dirty)

    // get the effect code
    /*
    if ($galleryID)
    $thumbcode = ($ngg_options['galImgBrowser']) ? '' : $picture->get_thumbcode('set_' . $galleryID);
    else
    $thumbcode = ($ngg_options['galImgBrowser']) ? '' : $picture->get_thumbcode(get_the_title());
    */

  21. dassoubarna
    Member
    Posted 4 months ago #

    I have WP 3.9.1 and NGG 2.0.61. I didn't find the function nggCreateGallery in nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/nggfunctions.php . Could you please tell me how to modify the NGG search code to work again?

  22. photocrati
    Member
    Plugin Author

    Posted 4 months ago #

    @dassoubarna - This is a very old topic and more related to the NextGEN Search plugin which is by another author. It may be much easier for you to address your concerns with that plugin author.

    Thanks!

    - Cais.

  23. onerock
    Member
    Posted 4 months ago #

    @dassoubarna

    Here is what is currently working for me. I have WP 3.9 and NGG 2.0.61.
    I reworked it a bit as version 2 plugin and created a file called in the plugins directory nggSearch2/nggSearch2.php with the following code.

    http://pastebin.com/1bUW38Rb

    Hope this helps

  24. SpritHansi
    Member
    Posted 2 months ago #

    This file is deleted.
    Can you please post it again? :-)

  25. onerock
    Member
    Posted 2 months ago #

    Here you go. Please refer to here for code snippet for integration into search.php

    http://pastebin.com/Q8KyEKqb

  26. onerock
    Member
    Posted 2 months ago #

    Neglected to enter the spam code, so it didn't post correctly with above link. :)

    Here is the new link.
    http://pastebin.com/yaZPMXpP

  27. SpritHansi
    Member
    Posted 2 months ago #

    Thanks :-)
    I've tried it, but no hits when I search.
    I just hope that the next version of NGG will have its own searchengine.....

  28. carlydibona
    Member
    Posted 2 months ago #

    I am new to all of this and am looking for the same search results as you all are. Where do we put that file that you sent the link to? http://pastebin.com/yaZPMXpP

    Also, the directions that come from http://alexrabe.de/2010/01/13/search-for-images/ are very confusing to me. Can this be put into very simple steps? Sorry I am still learning!

    Here is the link to my original question that never got a response: http://wordpress.org/support/topic/show-thumbnail-in-search-nextgen?replies=1

    Thanks!

  29. onerock
    Member
    Posted 2 months ago #

    Create a blank PHP file on your local machine called something like "nggSearch2.php" and paste this code into the file.

    Using FTP and assuming that you are using the default WordPress plugins directory, create a directory called something like "nggSearch2" in the "/wp-content/plugins/" directory. Place the file, created previously, into the new directory.

    Place this <?php if ( function_exists( 'ngg_images_results' ) ) ngg_images_results(); ?> in your themes "Search.php" file. It is WordPress best practice to make modifications to theme file by creating a child theme.

    Log into the WordPress admin panel and activate the newly created plugin called "NextGen 2.0 Search engine"

    Hopefully, I haven't missed anything. :)

  30. photocrati
    Member
    Plugin Author

    Posted 2 months ago #

    @onerock - Thanks for the follow-up responses!

    - Cais.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.