Results 1 to 6 of 6

Thread: Please suggest a script to allow the display of variable images

  1. #1
    Join Date
    Jan 2012
    Posts
    34
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Please suggest a script to allow the display of variable images

    Hi,
    I'd like to frequently vary the image displayed on a page when it is loaded - to freshen up the page. Is the best way to simply use a slide show script (such as the Swiss Army Image Slideshow - http://www.dynamicdrive.com/dynamici...army/index.htm) with the time between image changes set to a very high value and image sequence set to random? Or is there a better way?
    Thanks in anticiaption,
    Andy

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That's a pretty good way. Or you could set it to manual (manual_start=1) and give no controls (no_controls=1).

    You could have a simple random image script, but the difference in the amount of code involved is negligible when compared to the amount of bytes an image requires. So Why bother reinventing the wheel?

    Plus, with Swiss Army you get your images cached sooner. That has trade offs, but generally is a good thing.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    andywalmsley (01-26-2012)

  4. #3
    Join Date
    Jan 2012
    Posts
    34
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Hi John,
    That works well, thanks. One minor point of clarification, though. Is it possible to suppress all spacing after the image(s). I've set the 'no additional spacing' parameter to 1, but still get a single line of spacing. Can this, too, be supressed?
    Thanks,
    Andy

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That's actually:

    Code:
    no_added_linebreaks=1
    Make sure you're using that, and one to add if you're not using descriptions is:

    Code:
    no_descriptions=1
    But I was just testing all that, and one <br> tag was still creeping in.

    Getting rid of it is pretty easy, just make a container div if you don't have one already. Like where you have something like so in the body where the image appears:

    Code:
    <script type="text/javascript">
    new inter_slide(slides)
    </script>
    Make that:

    Code:
    <div id="randomimage">
    <script type="text/javascript">
    new inter_slide(slides2)
    </script>
    </div>
    Then put this stylesheet in the head of the page:

    Code:
    <style type="text/css">
    #randomimage br {
    	display: none;
    }
    </style>
    Or add its rule to an existing stylesheet for the page.

    If you want more help, please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    andywalmsley (01-28-2012)

  7. #5
    Join Date
    Jan 2012
    Posts
    34
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Thanks John, I'll try what you suggest.

  8. #6
    Join Date
    Jan 2012
    Posts
    34
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Thanks John. That works fine. Andy

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
  •