Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
|
|
splash script |
Page: 1 2 3 4 | Reply |
May 20th 2002 | #48903 Report |
Member since: Mar 18th 2001 Posts: 1452 |
But I believe with using as he said in the htacess, you won't need the frame. splash.php is designated as the index page.
|
Reply with Quote Reply |
May 20th 2002 | #48904 Report |
Member since: Jun 30th 2001 Posts: 447 |
Pank, you might also want to consider taking a look at mt_rand() and mt_srand() in the PHP manual, as it makes the results a little more random e.g. less repeating same splash on refresh.
|
Reply with Quote Reply |
May 20th 2002 | #48912 Report |
Member since: Mar 16th 2001 Posts: 2421 |
MBB I did the frame so the images would all show up. Hunko, you see the code above. If you have time just tell me what I need to change if you would be so kind ;) |
Reply with Quote Reply |
May 21st 2002 | #49088 Report |
Member since: Jun 30th 2001 Posts: 447 |
Pank, all you have to do is change all image paths in your splash HTML pages to read /splash/images/whatever.gif then create that .htaccess file and you won't need to have the frame AT ALL.
|
Reply with Quote Reply |
May 21st 2002 | #49114 Report |
Member since: Mar 20th 2001 Posts: 3367 |
I have the random splash script from SL, got it from Vertex I'll post it here when I get back home. |
Reply with Quote Reply |
May 21st 2002 | #49151 Report | ||
Member since: Mar 20th 2001 Posts: 3367 |
[php] function random_background() { global $img_array; $img_array[1] = "splashes/1/index.php"; $img_array[2] = "splashes/2/index.php"; $img_array[3] = "splashes/3/index.php"; srand ((double) microtime() * 1000000); if (!isset($random)) { global $random; $random = rand(1, count($img_array)); } // endif return $img_array[$random]; } // end function if($bg_image == "") { $bg_image = random_background(); } include "$bg_image"; // $prev = $random - 1; // if ($prev == 0) { $prev = count($img_array); // } // $next = $random + 1; // if ($next > count($img_array)) { $next = 1; // } $total = count($img_array); echo "
|