Quote from: smashingred at Nov 18, 2007, 08:44 AM
The random image looks to be done with MaxiGallery. It is fairly easy to do. I think that you should try something else as it would be overkill to try to refactor MG to do just quotes.
Yes, I used Maxigallery for the random images. The front page call is:
[!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &gal_query_ids=`99` &order_by=`random` &limit=`1`!]
There are multiple galleries and each is managed through a separate page that remains hidden unless the web user is signed in. The call on the page for the front page images is:
[!MaxiGallery? &manage_gallery=`99` &max_pic_size=`640` &max_thumb_size=`150` &thumb_use_dropshadow=`1`!]
EDIT: I almost forgot. The banners on the top in the header area are also random. They use a custom chunk, snippet and placeholders that were designed using this as the starting point:
<?php
/*****
Random banners
(C) 2007 NZ's Finest
www.nzsfinest.com
HOW TO USE -
Edit the information below (http://www.website.com,image.png, etc).
The format is <url>,<image>
Or add in new banners by copying the text
"http://www.website.com,image.png",
and pasting it on a new line above
"http://www.website.com,image.png",
Then include it on your website by using the code:
include("banners.php");
*****/
$banners = array(
"http://www.website.com,image.png",
"http://www.example.com,images/banner.jpg",
);
/*****
ATTENTION -
DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
*****/
$randnum = rand(0, count($banners) - 1); // Choose a random banner
$exploded = explode(",", $banners[$randnum]); // Separate chosen banner by ,
$url = $exploded[0]; // Grab the URL for the banner
$img = $exploded[1]; // Grab the image for the banner
// Display the banner
echo "<a href=\"$url\">";
echo "<img src=\"$img\" border=\"0\" />";
echo "</a>";
?>