Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End This code works fine….except in IE?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28828
    kloy
    Member

    I JUST EDITED THIS POST…THE CODE IN QUESTION IS DOWN ON THE 4TH THREAD
    THANKS!

    Code:

    #71366
    Rob MacKay
    Participant

    Anymore info or do we have to guess the problem? lol

    #71388
    kloy
    Member

    sorry,
    it’s a header that’s a flash animation on the homepage, and then rotates about 6 static images on all other pages.
    I’m doing this in wordpress. The flash animation works, but the static images aren’t showing up in IE. Here’s the staging link…

    http://www.newseminary.org/staging/berke14q_wrdp/

    …and the CSS

    Code:
    .headerwrapper {height: 256px; width:1000px; z-index: 10; margin:0; position: relative;}
    .headerwrapper img {border:0;}
    #74666
    kloy
    Member

    I realized that THIS is the code that IE is somehow having a problem with.
    It’s an old script. I found it on a blog post dated 2003.

    Code:
    http://photomatt.net
    Inspired by Dan Benjamin > http://hiveware.com/imagerotator.php
    Latest version always at:

    http://photomatt.net/scripts/randomimage

    */// Make this the relative path to the images, like “../img” or “random/images/”.
    // If the images are in the same directory, leave it blank.
    $folder = ”;

    // Space seperated list of extensions, you probably won’t have to change this.
    $exts = ‘jpg jpeg png gif’;

    $files = array(); $i = -1; // Initialize some variables
    if (” == $folder) $folder = ‘./’;

    $handle = opendir($folder);
    $exts = explode(‘ ‘, $exts);
    while (false !== ($file = readdir($handle))) {
    foreach($exts as $ext) { // for each extension check the extension
    if (preg_match(‘/.’.$ext.’$/i’, $file, $test)) { // faster than ereg, case insensitive
    $files[] = $file; // it’s good
    ++$i;
    }
    }
    }
    closedir($handle); // We’re not using it anymore
    mt_srand((double)microtime()*1000000); // seed for PHP < 4.2 $rand = mt_rand(0, $i); // $i was incremented as we went along header('Location: '.$folder.$files[$rand]); // Voila! ?>

    #74725
    kloy
    Member

    figured it out…nothing as complicated as php –just didn’t close a tag…duh

    #74886
    Rob MacKay
    Participant

    hhaha its always the little things :D

    Viewing 6 posts - 1 through 6 (of 6 total)
    • The forum ‘Back End’ is closed to new topics and replies.