Submitter
SUPPORT TOPIC File Information
- Submitted: Jun 06 2007 11:07 AM
- Last Updated: Jun 06 2007 11:16 AM
- File Size: 3.23KB
- Views: 2882
- Downloads: 320
Previous Versions
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!
//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!
- 250 Total Files
- 19 Total Categories
- 51 Total Authors
- 134,422 Total Downloads
- listpics Latest File
- vampke Latest Submitter
0 user(s) are online (in the past 15 minutes)
0 members, 0 guests, 0 anonymous users











