Author Topic: Snippet: Random Hoverbox  (Read 2781 times)

Offline BlackBird

  • Posts: 2573
Snippet: Random Hoverbox
« on: August 27, 2010, 01:41:00 PM »
I have packed a simple snippet to show some random images from a folder of your choice called "Random Hoverbox".

Current version1.01


Just add the following call to your template:

Code: [Select]

This uses "media" as the base directory and shows 4 random images from that dir. (Only *.jpg at the moment.)

You may give a directory and a number of images to show:

Code: [Select]
random_hoverbox( '/media/folder', 5 );

To change the appearance, edit the frontend.css.


The script uses the file name of the image file to create the content of the alt attribute. So just name your image files like the titles you wish to use.

   Filename -> My_holidays_in_Cana da.jpg
   ALT -> "My holidays in Canada"


* The valid suffixes are now configured in the include.php. Allowed suffixes: *.jpg, *.png, *.gif
* I set the z-index for the preview image to 1000 (needed this for a page using Superfish menu)
« Last Edit: August 31, 2010, 10:52:24 AM by BlackBird »