Quote from: the_killer23 at Sep 03, 2010, 11:54 AM
Version 1.0 has just been tested for Revo and released as a transport package. Have fun.
Hi Killer

Little nice snippet.
I downloaded RandomChunk from Revo package management, and I got version for Evo.
This code:
//Salvatore Sodano
//http://salscode.com/index.php?id=50
//[!RandomChunk? &chunks=`chunk1, chunk2`!]
//Randomly generates a chunk from a comma delineated list of chunks.
$chunks = str_ireplace(" ","",$chunks);
$charray = explode(",",$chunks);
$count = count($charray) - 1;
$rand = rand(0,$count);
$result = $charray[$rand];
echo "{{".$result."}}";
Of course not a problem, because very little difference between the Revo and Evo code. By the way I added a little extra. The time interval for chunk changes (optional).
//Salvatore Sodano
//http://salscode.com/index.php?id=50
//Randomly generates a chunk from a comma delineated list of chunks.
//Optional parameter chunk changes interval in secounds.
//[[!RandomChunk? &chunks=`chunk1, chunk2` &change=`30`]]
isset($change) ? srand(ceil(time()/$change)) : '' ;
$chunks = str_ireplace(" ","",$chunks);
$charray = explode(",",$chunks);
$count = count($charray) - 1;
$rand = rand(0,$count);
$result = $charray[$rand];
return "[[$".$result."]]";