(2014-12-12, 19:24:30)Lars Wrote: Use: DynPagesIt does not work entirely. the image url shows up like this: http://data/uploads/raimg1/wm12.jpg (folder name of first group is raimg1)
with this snippet:
<?php
global $args;
$dir = 'data/uploads/'.$args[0];
$files1 = scandir($dir);
$max = count($files1)-1;
$a=get_site_url(false);
$p=explode("/",$a);
$dir="/".$p[3]."/".$dir;
$a=rand(2,$max);
echo "<img src='".$dir."".$files1[$a]."' width='100%'>"
?>
Call it with: {% rndpic slider/3/ %} assumes of course that you name the component "rndpic" and your pic-folder "slider/3/"
You can put your images in a folder. That's all.
If you need a shadowbox you can add this very easy.
The snippets read any picture in a given folder, put them in an array and select a random pic for display.
So basicly the site url is not present in the url.