• Resolved gerben-van-eijk

    (@gerben-van-eijk)


    I am working with NextGEN gallery and currently I am adapting it to my website for several different needs, like showing videos on pages and such.

    To do that I am using the plugin nextGEN custom fields, all goes well up to this point.

    Where I am stuck is the following.
    I am sending the image ID with an URL to another page and use the php GET function to get it there.
    But that’s where I get stuck, how do I use the id to call up NextGEN again in another page?
    since I want to be able to get the information from some of the custom fields I’ve added, but to do that it needs to recognize the ID first.

    So in short.
    What php code is used to recognize a NextGEN ID so I can then retrieve information connected to that image’s ID?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gerben-van-eijk

    (@gerben-van-eijk)

    Shameless bump.

    Anyone please?

    I just need the one tiny bit of PHP code which allows me to get information from NextGEN, be it the image url, caption, tags etc.. through an image ID.

    Somebody on here’s got to know it.

    Thread Starter gerben-van-eijk

    (@gerben-van-eijk)

    Nevermind, I’ve managed to dig through both plugin php files and found a solution to retrieve data from the combined plugins on a new page.

    Hi Gerben,

    On the off chance that you are still wondering about this:

    In /nggallery/lib/shortcodes.php – uncomment the two lines after:
    // do_shortcode on the_excerpt could causes several unwanted output. Uncomment it on your own risk

    Now you can use the shortcodes in your PHP code.

    So to output a gallery image based on its ID:

    $img_id = $_GET["id"];
    echo do_shortcode('[singlepic id="' . $img_id . '" w="600" h="400"]');

    Dan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin [NextGEN Gallery] Image ID’ is closed to new replies.