|
Post by stinky666 on Nov 13, 2004 6:22:59 GMT -5
I dont fully understand this code: swg.proboards4.com/index.cgi?board=cd&action=display&n=1&thread=1099877490it changes your original logo, but you dont need a code for it, you can just go to board settings in your admin panel..... Or does it change the logo when you refresh..... Example: You haveur original log: It says on it: V1 And then the code logo: it says on it V2 And everytime you refresh the page or click on something it changes from one logo to another?
|
|
|
Post by Bradley on Nov 13, 2004 11:59:13 GMT -5
You can use it on certian boards to change the logo. For example. Lets say here on GGD we had a different logo that we wanted to display for the catagory Code Accmulation. We would put that in the footers of the boards under code accmulation with the URL ot the other image.
If you want a random one I'll make it.
|
|
|
Post by stinky666 on Nov 13, 2004 23:18:12 GMT -5
I still dont understand, but yer ok, if you will make a random one, please do......
Also, how do you make it so your avatar on refresh changes? Ive seen it done before on PBsupport, i think it is Martyn who has it like it...
|
|
|
Post by Bradley on Nov 14, 2004 14:18:08 GMT -5
I use this for the random image. Follow the directions in the comments. <?php ////////////////////////////////////////////////////////////////////// /* Matt Sims' PHP Sig Rotator V1.3 */ /* */ /* This script takes an inventory of all image files in a directory */ /* and displays one at random. All you need to do is save this code */ /* in a directory that contains your images (name it what you will, */ /* but make sure it has a ".php" extension). Then just link to this */ /* script to get your random image. */ /* */ /* I would recommend naming this file "index.php," and then you can */ /* just link to the directory itself (like I do in my example). */ /* */ /* matt_sims101@hotmail.com */ /* www.evilmerc.com */ //////////////////////////////////////////////////////////////////////
// Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache");
if ($dir = opendir(".")) { $list = buildimagearray($dir); displayrandomimage($list); }
// This function reads all the files in the current directory and adds all image files to the array $list[]
function buildimagearray($dir) { while (false !== ($file = readdir($dir))) { if (!is_dir($file) && getimagesize($file)) { $list[] = $file; } } return $list; }
// This function selects a random image, determines the mime type, opens the file for reading, // and then outputs the image
function displayrandomimage($list) { srand ((double) microtime() * 10000000); $sig = array_rand ($list);
$size = getimagesize ($list[$sig]); $fp = fopen($list[$sig], "rb");
if ($size && $fp) { header("Content-type: {$size['mime']}"); fpassthru($fp); exit; } } ?>
|
|
|
Post by stinky666 on Nov 14, 2004 14:27:12 GMT -5
I dont get it, do i save some images as a winzip and call them index.php and upload them and then place them in the code somewhere, or what?
|
|
|
Post by Bradley on Nov 14, 2004 14:53:55 GMT -5
Save that code as index.php in a empty folder on a webhost. Then upload the images that you want it to select from into the same folder. Then just link back to the index.php page.
You can use this with a logo too. It'd be easier then me writing a code... and quicker...
|
|
|
Post by stinky666 on Dec 10, 2004 22:36:42 GMT -5
I got it working..... You may aswell lock this, if need be
|
|