![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Nov 2002
Posts: 260
|
![]() Does anybody know of a script that will rotate links? For example, user 1 clicks on a link and takes them to tour A. user 2 clicks the link and takes them to tour B.
Thanks for any and all help. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Aug 2004
Location: South East
Posts: 1,621
|
wish i could help - i could use a good banner rotator myself.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Nov 2002
Posts: 260
|
its gotta be sorta like a banner rotater i guess. the only different is your clicking text and not image.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Too lazy to set a custom title
Join Date: Jan 2005
Posts: 2,961
|
Just find one of the endless free ad rotators and modify it to output text links instead of IMG tags
__________________
![]() ZangoCash - Turn Your Traffic Into Ca$h. $.40 Per Install - No Tier |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
![]()
__________________
hatisblack at yahoo.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
So Fucking Banned (YEA!!)
Join Date: Jun 2004
Posts: 10,963
|
Do you need it to rotate text links? Or just the actually URL?
If its the actually URL a simple php OUT script can be coded
__________________
Care about me? Who? Me! Who? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
heres a simple text or image banner rotation
Code:
<!----Main Banner Rotation-------- var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) hahahaha 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else { if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else { if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } } } var winl = (myWidth - 624) / 2; var wint = (myHeight - 600) / 2; n=new Date(); //j=n.getSeconds(); m=n.getMilliseconds(); t=n.getSeconds(); b=m*.001; j=t+b; if (j<20.3) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n"); else if (j<40.1) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n"); else if (j<59.9) document.write("<center><a href=\"http://www.yoursite.com\" target=\"_blank\"><img src=\"http://www.yoursite.com/ban.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n"); else document.write("<center><a href=\"http://www.defaultlink.com\" target=\"_blank\"><img src=\"http://yoursite.com/big.gif\" alt=\"your alt text\" height=80 width=624 border=0></a>\n"); //----Banner Rotation-----End Hide from inferior browsers----->
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Nov 2002
Posts: 260
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
the only part gfy screws up is one hahahaha..
just look in the code i posted above and find the hahahah it should be 2 equal signs next to each other like = = but right next to each other
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
wait im not finished , copy all that code into a text document and save it as banner.js
then to use it all you have to do is call the js file like this <script language="javascript" src="http://yoursite.com/banners.js"></script>
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
ok now to explain th script a bit it basically works like a timer.. on a 60 second clock..
It uses document write to make the banners ( you can use just text links or images or flash or whatever you want really. ) In the example it only rotates between 3 links , but if you wanted to add more you simply make another line and edit the seconds. Basically it gets the seconds of your time and if TIME is under 20 seconds it displays the first banner , if the time is over 20 but under 40 it displays the second banner , etc etc etc. So if you want to add another banner you need to edit the times of the other banners to.. You could also use this to run one banner 60% more than another by simply editing the gap of time it will be displayed on.. if your totally not understanding what i'm saying then.. drop your icq i'll explain it a bit better
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Jan 2005
Posts: 2,640
|
Here's a PHP solution that I use:
Put this in a separate file, add as many links as you'd like... and of course remember to escape all quotation marks within the link with a \. PHP Code:
And then put this code where you want to see the rotation. Where it says "links.php" , rename that to whatever you named the previous file. PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Jan 2005
Posts: 2,640
|
Where it says "hahaha91" it should be a left bracket.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: Vaudreuil/Montreal
Posts: 2,214
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Join Date: Aug 2002
Location: East Coast.
Posts: 2,251
|
As an alternative to Smokey's Time based one (Which is a hot idea btw) I would suggest reading/writing out via PHP to a file an integer with what was last shown
so set up an array 0,1,2,3 with the addresses to rotate echo "0" > file.txt the script: --------- read number from file, if ($readnum!=count($array)-1) { $current=$readnumber+1; } else { $current=0; } echo $array[$current] write $current to file However this breaks down under heavy traffic performance wise but ensures even distribution. I didn't include all code cause I'm eating lunch. |
![]() |
![]() ![]() ![]() ![]() ![]() |