View Full Version : Adding a Rotating Banner/Ad to VBAdvanced CMPS
This will add an advertisement to all your VBAdvanced CMPS pages.
So here you go:
In the style manager edit the template "adv_portal"
Find
<body>
Replace with
<body onLoad="ranImage();window.status='YOUR SITES NAME';">
Save and Close
Add a new template named "adv_portal_advertisement"
Copy this into it and update it to link to your images and URLS:
<!-----Banner ads-------->
<SCRIPT LANGUAGE="JavaScript">
pix=new Array("http://www.YOUR-IMAGE-LINK-1","http://www.YOUR-IMAGE-LINK-2","http://www.YOUR-IMAGE-LINK-3") ;
links=new Array("http://www.URL-FOR-IMAGE-1","http://www.URL-FOR-IMAGE-2","http://www.URL-FOR-IMAGE-3") ;
imCt=pix.length;
function ranImage(){
ran=Math.floor(Math.random()*imCt);
document.images["image"].src=pix[ran];
document.getElementById("IMFbanner") .href=links[ran];
}
</script>
<!-----end ads----------->
<!----- ads----------->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]"
class="tborder" width="100%">
<tr>
<td class="tcat"><b><DIV ALIGN=CENTER>Advertisement</b></div></td>
</tr>
<tr>
<td class="alt1" align="center"><BR>
<a href="http://www.URL-FOR-IMAGE-1" id="IMFbanner" target="_blank"><img src="http://www.YOUR-IMAGE-LINK-1" name="image" border="0"></a>
<BR>
</td>
</tr>
</table>
<br />
<!-----end ads----------->
Add Module in VBA CMPs
Title: Advertisement
Template to include: advertisement
Active: Yes
you MUST tick YES to updating all pages or you will get an error.
CSS59
11-04-2004, 12:22 PM
do you have screen shots or a link please?
MonkeyBoy
11-06-2004, 05:31 PM
What if you don't have an adv_portal?
Do you just create one??
Blaminator
11-06-2004, 07:54 PM
What if you don't have an adv_portal?
Do you just create one??
You have one if you installed vbacmps.
I added a pic but admin didn't approve it.. ;)
Main page near the center/bottom:
http://www.goinfantry.com
Dirty Harry
11-13-2004, 02:23 PM
I'm unable to get the banners to Rotate, they show up as 2 different banners.
Could somebody post their layout that has more than one banner, so I can see what I'm doing wrong?
Thanks in advance
The top "<!-----Banner ads-------->" part of the script contains the multiple images, the bottom part "<!----- ads----------->" only has one image. the "ID" has to be the same and then the script will know to rotate that image.
So take your main image place it as the first pic in the top, add all your others after. Then place it a as the one in the bottom part. everything should work. :)
Dirty Harry;
If you want to post your URLs and URLS to images I'll write the code for you... ;)
Dirty Harry
11-14-2004, 03:11 PM
Thank You, the explanation was enough to help me get it going :o)
Now I'm tring to modify it, so it will open an e-mail with a predetermined subject line, as well as a popup text on mouseover.
Glad it worked for you. :)
attroll
12-04-2004, 12:28 AM
I had the rotating adds working for a brief bit. But now it does not work again. Here is the code I am using in my adv_portal_advertisement in CMPS. Can someone look at it and see if they see anythign wrong. This is driving me crazy. I did change the body tag in my adv_portal aslo.
<!-----Banner ads-------->
<SCRIPT LANGUAGE="JavaScript">
pix=new Array("http://www.whiteblaze.net/images/WB-patchsmall.gif","http://www.whiteblaze.net/images/WB-shirtsmall.gif");
links=new Array
("http://www.whiteblaze.net/forum/wbshirt.php","http://www.whiteblaze.net/forum/wbshirt.php");
imCt=pix.length;
function ranImage(){
ran=Math.floor(Math.random()*imCt);
document.images["image"].src=pix[ran];
document.getElementById("IMFbanner") .href=links[ran];
}
</script>
<!-----end ads----------->
<!----- ads----------->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet]$mods[title]</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<center>
<a href="http://www.whiteblaze.net/forum/wbshirt.php" id="IMFbanner" target="_blank"><img src="http://www.whiteblaze.net/logos/WB-smaller.gif" name="image" border="0"></a>
</center>
</td>
</tr>
</table>
<br />
<!-----end ads----------->
CSS59
12-13-2004, 12:29 AM
so will is rotate the ads every time you refresh the page?
also I dont want any border around the banner or gradiant on top. What code do I eliminate?
attroll
12-13-2004, 11:50 AM
Another thing I noticed after I installed this is that the adds do rotate with Mozilla but not with IE. Did I do something wrong?
bigcurt
12-24-2004, 12:48 AM
anyone have just a quick shot of this hack? I really want it but I am slow and hate to install it and not like it lol.
Thanks
big curt
burley
12-28-2004, 07:28 AM
great hack, but got a question.
each time you load the page, it shows the same banner, and than (quite quickly) shows different one, after which the banners wont rotate any more. Except of course if you reload the page, then it starts with the same banner again, but changes to another one..
Why is this? And can it be made that it randomly chooses the first banner and changes it only after a certain period of time?
festivalman
01-02-2005, 03:19 PM
What I did, was have the default picture be a clear pixel.gif, so that way it just shows the final randomized ad, instead of a full ad first and then switching it.
bigcurt
01-05-2005, 07:45 PM
I sort of got it to work but now like the ENTIRE page is ****ed up with firefox running...anyone got suggestions?
Monica05
04-21-2005, 10:27 PM
I'm sorry to bump this up, but it's relevant to this thread. I've got this installed, but i'm missing something apparently.
The advertisement box is showing up, but I can't get the banner images or link to go through.
When I open with Firefox, it just has the advertisment box.. When I open in IE, it has a red "x" where the image should be, and when i point to it it says "www.url for your image"
I've checked that I put them in the right spots, but i'm totally missing something.
LEAD_WEIGHT
04-21-2005, 10:56 PM
http://www.vbulletin.org/forum/showthread.php?t=79791
Seem to be a better version but still beta I made my own from Latest forum topics Module ex.http://www.theundergroundsource.com/ and it scrolls automatically but will replace it when Geek Advertising Banner system Beta 1 is out of beta.
This is on my site at the moment I will open site when I get a Gallery but it is hard to make a choice between vBadvanced Gallery & http://www.telekorn.de/ Photokorn Pro ? that product is due to come out in july or september 2005 until then I will open my site unofficially.
Here is the code I use right now for Ads.
Upload "fading Jscript script file" to root directory not forum directory.
Admin=> Styles & Templates=> Style Manager=> Add New Template=> " adv_portal_advertise " => Copy & Paste code.
Still in Admin C/panel goto vBa CMPS=> Add Modules=>
Module Title: Advertisement
Module Identifier: Leave blank
File to Include: Leave as is
OR Template to Include: advertise
Active: Yes
Column: Center [ Depends on size u chose for banner also ]
Display Order: your choice
Templates Used: leave blank
Update All Pages? Yes
Usergroups Here you may specifiy which usergroups will be able to view this module.
This is up to u if u want certain usergroups not to view.
Unregistered / Not Logged In Yes
Registered Users Yes
Users Awaiting Email Confirmation Yes
(COPPA) Users Awaiting Moderation Yes
Super Moderators Yes
Administrators Yes
Moderators Yes
Banned Users Yes
save & done!
As u can see that the colour corresponds to certain code areas
The darker blue is a part u can delete if not needed
<!-- Scrolling/Fading Links -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="545">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Banner Ads</strong></span>
</td>
</tr>
<tr>
<td class="$getbgrow" width="100%">
<SCRIPT src="fading.js"></SCRIPT>
<MARQUEE behavior= "scroll" align= "center" direction= "up" height="170" scrollamount= "2" scrolldelay= "15" onMouseOver="this.stop()" onMouseOut="this.start()">
<center>
<!-- Begin Links -->
<br><a href="http://buy.cyberscrub.com/avutility/index.php?ReferrerId=XXXX" target="_blank">
<img src="http://buy.cyberscrub.com/banners/BA_AV1_6_468x60_FT.jpg" border="0"></a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<!-- End Links -->
</center>
</Marquee>
</td>
</tr>
<tr>
<td class="$getbgrow" align="center">
<img src="http://www.yourimage.com/Affiliates/foot_clan1.jpg" border="0">
<br><img src="http://www.yourimage.com/Affiliates/foot_clan2.jpg" border="0">
</td>
</tr>
<tr>
<td class="tcat" align="center"><span class="smallfont"><strong><a href="http://www.forumthread.com/forums/showthread.php?t=2">Click Here to Place your Ads</a></strong></span>
</td>
</tr>
</table>
<br />
<!-- End Scrolling/Fading Links -->
Monica05
04-22-2005, 05:51 AM
That's really nice! I like the way it scrolls.
sunnycher
04-22-2005, 08:18 AM
This will add an advertisement to all your VBAdvanced CMPS pages.
Thanks Roms! Works perfectly! Is it suppose to show on all pages or just the forumhome page?
TeenForums
05-06-2005, 04:13 PM
Adding this to my site (http://www.teenageforums.com) now, lets see how it goes!!!
sunnycher
07-16-2005, 03:45 PM
my banners are not rotating :(
tiger
07-22-2005, 01:56 AM
Any plans to update this for 2.0?
Mikecp421
10-19-2005, 10:01 AM
http://www.vbulletin.org/forum/showthread.php?t=79791
Seem to be a better version but still beta I made my own from Latest forum topics Module ex.http://www.theundergroundsource.com/ and it scrolls automatically but will replace it when Geek Advertising Banner system Beta 1 is out of beta.
This is on my site at the moment I will open site when I get a Gallery but it is hard to make a choice between vBadvanced Gallery & http://www.telekorn.de/ Photokorn Pro ? that product is due to come out in july or september 2005 until then I will open my site unofficially.
Here is the code I use right now for Ads.
Upload "fading Jscript script file" to root directory not forum directory.
Admin=> Styles & Templates=> Style Manager=> Add New Template=> " adv_portal_advertise " => Copy & Paste code.
Still in Admin C/panel goto vBa CMPS=> Add Modules=>
Module Title: Advertisement
Module Identifier: Leave blank
File to Include: Leave as is
OR Template to Include: advertise
Active: Yes
Column: Center [ Depends on size u chose for banner also ]
Display Order: your choice
Templates Used: leave blank
Update All Pages? Yes
Usergroups Here you may specifiy which usergroups will be able to view this module.
This is up to u if u want certain usergroups not to view.
Unregistered / Not Logged In Yes
Registered Users Yes
Users Awaiting Email Confirmation Yes
(COPPA) Users Awaiting Moderation Yes
Super Moderators Yes
Administrators Yes
Moderators Yes
Banned Users Yes
save & done!
As u can see that the colour corresponds to certain code areas
The darker blue is a part u can delete if not needed
<!-- Scrolling/Fading Links -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="545">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Banner Ads</strong></span>
</td>
</tr>
<tr>
<td class="$getbgrow" width="100%">
<SCRIPT src="fading.js"></SCRIPT>
<MARQUEE behavior= "scroll" align= "center" direction= "up" height="170" scrollamount= "2" scrolldelay= "15" onMouseOver="this.stop()" onMouseOut="this.start()">
<center>
<!-- Begin Links -->
<br><a href="http://buy.cyberscrub.com/avutility/index.php?ReferrerId=XXXX" target="_blank">
<img src="http://buy.cyberscrub.com/banners/BA_AV1_6_468x60_FT.jpg" border="0"></a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<br><a href="</a>
<!-- End Links -->
</center>
</Marquee>
</td>
</tr>
<tr>
<td class="$getbgrow" align="center">
<img src="http://www.yourimage.com/Affiliates/foot_clan1.jpg" border="0">
<br><img src="http://www.yourimage.com/Affiliates/foot_clan2.jpg" border="0">
</td>
</tr>
<tr>
<td class="tcat" align="center"><span class="smallfont"><strong><a href="http://www.forumthread.com/forums/showthread.php?t=2">Click Here to Place your Ads</a></strong></span>
</td>
</tr>
</table>
<br />
<!-- End Scrolling/Fading Links -->worked like a charm!! Thanks man!
shadowdancer36
11-20-2005, 10:00 PM
Great rotator, but its throwing my page all off. Is it away to keep that from happening? Its like everything in the right col is being pushed below the middle (where I have the banners showing)
cdembek
12-20-2005, 11:35 PM
what I found is you can't have any MOD's listed as the same number...
this is located in your Edit Modules
Quarterbore
01-15-2006, 10:39 AM
I am starting to install this now... shall see :)
aaamaretto
07-11-2006, 12:07 PM
when i add this to my center column (3 column page), it converts it to only a 2 column page... anyone know how to fix this?
onehost
07-25-2006, 11:58 AM
Surely there is a better system out there, visit this site. this guy uses VB, he had rotating link and banner system, and the user can create their own website, im just not sure if he uses mods or not, and if so, what are they called?
www.freeadvertisingforum.com
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.