Welcome to TalkGraphics.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Jul 2010
    Location
    Florida
    Posts
    23

    Default Random Image Rotator

    Here’s an image rotator that’s NOT Flash, javascript or jquery: multi-browser, multi-platform, lightweight. Nothing against other technologies, it’s just that we are now challenged to come up with new ways to deliver the same experience to multiple platforms. I did this on a client’s homepage where a random product image appears on each visit/refresh. Then, for grins, I overlayed a transparent background .png of their logo in different colors, and they randomly change with each visit/refresh against the product image as well.

    It’s a simple php script called ‘imagerotator’, included here. Open this .txt version in Wordpad or any HTML editor, and simply re-save it as 'imagerotator.php'. Install this in a folder called, say, “rotate” on the site. Create identically-sized versions of the graphic you want to rotate, and upload them to the same folder. The script, as written, recognizes .png, .jpg, and .gif image files.

    In Xara, put an identically-sized placeholder in the page where you want the image(s) to appear. Under “Web Properties > Placeholder > Replace with HTML Code > HTML Code (body)”, paste this:

    <img src="http://sitename.com/rotate/imagerotate.php">

    If you want to overlay a second graphic, create a second folder, i.e., “rotate2”, upload a copy of ‘imagerotator’ and the graphics files as above, make your placeholder (above the first), and use a link like this:

    <img src="http://sitename.com/rotate2/imagerotate.php">

    I like visit-driven random image rotation because it’s very subtle, and has the effect of keeping a site fresh over time, subconsciously. Okay, sometimes there’s the slightest lag while the image loads, and the site has to support PHP. Worth it. It’s simple to FTP additional images right to the file, and/or cycle images in and out of the queue. The Behaviorists tell us ‘Randomly rewarded behaviors are impossible to extinguish’. This should help keep visitors, and clients, coming back, too.
    Attached Files Attached Files

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •