Greenguy's Board


Go Back   Greenguy's Board > Newbie Questions
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2007-11-17, 09:04 PM   #1
NY Jester
ICQ:147*079*406
 
NY Jester's Avatar
 
Join Date: Oct 2007
Location: Rock*ME*Hardplace
Posts: 2,996
Send a message via ICQ to NY Jester Send a message via AIM to NY Jester
I have a java script rotator..I know not the best thing but, is there a way to keep that script on my root web in a diurectory and have it called from the area that I want the banners to appear? Because just like HW's php script above you have to have each URL/banner url etc included into it.

Thanks

J-
__________________
The Sexy Side of Porn
NY Jester is offline   Reply With Quote
Old 2007-11-18, 01:00 AM   #2
SheepGuy
It's the end of the world as we know it, and I feel fine
 
SheepGuy's Avatar
 
Join Date: Jul 2006
Location: Canada
Posts: 2,527
Isn't there a way to use SSI for that? I seem to remember a buddy using includes for random banners but that was a few years ago. Never tried it but it looked pretty straightforward.
__________________
If the Environment was a bank, they would have saved it by now.
SheepGuy is offline   Reply With Quote
Old 2007-11-18, 05:16 AM   #3
Licker4U
Mean people suck, nice people swallow, are you mean or nice?
 
Licker4U's Avatar
 
Join Date: Sep 2003
Location: Lower Alabama-The Redneck Riviera
Posts: 2,377
Send a message via ICQ to Licker4U Send a message via AIM to Licker4U
I use this script and put it in a folder called "rotator". In that folder I have my ads on html pages and another folder called "ads" with copies of the same html pages. Upload everything and on the page where I want the ads to rotate I have: <!--#include virtual="/rotator/random-advert.php" -->
<?php

I don't know anything about all this and how it works, but it does. Hit refresh and the ads rotate

###################################################################
# #
# Easy Ad Rotation #
# #
# Written by Tom Armstrong #
# #
# Support Available at http://www.tomsnewbiebooster.com/ #
# #
# This script may not be modified or re-sold #
# #
###################################################################

// TEST MODE - SET TO on OR off
$test_mode = "off";


###################################################################
# #
# Don't edit anything below here :-) #
# #
###################################################################

// RESET ADS
$ads = "";

// AND PICK AN AD

// COUNT ADS

$dirhandle = opendir("ads/");
while($filename = readdir($dirhandle)) {
if (ereg ("htm", $filename)) {
$ads[]=$filename;
}
}
closedir($dirhandle);

$number_of_ads = count($ads);

if($test_mode == "on") {
print("There are <B>$number_of_ads</B> ads in the ads folder<BR>");
}

// SET THE RANDOM SEED
mt_srand(doubleval(microtime()) * 100000000);

// PICK A RANDOM NUMBER
$random_number = mt_rand(1, $number_of_ads);

if($test_mode == "on") {
print("I am going to show advert <B>$random_number</B> of <B>$number_of_ads</B><BR><BR>");
}

$array_number = $random_number -1;

include("ads/$ads[$array_number]");

?>
__________________
Submit to Girls That Squirt , Hairy Pussy Links and Best Wet Pussy
Licker4U is offline   Reply With Quote
Old 2007-11-18, 08:29 AM   #4
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
Quote:
Originally Posted by NY Jester View Post
I have a java script rotator..I know not the best thing but, is there a way to keep that script on my root web in a diurectory and have it called from the area that I want the banners to appear? Because just like HW's php script above you have to have each URL/banner url etc included into it.
Yes, you can keep all your Javascripts in a directory just for them, on the root of your site is fine. And yes, then you can call those scripts from anywhere else you like.

You can even have multiple copies of your banner rotator script in that directory, named, for example, banners-amateurs.js, banners-grannies.js and banners-teens.js -- each script with only the banners you want to use for that niche/category -- and then call just the banners you want by selecting the script that has them.

But please read my post #11 before you waste a lot of time going down that road.





.
__________________
"If you're happy and you know it, think again." -- Guru Pitka
Simon is offline   Reply With Quote
Reply


Posting 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 -4. The time now is 10:07 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc