I wanted more than one random image to appear on my sidebar, which was the default.
Starting out I did no know how many, though I finally settled on having a block of 9 images. I chose to use Lightbox v1.
Firstly a couple of changes to mygallery.php:
- Find:
function myrandompic($myamount=1)
Change the 1 to a 9 (or to any number according to the number of images you want) - For some reason the original script did not include Alt & Title Text within the lightbox view of the sidebar random image.
This can be made possible by includingtitle="'.$result->alttitle.'". Scroll down until you find the comment:// return pictureand thenrel="lightbox"
This then make the line of code read:
$myhyperlink_open='<a rel="lightbox" href="'.$myurl.$result->name.'/'.$result->picturepath.'" title="'.$result->alttitle.'">';
Secondly a tweak to the css:
.myrandompic {
text-align: center;
display: inline;
}.myrandompic img {
height: 52px;
width: 52px;
}.myrandompic a img {
border: 2px solid #ffffff;
padding: 1px;
}.myrandompic a:hover img {
border: 2px solid #CC0000;
padding: 1px;
}
