View Full Version : Rotating Banners in FORUMDISPLAY
HMBeaty
10-20-2006, 10:00 PM
Ok, first off, of course, go to your admincp panel > styles and templates > style manager > open your style > edit the FORUMDISPLAY template.
In there, you will find:
<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
</if>
</tr>
</table>
Directly AFTER that bit of code, add this:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<td class="alt2" align="center">
<!-- Banner Rotator by Redline -->
<SCRIPT LANGUAGE="Javascript"><!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//--></SCRIPT>
</td></table>
PLEASE CLICK INSTALL IF YOU LIKE IT.
Online DEMO (http://redlinemotorsports.org/forum/forumdisplay.php?f=21)
ChavMagnet
10-21-2006, 08:17 PM
Havnt you released this before mate? 1st post WOOT
HMBeaty
10-21-2006, 08:39 PM
No. I've released SOMETHING like this but never this or anything in this template.
Jealousy10312
10-22-2006, 02:57 PM
Thank you.
bluegum
10-23-2006, 11:50 PM
did not work for me at all
?
HMBeaty
10-24-2006, 12:08 AM
Do you have javascript disabled? Also, can you paste your code up so I can have a look?
bluegum
10-24-2006, 10:13 AM
HTML Code:
<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
</if>
</tr>
</table>
Directly AFTER that bit of code, add this:
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<td class="alt2" align="center">
<!-- Banner Rotator by Redline -->
<SCRIPT LANGUAGE="Javascript"><!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://jdcbaits.com/' target='_blank'><img src='http://jdcbaits.com/catalog/images/banner1-420.gif' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//--></SCRIPT>
</td></table>
I dont think i have java disabled?
i am using a theme called aquateen
my site is here
http://www.basslurereviews.com/bassforums/index.php
it shows up no where?
how would , do i enable java?
I only added 1 banner to test.. as above
HMBeaty
10-24-2006, 08:31 PM
Try either filling in those empty banner links, or just remove the last 3 of these:
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' border='1'></a>"
bluegum
10-24-2006, 09:41 PM
Ok i am at a total loss
I aded it to the default and to aquateen both
FORUMDISPLAY template
did a find for
<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
</if>
</tr>
</table>
and it found it fine
then after I added the following
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<td class="alt2" align="center">
<!-- Banner Rotator by Redline -->
<SCRIPT LANGUAGE="Javascript"><!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://jdcbaits.com/' target='_blank'><img src='http://www.basslurereviews.com/images/banners/jdcbaits.gif' border='1'></a>"
banner[number++] = "<a href='http://bearpawshandpouredbaits.com/' target='_blank'><img src='http://www.basslurereviews.com/images/banners/bearbanner.gif' border='1'></a>"
banner[number++] = "<a href='http://www.kicknbass.com/' target='_blank'><img src='http://www.basslurereviews.com/images/banners/kicknbass.gif' border='1'></a>"
banner[number++] = "<a href='http://sinkobaits.com/' target='_blank'><img src='http://www.basslurereviews.com/images/banners/sinkobaits.jpg' border='1'></a>"
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//--></SCRIPT>
</td></table>
is there something i am missing?
something else i need to edit?
bluegum
10-24-2006, 09:52 PM
holy crap it shows up on opening each forum
not at the main page
NOW I SEE IT and yes u can yell at me
i thought it would show up on the page without opening up a forum
You have to click on a forum to see the banners
i am so sorry
this script works
just a bit different then i thought..
I wanted this static on the front page not when opening up a forum :(
bluegum
10-24-2006, 10:03 PM
I just added it to the navbar section all is well
R M 4 E V E R
10-24-2006, 10:06 PM
so easy man
put that mentioned code in header template if you want rotating banners in your frontpage ;)
bluegum
10-24-2006, 10:08 PM
I'm just used to smf forums
new to vb
hence why the dumb posts..
sorry
krazycivik
10-29-2006, 10:44 AM
the banners rotate without refreshing page?
tekstylez
11-02-2006, 07:58 PM
can you post an "if condition" to only show to certain usergoups?
messed up for me aswel.. :(
webpig
11-15-2006, 07:21 AM
I used this Banner Rotator by Redline easily on the top of the page but i'm using it on the side as well for some square banners .
Is there something i can change in the code to have for example five 100 x 100 square ad's down the left side instead of adding them in a rotation that will only be one ad placement?
The site I am referring to is Club Cam Girl.com (http://clubcamgirl.com) and you can see the small ad on the left.
Thank you very much
BigJimTheLug
11-17-2006, 01:15 AM
I have this modification and it has worked out well, but how can I only show this to logged in users.
Can someone please do the script for this, thanks!
This is a great mod by the way. I love it!
It's what my forum has needed!
HMBeaty
12-09-2006, 11:03 PM
I have this modification and it has worked out well, but how can I only show this to logged in users.
Can someone please do the script for this, thanks!
This is a great mod by the way. I love it!
It's what my forum has needed!
Please re-specify. Do you want this to be ONLY shown to logged in users? Or admins, mods, etc? Please put down your usergroup numbers you wish this mod to be shown to and I will code the correct conditional for you. Thank you.
Frimon86
01-03-2007, 05:42 AM
I like this but its not working with my xml file, since I have a side bar on the left side, and I have on the sidebar where I can enter text,I tried various times to enter in this script into that section and it kept coming out messed up.
I wanted to see if you can help me out, msn: Frimon86 -@- Hotmail.com
jahshaka
04-22-2007, 09:14 PM
how can i put the banner in a vertical column to the right of the threads? i love this mod but want to use skyscraper adds... is this possible
?
joryshu
05-16-2007, 11:08 PM
thank you thank you thank you.
I have been looking for this script for the last 3 weeks and omg.. thank you.. it works beautifully!
rdrunnr
05-17-2007, 03:00 AM
This is a great mod. Is there a way to size the images in the coding so they are all the same size?
HMBeaty
05-17-2007, 03:20 PM
This is a great mod. Is there a way to size the images in the coding so they are all the same size?
Try this. (I have not tested this yet so I'm not sure if this will work or not)
banner[number++] = "<a href='REDIRECT_URL' target='_blank'><img src='BANNER_URL' width="x" height="x" border='1'></a>"
Change "x" to the number of pixels you want the height/width to be
joryshu
05-25-2007, 12:19 AM
Hi there RedlineMotorsports,
I use your rotating banner script at the top of my forum, and was wondering if you might be able to help me with another banner script.
What I need is a script for chicklet banners to be constantly moving on a page - not like the rotating banner script where you have to refresh the page each time to see a new banner. I could put the chicklet banners to be moving across the page from right to left one after the other under the 468x60 rotating banner script that you gave us before, or I could put it on a sidebar on the forum so the chicklet banners are just scrolling down.
Do you possibly have a script for this? :D
HMBeaty
05-25-2007, 09:55 PM
Hi there RedlineMotorsports,
I use your rotating banner script at the top of my forum, and was wondering if you might be able to help me with another banner script.
What I need is a script for chicklet banners to be constantly moving on a page - not like the rotating banner script where you have to refresh the page each time to see a new banner. I could put the chicklet banners to be moving across the page from right to left one after the other under the 468x60 rotating banner script that you gave us before, or I could put it on a sidebar on the forum so the chicklet banners are just scrolling down.
Do you possibly have a script for this? :D
I might possibly whip something up for this when I get back from NJ
joryshu
05-25-2007, 10:17 PM
Wonderful. I would totally appreciate it and if I can contribute to your work, please let me know, because as far as I'm concerned, you definitely know what you're doing here... I just follow your instructions :D If you need an example of what I am talking about, please let me know and I will send you a URL of an example. I cannot post it here as it is an adult site. Thank you again!
joryshu
06-02-2007, 08:17 PM
Just checking in and letting you know I haven't found that script yet, so if you can 'whip something up' that would still be great. Thank you.
John1uk
06-02-2007, 08:52 PM
thanx mate :D great mod, been looking for sometime now for this ;)
*Insatlled*
HMBeaty
06-02-2007, 09:45 PM
Just checking in and letting you know I haven't found that script yet, so if you can 'whip something up' that would still be great. Thank you.
Yeah, no problem. I'll see what I can do later tonight or tomorrow night. So in approx...........4+ hours
phill2003
06-05-2007, 09:04 PM
Sorry too many windows open wrong thread :).
paypal
07-04-2007, 03:00 AM
awesome, awesome, awesome
BarryoBrien
07-04-2007, 04:49 PM
can this be done to rotate google ads?
HMBeaty
07-10-2007, 09:34 PM
No, sorry. I was trying to achieve the same thing but its not possible through this mod. However, if you are talking about ONLY google ads, then yes.
All the code you would use for that would be:<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<td class="alt2" align="center">
<!-- Banner Rotator by Redline -->
-- GOOGLE ADSENSE HERE --
</td></table>
xevier69
08-05-2007, 04:35 AM
Hi,
Can this be installed in a header? If so what do I need to change?
Thanks
HMBeaty
08-05-2007, 11:38 PM
For header installation, you can see this mod that I've already released here: https://vborg.vbsupport.ru/showthread.php?t=98913
xevier69
08-06-2007, 03:56 AM
Hi,
Sorry to be a pain but shouldn't the banners change after some lapsed time or do they change only every time the page is reloaded?
Thanks
HMBeaty
08-07-2007, 03:40 PM
The banners rotate every time the page is loaded.
Julio
10-26-2007, 08:00 PM
Hmmm strange.. this worked for about 2 weeks... then all sudden the JPGs are not showing. :(
I mean.. you can see the table box... but no banner is displayed.
I have NOT changed or modified ANYTHING at all. :'(
BTW: To make it easier for me, I just added the corresponding lines to FOOTER. Yes, I know... it will show on EVERY single page. ;)
Roughnek29
10-27-2007, 07:17 PM
All I see is a little red X
asforum
10-28-2007, 04:51 AM
Nice i love this mod.
Julio
10-31-2007, 12:00 PM
If you see a red X it means your path to the graphics is incorrect, or the name of the graphic.
Check them out.
MV Blackie
11-18-2007, 02:30 PM
i have version 3.6.8 and it does not work
forum : www.2route.be
nyunyu
11-18-2007, 05:38 PM
can the banner be called?
I mean, let's say I create 'banner.php' and and put it somewhere in the server (which I can update with ease via ftp). In vb, could it possible to insert php include so that it will call the php I created? If yes, can you show me how?
thanks.
powerful_rogue
11-18-2007, 10:53 PM
Wow!
This is exactly what ive been looking for!
Couple of questions though! Is it possible to have two random banners next to each other like in the image below? Also if I add this code to the footer, would it display on every page?
https://vborg.vbsupport.ru/attachment.php?attachmentid=72210&d=1194864275
powerful_rogue
11-22-2007, 09:18 AM
Ive managed to add the code to the footer so it now displays on everypage, however will it be possible so I can have two random banners next to each other like in the picture above?
i have a problem with one of my banners ive got the exact code as the others but it seems that it is not showing up. i have currently 4 banners and this one is my 5th.
i dont even get a error image if the path to the image was wrong
BigDog56
12-08-2007, 05:01 PM
Edit Nevermid, lol
z0diac
12-08-2007, 06:46 PM
I clicked the demo link and I really can't find out what this script/hack does....
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.