View Full Version : Question about cycling sigs...
UncleDynamite
2004-06-04, 02:48 AM
A quick question for all of you techies: despite the fact that I have just made a new sig, I want to set up a sig-rotation like the ones Corrosion and Hamma have. I think I have an idea of how it's done, but I don't know the specifics. So if anyone can help me out, I'd greatly appreciate it! Thanks.
tbdsamman
2004-06-04, 07:42 AM
I have a sig that uses a php script to randomly select an image (I don't use it here).
Rbstr
2004-06-04, 02:10 PM
and like mine!
Basicaly you need to host all the sigs, put them in the Same FTP folder.
then you need a PHP script that you point your sig to in IMG tags tha randomly pics a picture. the files is out there someware thgouth i forget were, here's what my sig's pic URL is: http://s90796260.onlinehome.us/robsig.gif/index.php
Ask corrosion he may host yours if you ask nicely like he did mine
EineBeBoP
2004-06-04, 03:27 PM
I'd host it, but I'm already hosting 3 atm. (mine, Navarone, and UV's)
I can help you set it up tho.
Sp3ctre
2004-06-14, 07:14 PM
How do you make the PHP script? Can someone cut and paste the code so I can modify it?
I'm making a website with randomised title pages, although I can't do it!!!
dscytherulez
2004-06-15, 01:11 PM
Do a search, its been posted quite a few times here.
Sp3ctre
2004-06-15, 07:02 PM
PHP Code:
<?php
//read folder
$folder=opendir("." );
$names = Array();
while ($file = readdir($folder))
$names[count($names)] = $file;
closedir($folder);
//sort file names in array
sort($names);
//remove any non-images from array
$tempvar = 0;
foreach ($names as $name)
{
$ext = strtolower(substr($name,-4));
if ($ext==".jpg"||$ext==".gif"||$ext=="jpeg"||$ext==".png" )
$names1[] = $name;
}
//random
srand ((double) microtime() * 10000000);
$rand_keys = array_rand ($names1, 2);
//random image from array
$slika = $names1[$rand_keys[0]];
//image dimensions
$dimensions = GetImageSize($slika);
header ("Location: http://staff.planetside-universe.com/squeeky/Sigs/$slika " )
?>
That is the script, if your a PHP noobie copy paste all that code into Notepad, change the
http://staff.planetside-universe.com/squeeky/Sigs/$slika to the appropriate directory and on the "Save As" drop down box
select "All Files" and save as sigs.php
Upload to the directory defined in the .php script (the part you edited) and then upload all images you want to that
directory (script supports .jpg, .gif, .png, .bmp). Then take the URL (in my case
http://staff.planetside-universe.co...igs/squeeky.php) and paste it with [img] tags in your sig. Viola!
Goodluck.
OK, I found this info after a search and just wanna ask if it can be converted to work on a normal HTML website. It says paste the URL between [img] tags, but an HTML page won't have the same img tags. I'm an HTML n00b so any help will be appreciated
FatalLight
2004-06-15, 07:09 PM
html tags for images goes <img src=(url for img)>... i think...
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.