• Resolved joshjohnloz

    (@joshjohnloz)


    Hello Everyone,

    I apologize that I have not searched extensively through the forum for this answer, if this topic is already here…please provide the link.

    I want to display a certain number of random images from a specific NGG gallery within page content, much as the sidebar widget displays random images. I do not want duplicates.

    For example if I have 6 divs setup as containers, what is the short code I need to insert in each div to accomplish this?

    Alternatively, if there is php function to call random (non-duplicate) images from a gallery…please provide that code snippet and I can write my own function to accomplish my goal.

    Thanks in advance for your time and attention. I will of course provide my solution to Alex so that he can integrate if he chooses.

    Thanks,

    Josh Johnloz

Viewing 8 replies - 1 through 8 (of 8 total)
  • This is the shortcode to show 5 images from gallery 1 :

    [random max="5" id="1" /]

    php code is :

    <?php echo nggShowRandomRecent('random', 5, '' , 1) ?>

    Hope this helps

    Hallelujah!! I was banging my head with something similar.. and tried all the stuff i could think about .. and didn’t fix it …

    But now it’s fixed! ??

    Thank you!

    Thread Starter joshjohnloz

    (@joshjohnloz)

    Awesome!

    This totally worked Alex.

    Not to be a bother, but it seems when I use this shortcode, the images are displayed at the default thumbnail size. Is there a way that I can define the size of each image by passing another value in the shortcode?

    I’d like to be able to use this same technique for other areas of my site, and would like the image(s) to display at a larger size.

    Thanks for getting back so quickly!

    Josh

    No this is not possible

    Thread Starter joshjohnloz

    (@joshjohnloz)

    Cool…I just wanted to ask before I dug into this. I love your plugin. Everyone who has used a blog I’ve put together says how easy it is to use and comments about how much they like the advanced features.

    I’m a bit busy in the next month or so, but I’m a QA engineer by trade. If you have any future releases that require testing, I’d be happy to bang on it before you GM. Just let me know. The best email for contacting me is [email protected].

    Thanks,

    Josh

    Thank, just have a from time to time a look on my page, I release always a beta & RC before release

    Nabil

    (@nabil_kadimi)

    @joshjohnloz

    You can set the thumbnail size in the options instead.

    Thread Starter joshjohnloz

    (@joshjohnloz)

    @nabil_kadimi

    LOL

    7 months and about 70000 lines of code later…Absolutely, but what I wanted to do was specify a different thumbnail size for a set of images elsewhere in the site. Essentially supporting a mini-gallery with images that are different from the default size. I don’t remember my exact solution, but I think I wrapped the php code Alex provided in a div and used .css to style the images and containers.

    Thanks and good luck!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: NextGEN Gallery] Short Code Question’ is closed to new replies.