Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
Post Set up your own signature rotation
Reply
Posted 2003-10-21, 09:50 AM
Note: The rotsig.php file in the zip is the actual file to edit and access to show the signature rotation. The rotsigs.php file is a utillity file which is needed to make rotsig.php work. You can have multiple copies of rotsig.php in the same directory using the same copy of rotsigs.php. clear.gif is displayed if you do not have any images setup for the forum accessing the script. Also, the images to be rotated need to be on the same server as the rotsig.php script, prefferably in the same directory.

I was bored yesterday, so I whipped up this PHP script that makes it easy to create a rotating signature. You need two things to use this script: a server with PHP support (no MySQL needed), and be able to convert hexadecimal to binary and back.

The first thing to do is to download the zip I attached and open up the rotsig.php file. It'll look like this:
PHP Code:
<?php

//set this to a different value for each rotating signature
$scriptid='rotsig';
require(
'rotsigs.php');

//Decide which forum this is
//first param is a mask to use, second param is string to find in the URL of the requester
//0x0001 is the default mask.  If any bits in the forum mask match bits in the image mask,
//  the image will be used in the circulation while being viewed from that location.
//==== START OF FORUM LIST
checkforum(0x0002,'zelaron.com');
checkforum(0x0004,'vbulletin.com');
checkforum(0x0004,'vbulletin.org');
checkforum(0x0008,'tournament.com');
//==== END OF FORUM LIST



while($done==0){
  switch(
$rotsig){

//The case numbers must be continuous and in order.  The first param is the image mask
// the second param is the file to use.  The third, option param is the file type.  The
// default is 'image/gif'
//==== START OF IMAGE LIST
    
case 0:checkrules(0x000F,'./wwusigsmall.gif');
    case 
1:checkrules(0x000B,'./wwusig.gif');
    case 
2:checkrules(0x000B,'./wwusig2.gif');
    case 
3:checkrules(0x0003,'./wwuceiling.jpg','image/jpeg');
//==== END OF IMAGE LIST
    
default:
      if(
$done==0){
        if(
$rotsig==0){
          
//if it appears that there are no sigs, give up
          
sendheaders();
          
readfile("./clear.gif");
          
$done=1;
        }else{
//($rotsig==0)
          //wrap arround
          
$rotsig=0;
          
$nextsig=1;
        }
//endif($rotsig==0)
      
}//endif($done==0)
  
}//endswitch($rotsig)
}//endwhile($done==0)
?>
The first thing to do is to change the script id
Code:
$scriptid='rotsig';
Replace rotsig with some personal identifier. This way, this script won't interfere with the operation of possible other copies of the same script on the same server.

Next, we're going to set up the forum masks.
Code:
checkforum(0x0002,'zelaron.com');
checkforum(0x0004,'vbulletin.com');
checkforum(0x0004,'vbulletin.org');
checkforum(0x0008,'tournament.com');
What this is is a way to use the same signature rotation for all the forums you visit, yet remove certain signatures that might break individual forums' rules from being displayed on those forums. If you don't want to mess with this, just delete all the checkforum lines. Otherwise, replace the domains I have with your own domains and give each domain a unique power of 2 starting with 2 (the numbers are in hexidecimal). Add or remove entries as needed. If you visit multiple forums with the same conditions, you can give them the same number, as I did for vbulletin.com and vbulletin.org above.

Now is the main part: The image list.
Code:
    case 0:checkrules(0x000F,'./wwusigsmall.gif');
    case 1:checkrules(0x000B,'./wwusig.gif');
    case 2:checkrules(0x000B,'./wwusig2.gif');
    case 3:checkrules(0x0003,'./wwuceiling.jpg','image/jpeg');
This is where you setup what images are included in the rotation. Each line needs to have its own case number, and the numbers need to be sequential (no gaps). The number after "checkrules(" is the mask that sets which forums to display the sig in. If you didn't set that up in the first part, just set this number to 0x0001 for everything, otherwise, setting (making the bit 1) the lowest bit (0x0001) will make the image show for forums you didn't list, setting the bit for each forum you listed will enable the image for that forum. The part after the number is the path of the image on the server. You can put another part after the file name to indicate the type of image; by default, this is 'image/gif'. You can have as many or as few of these checkrules lines as you need.

