Jump to content


Submitter

SUPPORT TOPIC File Information

  • Submitted: Jun 06 2007 11:07 AM
  • Last Updated: Jun 06 2007 11:16 AM
  • File Size: 3.23K
  • Views: 2629
  • Downloads: 320

Previous Versions

  • 06 Jun 2007 Download etogal_randomImage1.0

Download etogal_randomImage1.1

- - - - -



//randomEtogalImage V1.1
//Author: Cris D. 6/6/07
//Use to return a single random image from any range of etogal galleries
//This snippet chooses a random gallery from a list you give, then a random image from the gallery
//You can configure the following: Return JUST thumbnails, NO thumbnails, or Either
//Adapted from on MikeFairbrothers RandomImage 2.0

############Set the snippet up ################################

$gals= array('65','66','67','68','69','70');//list all etogal galleries to select from

##########Set this parameter to choose what size picture to return###########
//use in the snippet call eg. [!randomEtogalImage?tn=2!]
//0 for thumbs MAY be returned (or large),
//1 for JUST thumbs (no large),
//2 for NO thumbs (just large).
$tn=isset($tn) ? $tn:0;//default is to return both thumbs and large images

The output takes the form of <img src="$image_name" . $imgSize (from gallery) /> and can therefore be easily incorporated in other html code inside a page or template.

See in action here.
OOps (I forgot to take out the testing syntax: My Bad). Now ver 1.1!






  • 248 Total Files
  • 19 Total Categories
  • 50 Total Authors
  • 131,652 Total Downloads
  • TripTracker Gallery Latest File
  • Dean Latest Submitter