- This topic is empty.
-
AuthorPosts
-
April 23, 2010 at 11:04 pm #28828kloyMember
I JUST EDITED THIS POST…THE CODE IN QUESTION IS DOWN ON THE 4TH THREAD
THANKS!Code:Rob MacKayParticipantAnymore info or do we have to guess the problem? lol
April 24, 2010 at 9:09 am #71388kloyMembersorry,
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;}April 24, 2010 at 9:43 pm #74666kloyMemberI 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! ?>April 27, 2010 at 12:52 pm #74725kloyMemberfigured it out…nothing as complicated as php –just didn’t close a tag…duh
April 28, 2010 at 8:53 am #74886Rob MacKayParticipanthhaha its always the little things :D
AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)- The forum ‘Back End’ is closed to new topics and replies.