After you finish setting up the rotsig.php file, you can rename it if you like, then upload it, rotsigs.php, and clear.gif to the same directory on your server. Putting your rotsig.php file in an image tag will display the first signature in your rotation. Each time you refresh the page, it will show the next image.

======Advanced======
You can confuse bulletin board systems and people by giving your rotsig.php script a .gif extention if you use an Apache web server. Simply rename the script to a file name ending with .gif, then add lines similar to these to the .htaccess file for the directory you put the script in:
Code:
<Files rotsig.gif> 
ForceType application/x-httpd-php 
</Files>
Attached Files
File Type: zip rotsigs.zip (724 Bytes, 38 views)

Last edited by WetWired; 2004-02-28 at 05:41 PM.
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2003-10-21, 09:56 AM in reply to WetWired's post "Set up your own signature rotation"
If I toss this into my pixelmethods folder, will it work?
Old
Profile PM WWW Search
!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics
 
 
!King_Amazon!
 



 
Reply
Posted 2003-10-21, 10:00 AM in reply to WetWired's post "Set up your own signature rotation"
Probably. If you get on AIM I can help you if you need it (needs to be most recent AIM...I'm on ICQ2go)
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2003-10-21, 01:28 PM in reply to WetWired's post "Set up your own signature rotation"
I like the sig rotation. Great job. Besides, since when does ICQ2go support AIM?
"Stephen Wolfram is the creator of Mathematica and is widely regarded as the most important innovator in scientific and technical computing today." - Stephen Wolfram
Old
Profile PM WWW Search
Chruser shouldn't have fed itChruser shouldn't have fed itChruser shouldn't have fed itChruser shouldn't have fed itChruser shouldn't have fed it
 
 
Chruser
 



 
Reply
Posted 2003-10-21, 02:01 PM in reply to WetWired's post "Set up your own signature rotation"
Heh, interesting, now all I need is an arsenal of Sigs to rotate through. Great work buddy!
Old
Profile PM WWW Search
Titusfied seldom sees opportunities until they cease to beTitusfied seldom sees opportunities until they cease to beTitusfied seldom sees opportunities until they cease to beTitusfied seldom sees opportunities until they cease to be
 
 
Titusfied
 



 
Reply
Posted 2003-10-21, 03:08 PM in reply to WetWired's post "Set up your own signature rotation"
I was at school at the time, now I'm at home. Maybe I'll catch on on later.
Old
Profile PM WWW Search
!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics!King_Amazon! simplifies with no grasp of the basics
 
 
!King_Amazon!
 



 
Reply
Posted 2003-10-21, 05:23 PM in reply to WetWired's post "Set up your own signature rotation"
Great stuff

Off-Topic: There's a java version of AIM...
Old
Profile PM WWW Search
Randuin is neither ape nor machine; has so far settled for the in-between
 
 
Randuin
 



 
Reply
Posted 2003-10-28, 09:41 PM in reply to WetWired's post "Set up your own signature rotation"
Chruser said:
I like the sig rotation. Great job. Besides, since when does ICQ2go support AIM?
Since lately I remember telling ww how cool it was a while ago
Old
Profile PM WWW Search
Penguin is neither ape nor machine; has so far settled for the in-betweenPenguin is neither ape nor machine; has so far settled for the in-between
 
 
Penguin
 



 
Reply
Posted 2003-10-31, 03:23 PM in reply to WetWired's post "Set up your own signature rotation"
AHH!!! PROGRAMMING BEYOND MY INTELLECT!! IT BURNS!!!

>.<
Old
Profile PM WWW Search
OmniFalcon is neither ape nor machine; has so far settled for the in-betweenOmniFalcon is neither ape nor machine; has so far settled for the in-between
 
 
OmniFalcon
 



 
Reply
Posted 2004-02-28, 05:42 PM in reply to WetWired's post "Set up your own signature rotation"
Restored attachment...
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2004-03-09, 11:17 AM in reply to OmniFalcon's post starting "AHH!!! PROGRAMMING BEYOND MY..."
OmniFalcon said:
AHH!!! PROGRAMMING BEYOND MY INTELLECT!! IT BURNS!!!

>.<
i don't understand this either.Luckily I am going to be a video game designer and not a programmer.It is way too complicated].
Old
Profile PM WWW Search
Dan XIII is neither ape nor machine; has so far settled for the in-betweenDan XIII is neither ape nor machine; has so far settled for the in-between
 
 
Dan XIII
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:38 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.