kunzite (kunzite1) wrote in s2layers,
kunzite
kunzite1
s2layers

  • Music:

[theme] - [component] - [random image component]

# create vars
var string   header            = "";
var string   content           = "";
var string[] image_urls        = [];

# set urls
$image_urls[size($image_urls)] = "http://stat.livejournal.com/img/goat-normal.gif";
$image_urls[size($image_urls)] = "http://www.livejournal.com/img/goat-hover.gif";
$image_urls[size($image_urls)] = "http://www.livejournal.com/img/goat-newyear.gif";
$image_urls[size($image_urls)] = "http://www.livejournal.com/img/goat-val.gif";
$image_urls[size($image_urls)] = "http://www.livejournal.com/img/goat-irish.gif";
$image_urls[size($image_urls)] = "http://www.livejournal.com/img/goat-lights.gif";
$image_urls[size($image_urls)] = "http://www.livejournal.com/img/goat-xmas.gif";
$image_urls[size($image_urls)] = "http://stat.livejournal.com/img/frank-baahumbug.gif";
$image_urls[size($image_urls)] = "http://www.livejournal.com/img/goat-pee.gif";

# get random url
var string image_rand_url = $image_urls[rand(size($image_urls) - 1)];

# set header
$header  = "random image";

# set content
$content = """<img src="$image_rand_url" />""";

# print component
print_comp_header($header);
print $content;
print_comp_footer();
Tags: layout component
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 16 comments