EE: Low Random plugin

Do you need rotating images or random stuff in ExpressionEngine? Then Low Random is just what you need. This post now provides a place for support for the Low Random plugin.

Download and docs for Low Random can be found in the Software section

January 7th 2009 | Add-Ons, ExpressionEngine | 13 comments

Comments

  1. 1 Peter January 7th 2009, 12:07

    One time less to use clumsy PHP inside EE templates and tags ;)

    Thanks a bunch.

  2. 2 Stanislav Majerski January 7th 2009, 13:32

    Thank you! Yes I also have these request and used to resort to an extermnal php script. This is way more elegant.

    Thank a bunch

  3. 3 John Hoysa January 10th 2009, 01:09

    I was about to start looking at how to do this and am happy EE-Insider mentioned the plugin.

  4. 4 Lance January 16th 2009, 02:10

    I am trying to use this with an image… mine is not working … canyou give an exact example.

    thanks Lance

  5. 5 Low January 22nd 2009, 17:36

    Lance, make sure the path given in folder is correct. An example would be:

    {exp:low_random:image folder="/var/www/mysite/htdocs/images/headers/" filter="masthead"}

  6. 6 Jacques January 26th 2009, 17:05

    Perfect. Nice and simple. I was looking for something to give me a random number. Thanks! Low!

  7. 7 Corey Snipes February 19th 2009, 22:55

    This is 500% more useful than what I was just sitting down to write. I, and my clients with rotating header images, thank you! -cds

  8. 8 Taylor May 15th 2009, 11:27

    I’m trying to use this with an image and I can’t get the image to display. It’s displaying the file names, just not the actual JPG.

  9. 9 Low May 15th 2009, 11:34

    Taylor, try using an img-tag. Something like this:

    <img src="/images/{exp:low_random:file folder="/some/path/to/images/"}" alt="" />

  10. 10 Taylor May 15th 2009, 11:36

    It works! Thanks for the help.

  11. 11 Ryan J. Bonnell June 30th 2009, 00:21

    Would it be possible to modify this plugin with a feature to insert images from a directory and not have them be randomized?

    For example, imagine a directory with a few dozen photos, all nicely sequentially ordered by filename — could the plugin read all of the file names and generate the HTML code for the images tags?

    I realize what I describe is contrary to the plugin’s name and function, but this feature request would be an ideal way to quickly link to any number of images or files within a directory…

  12. 12 Mark @ Alchemy United July 21st 2009, 18:17

    Good stuff again Low. I can think of a couple nice uses for this.

    But for the example here (random headers) why not just put them in an EE weblog and then use the {exp: limit = 1, sort = random}? That should be able to do this *and* it would making adding images easy> In addition it would allow access to all the weblog functionality. For example, a holiday header could be set up to “expire” after a certain date and the next header(s) could take over again. No?

  13. 13 Low July 21st 2009, 21:17

    Hey Mark. Of course, you could, no should, use the regular weblog module for the things you describe. If, however, you just need a random image without fuss, you could use this plugin and get rid of a sql query or two while you’re at it. And if you know the names of the relevant images, you could even use the item, number or letter method and save yourself another disk IO. :)

Leave a comment



Some html (a, em, strong, etc) allowed.
Email won’t be displayed and takes care of your Gravatar.