View Full Version : Forum Display Enhancements - Add a banner image to each forum (vb3.6)
Zachariah
11-27-2006, 10:00 PM
/* -----------------11/28/2005 10:37AM-----------------
[HowTo] Add a banner option image to each forum w/ Link V.1.7
Tested on vBulletin: 3.6.4
Zachariah - http://www.gzhq.net
This is an update of my previous hack:
*** Add a banner image to each forum (VB 3.5x)
https://vborg.vbsupport.ru/showthread.php?t=94119
DEMO (http://www.gzhq.net/forums/forumdisplay.php?f=47)
- banner for an on-line game clan/guild.
*** Info:
This modification will Add an image banner w/ link Or paste in your own HTML code option per forum.
These files can be any image. (png, jpg, gif, ect).
This will be located after the $navbar on FORMDISPLAY and SHOWTREAD.
This images can be located on the localhost or on a remote server.
Changelog:
------------
1.7
- str_replace used to place hack at $navbar in FORUMDISPLAY, SHOWTHREAD.
- choice to show in thread per forum.
- Place $add_banner in template if str_replace fails to work.
- add_banner template added
1.6
Banner shows up on each thread
adds: 1 more template edit to the install
Requested by: - Ryan McBain
** Note: 1.5 - 1.6 needs only to edit SHOWTHREAD not Reinstall the XML files
1.5
Added HTML option
Added 3.x to VB 3.5 upgrade XML file.
--------------------------------------------------*/
Zachariah
11-28-2006, 04:08 PM
1st post :D
*** Useage:
These files can be any image. (png, jpg, gif, ect) or paste your HTML code.
To add banners go to:
Forums & Moderators => Forum Manager => Edit/Add Forum =>
scroll do to the bottom enter your details.
This script has a few options.
-
By default install it will attempt to place itself
in FORUMDISPLAY, SHOWTHREAD under location "$navbar" in the templates. If for some
reason your banner does not show up you edit and place $add_banner within the templates.
Zachariah
11-28-2006, 04:08 PM
Here is a simple JAVA random banner code you can paste in the HTML area of any forum.
EX:
This will show @ random.
image1.jpg @ http://www.yoursite1.com
image2.jpg @ http://www.yoursite2.com
image3.jpg @ http://www.yoursite3.com
<script language="javascript" type="text/javascript">
<!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite2.com' target='_blank'><img src='/banners/image2.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite3.com' target='_blank'><img src='/banners/image3.jpg' alt='' border='0' /></a>"
// keep adding items above here...
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//-->
</script>
Useage: If you need more banners edit / add another row.
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
Link of Destination
Image location
projectego
11-28-2006, 05:46 PM
Thank you very much, Zachariah! ;)
* projectego clicks install
WOW, Thanks a Lot Zachariah
*Installed*
ShackMaster
11-28-2006, 05:49 PM
I'm not able to get this to work, either with a single banner or with the script for random banners.
Instead of placing the $add_banner in Forumdisplay and Showthread, could it be added in the Navbar template?
Replicators
11-28-2006, 07:01 PM
What don't make sense is the 3.5.x version works just fine for the 3.6, so whats the sense in a update?
firstrebel
11-28-2006, 07:01 PM
Installed then uninstalled, for a few reasons.
1] Could not get it to work, just got red X's, in fact got 2 red x's, and I had 5 image files in the scripts. Tried full URL and relative URL.
2] Putting this in each forum is a bit of a long job as I have 40+ forums and I could not get it to work on the forum homepage at all. I would have thought putting the code in the navbar template would be better, then they appear in forumhome and all other forums. I tried that but that didn't work either.
I am obviously doing something wrong, but what. One thing I can't work out ishref='http://www.yoursite1.com'
href='http://www.yoursite2.com'
what do I put if it's all on one site.
Bob
Jonathan Young
11-28-2006, 10:15 PM
Hi i updated, then uninstall ed because i had a problem with my images displaying multiple times. I also reinstalled, images still show multiple times website www.bgleague.com/forum
Zachariah
11-28-2006, 11:47 PM
I'm not able to get this to work, either with a single banner or with the script for random banners.
Instead of placing the $add_banner in Forumdisplay and Showthread, could it be added in the Navbar template?
Yes you can but it will only show the banner image on forumdisplay and show thread.
EX:
On the forumdisplay:
$search_text = '$navbar';
$vbulletin->templatecache['FORUMDISPLAY'] = str_replace($search_text,
$search_text.fetch_template('add_banner'), $vbulletin->templatecache['FORUMDISPLAY']);
This looks @ the template FORUMDISPLAY for $navbar and if found it places the content of add_banner under it. If you have a custom style that has removed $navbar there is a option to place $add_banner.
What don't make sense is the 3.5.x version works just fine for the 3.6, so whats the sense in a update?
Many do not look in old 3.5 area. :p
Installed then uninstalled, for a few reasons.
1] Could not get it to work, just got red X's, in fact got 2 red x's, and I had 5 image files in the scripts. Tried full URL and relative URL.
2] Putting this in each forum is a bit of a long job as I have 40+ forums and I could not get it to work on the forum homepage at all. I would have thought putting the code in the navbar template would be better, then they appear in forumhome and all other forums. I tried that but that didn't work either.
I am obviously doing something wrong, but what. One thing I can't work out ishref='http://www.yoursite1.com'
href='http://www.yoursite2.com'
what do I put if it's all on one site.
Bob
Take a look: Google image, Google News, Froogle
<script language="javascript" type="text/javascript">
<!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://www.google.com/' target='_blank'><img src='http://www.google.com/intl/en_ALL/images/logo.gif' alt='' border='0' /></a>"
banner[number++] = "<a href='http://news.google.com/' target='_blank'><img src='http://news.google.com/images/news.gif' alt='' border='0' /></a>"
banner[number++] = "<a href='http://froogle.google.com/' target='_blank'><img src='http://froogle.google.com/froogle/intl/en_us/images/froogle_110tall.gif' alt='' border='0' /></a>"
// keep adding items above here...
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//-->
</script>
Zachariah
11-28-2006, 11:49 PM
Hi i updated, then uninstall ed because i had a problem with my images displaying multiple times. I also reinstalled, images still show multiple times website www.bgleague.com/forum
Ok the reason you seen 2 sets of images:
*** How to Upgrade:
*** Edit 2 Template(s) : FORUMDISPLAY, SHOWTHREAD no longer need the code below:
Find:
$navbar
below remove:
<if condition="$foruminfo['banner'] AND $foruminfo['bannerlink']"><center><a href="$foruminfo[bannerlink]" target="_blank"><img src="$foruminfo[banner]" alt="$foruminfo[banneralt]" border="0" /></a></center><br />
<else />
<if condition="$foruminfo['banner']"><center><img src="$foruminfo[banner]" alt="$foruminfo[banneralt]" border="0" /></center><br />
<else />
<if condition="$foruminfo['bannercode']"><center>$foruminfo[bannercode]</center><br />
</if>
</if>
</if>
This script has a few options. By default install it will attempt to place itself
in FORUMDISPLAY, SHOWTHREAD under location "$navbar" in the templates. If for some
reason your banner does not show up you edit and place $add_banner within the templates.
ShackMaster
11-28-2006, 11:52 PM
$search_text = '$navbar';
$vbulletin->templatecache['FORUMDISPLAY'] = str_replace($search_text,
$search_text.fetch_template('add_banner'), $vbulletin->templatecache['FORUMDISPLAY']);
Is this the code that is supposed to be on my forumdisplay after loading the .xml? Cause that code is nowhere to be found.
ShackMaster
11-28-2006, 11:57 PM
I tried placing $add_banner in forumdisplay, but it still doesn't work.
Zachariah
11-29-2006, 12:26 AM
I tried placing $add_banner in forumdisplay, but it still doesn't work.
The code above is used in the script to "search" the Forumdisplay template for $navbar and try to place the banner template "add_banner" under.
Do you have $navbar in your Forumdisply template ?
- If so this should show up after you edit a forum and add the needed image, target link, or custom HTML code.
If there is no $navbar in your Forumdisplay then you need to add $add_banner in your template.
I have 2 banners now -
http://www.gzhq.net/forums/forumdisplay.php?f=47
<body>
$header
$add_banner
$navbar
The one the hack places and the same thing above the $navbar because I edited the template.
What have you placed in the AdminCP in the space for the image in the forum you edited ?
Barakat
11-29-2006, 01:00 AM
installed . thanks
Jonathan Young
11-29-2006, 01:24 AM
Okay, works fine now. Only thing that seems weird is that everything in the forum edit is in a longer form. By that i mean like 3 words a line, then down like a list, then it shows the field, but it doesn't seem to affect the added image part. If you need a screen shot, i can send one if requested.
sensimilla
11-29-2006, 04:57 AM
Great share Zachariah thanks again
abramelin
11-29-2006, 06:30 AM
lovely mod but doesnt this bad for seo?
firstrebel
11-29-2006, 02:57 PM
I'm not able to get this to work, either with a single banner or with the script for random banners.
Instead of placing the $add_banner in Forumdisplay and Showthread, could it be added in the Navbar template?
Try THIS (http://www.vbulletin.com/forum/showthread.php?t=170826)
Bob
computer1
11-29-2006, 04:04 PM
Thx for this hack this I like :)
but howe can I put in more and one banners let say if I have 8 banners
some I wont to put in howe shuld I do that ????
so all the banners rotate
Zachariah
11-29-2006, 05:11 PM
Thx for this hack this I like :)
but howe can I put in more and one banners let say if I have 8 banners
some I wont to put in howe shuld I do that ????
so all the banners rotate
https://vborg.vbsupport.ru/showpost.php?p=1127347&postcount=3
computer1
11-29-2006, 06:07 PM
Here is a simple JAVA random banner code you can paste in the HTML area of any forum.
EX:
This will show @ random.
image1.jpg @ http://www.yoursite1.com
image2.jpg @ http://www.yoursite2.com
image3.jpg @ http://www.yoursite3.com
<script language="javascript" type="text/javascript">
<!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite2.com' target='_blank'><img src='/banners/image2.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite3.com' target='_blank'><img src='/banners/image3.jpg' alt='' border='0' /></a>"
// keep adding items above here...
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//-->
</script>
Useage: If you need more banners edit / add another row.
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
Link of Destination
Image location
plz help me I?m not so familay whit this I wont to put this code to the top of my first page on the board I?m not shure if that is to the header page howe can I do that so all the banners display whit the loggo my template is tangerina
EasyTarget
11-29-2006, 06:51 PM
thanks for the hack.
just some feature suggestions..
option to have it auto apply to child forums
option to enable/disable the main banner
michaelsilvia
12-01-2006, 05:17 AM
This is a great hack!
Is there a way to do this with headers? I would like to have my header changed based on the forum ID. I am working with vb.com, but they are simply showing me conditionals, but that takes up a LOT of space in the header.
Mike
BobbyBig
02-06-2007, 02:04 AM
Great hack, just what I was searching for.
Installed.
Zachariah
02-06-2007, 03:11 AM
thanks for the hack.
just some feature suggestions..
option to have it auto apply to child forums
option to enable/disable the main banner
Sexy :D
This is a great hack!
Is there a way to do this with headers? I would like to have my header changed based on the forum ID. I am working with vb.com, but they are simply showing me conditionals, but that takes up a LOT of space in the header.
Mike
You can use this in the header template with a few changes it can show a default image if none is filled out and if on any other VB page that is not a forum.
giorgiotave
02-27-2007, 08:07 AM
Hello Zachariah,
this modification work very great :)
i have one question: if i want use more Add Banner in my Forum, how can make?
For example, i want put different 4 banner in Header, in Footer and another place.
I need to install 3 different Add Banner...
You can suggestion for me?
raiderlax
03-03-2007, 05:56 AM
For some reason the google adsense code is not showing up here, but it shows up on the other forums.
Here: http://talkfitness.org/forumdisplay.php?f=2
BobbyBig
03-22-2007, 08:57 PM
Zachariah this is one of the best mods i have seen around.
I really like the way we can set it per Forum.
I really would like to see more options for a forum:
- in the Forum there will be also advertisement between different Threads
- in the Threads of this Forum will be advertisement between different Postings
I really would love you for this :)
regards
Zachariah
03-22-2007, 09:00 PM
Zachariah this is one of the best mods i have seen around.
I really like the way we can set it per Forum.
I really would like to see more options for a forum:
- in the Forum there will be also advertisement between different Threads
- in the Threads of this Forum will be advertisement between different Postings
I really would love you for this :)
regards
Good Idea :D
vuiveclub_net
04-17-2007, 05:40 PM
Is the a way we can allow the moderator of that forum create his/her own header/footer ??? This seems like only Admin create every single header.
maamon
04-18-2007, 02:47 AM
شكرا على ملف المنتج
Zachariah
04-18-2007, 04:47 PM
شكرا على ملف المنتج
I do not understand.
robert_2004
04-18-2007, 04:48 PM
yeah.... maamon's right.
stevebullman
08-28-2007, 08:32 PM
not sure what im doing wrong but i dont get any images come up, just red crosses
Zachariah
08-28-2007, 09:30 PM
not sure what im doing wrong but i dont get any images come up, just red crosses
Red images usably means that the URL's to the images are off.
- Right click on the broke image and go to properties. It should tell you more info on the location of where the script thinks your images are.
Installed on 3.6.8 and working flawlessly! Many thanks for this hack! :up:
Installed on 3.6.8 and working flawlessly! Many thanks for this hack! :up:
Good to know.
stevebullman
08-29-2007, 12:36 PM
Red images usably means that the URL's to the images are off.
- Right click on the broke image and go to properties. It should tell you more info on the location of where the script thinks your images are.
thanks, i actually had the path wrong, im new to all this still....works a treat now!
the random banner code you put the 3rd post down is particularly useful as it works in red tygers ad management hack also!:)
MotMann
09-04-2007, 12:40 PM
I have that one and its not correct working:
<script language="javascript" type="text/javascript">
<!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number1] = "<!-- ebay Affili -->
<script language="JavaScript" type='text/javascript'>
// <!--<[CDATA[
era_width = '728';
era_height = '90';
era_layout = 'img';
era_color_title = '000000';
era_itemtype = '0';
era_publisher='xxxxxxxx';
era_color_bg = 'FFFFFF';
// ]]> -->
</script>
<script language="JavaScript" type='text/javascript' src='http://api.xxxxxxxx.de/js/show_ads.js'></script>
<!-- eBay Affili -->"
banner[number2] = "<!-- BEGIN PARTNER PROGRAM - DO NOT CHANGE THE PARAMETERS OF THE HYPERLINK -->
<script language="JavaScript" type="text/javascript">
//<!--<[CDATA[
am_referrer = 'xxxxxxxx';
am_template = '1';
am_color_text = '000000';
am_color_title = '000000';
am_color_border = '000000';
am_color_background = 'FFFFFF';
am_color_price = 'FF0000';
am_color_link = '3333FF';
am_stmo = '1';
am_tsr = '02';
// ]]> -->
</script>
<script language="JavaScript" type="text/javascript" src="http://banners.xxxxxx.de/show_ads.js"></script>
<!-- END PARTNER PROGRAM -->"
// keep adding items above here...
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//-->
</script>
any idea?
DieselMinded
09-04-2007, 06:04 PM
the first screen shot is that section added to the forum manager ?
Zachariah
09-04-2007, 08:50 PM
the first screen shot is that section added to the forum manager ?
Correct, If you add or edit a forum. There will be an option per forum.
DieselMinded
09-05-2007, 09:30 AM
Sounds Good I may just do this for my sponsors I already have the vB Ad Management by =RedTyger= Any Compatibility issues reported?
Zachariah
09-05-2007, 12:50 PM
No problems, it is a very simple add-on
- I have plans to make no template edits. :D
DieselMinded
09-05-2007, 04:03 PM
How Soon Is the Upgrade ?
DieselMinded
09-05-2007, 06:27 PM
Installed Flawless !! Thanks
DM
bigraph
09-05-2007, 06:29 PM
is this the same sort of plugin used at www.gamebattles.com ? if not, link on how they did it? thx
thunderforceken
09-14-2007, 05:02 AM
Works great!
I'd like to move this into the header and have 3 static banners using this add on and one rotating banner (other code) is this possible? Thanks!
enjoyyaself
09-14-2007, 11:30 AM
Nice Hack,
momo2
09-14-2007, 11:43 PM
I'll try this for google ads
nnjj.net
09-17-2007, 09:22 PM
is it working for 3.6.8?
volksrods
10-01-2007, 01:20 AM
is it working for 3.6.8?
I just installed it in 3.6.8. Everything seems to be working fine. :up:
I do have one question though...
I am not experienced in coding at all... and my programming knowledge is ZILCH, so excuse my ignorance on this.
I've spent a better part of a couple days searching for a way to relocate the banner to a different part of the forum page. I did read where it is only a matter of placing the code in my navbar wherever I see fit... but I just don't know how to do that correctly without having it pretty much "spelled out" like I've seen with some other code listed here (add "this" below "this line", etc...)
As in... exactly what block of code do I need to retrieve after the install, and where exactly do I place it if I wanted to place this banner to sit directly below my main Header Banner instead of the default location set for this hack?
Thanks in advance,
~Steve
simtex
10-04-2007, 08:27 PM
hi there , nice done zachariah
is there a way to make it look like the one in my attachment ?
thnx
induslady
10-05-2007, 04:56 AM
Hello Zacariah,
I want to know if this adds banner image to all the forums?
Or is it possible to say add this particular banner image to this particular forum?
Like banner1.jpg in forum id 1
Banner2.jpg in forumid 5
So that we display banners relevant to each forum.
Please do let me know. Thanks. Great work!
rizelim
10-05-2007, 01:42 PM
thank you very much
induslady
10-05-2007, 02:39 PM
Hello Zacariah,
I want to know if this adds banner image to all the forums?
Or is it possible to say add this particular banner image to this particular forum?
Like banner1.jpg in forum id 1
Banner2.jpg in forumid 5
So that we display banners relevant to each forum.
Please do let me know. Thanks. Great work!
Bump :)
I appreciate response to this one.
Zachariah
10-05-2007, 04:00 PM
Bump :)
I appreciate response to this one.
* This modification will Add an image banner w/ link Or paste in your own HTML code option per forum.
* These files can be any image. (png, jpg, gif, ect).
* This will be located after the $navbar on FORMDISPLAY and SHOWTREAD.
* This images can be located on the localhost or on a remote server.
periphrastic
10-05-2007, 04:09 PM
installed on 3.6.8 & currently working & thank you, i needed this.
petacat
10-06-2007, 10:58 AM
Thanks. I am amazed at the power of this community.
Everything I seem to think of is here somewhere!
I am also amazed at how reliable these products are. I would normally expect that there would be nasty surprises. None at all so far in 20 installs :) :up:
neoxi
10-07-2007, 09:34 PM
thank you
ciprianrpp
10-08-2007, 09:07 AM
installed. thank you.
Mine keeps coming up as a forum link. When I click the link the banner shows on the thread and is active.
docallbikesforums.com
Any ideas?
Thank you, Ted
class101
10-11-2007, 12:27 PM
Here is a simple JAVA random banner code you can paste in the HTML area of any forum.
EX:
This will show @ random.
image1.jpg @ http://www.yoursite1.com
image2.jpg @ http://www.yoursite2.com
image3.jpg @ http://www.yoursite3.com
<script language="javascript" type="text/javascript">
<!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite2.com' target='_blank'><img src='/banners/image2.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite3.com' target='_blank'><img src='/banners/image3.jpg' alt='' border='0' /></a>"
// keep adding items above here...
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//-->
</script>
Useage: If you need more banners edit / add another row.
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
Link of Destination
Image location
Nice peace of code , thanks for sharing your knowledge :)
yoyoyoyo
11-06-2007, 02:38 AM
microstats informs me that the add_banner template is uncached
shadowevil
03-31-2008, 07:39 AM
is it working for 3.7.x?
Zachariah
03-31-2008, 11:14 AM
is it working for 3.7.x?
Ya there is no problem
aviendha
04-04-2008, 11:36 AM
can we add more than 1 banner , in a table type like
banner1 | banner2 | banner3
in the diagbox only accept 1 banner, i don't know how to add more than 1
Subah
04-04-2008, 04:00 PM
Great mod ;)
Thank you Zach :)
can we add more than 1 banner , in a table type like
banner1 | banner2 | banner3
Good idea :D
aviendha
04-04-2008, 05:55 PM
to solve this, i made a custom html code ( a table in the box custom html code)
Anyway, an option to aply all banners in child forums could be nice ^^
CFodder
04-16-2008, 08:44 AM
Great mod :).
Would like to know if it's possible to add the banners to the main forum page above each of my main forums?
trigatch4
04-16-2008, 01:03 PM
You mention placing these in the header template without the use of conditionals would be a pretty simple task. Would you mind holding our hands through that? I"ve been trying to get this done for AGES and it looks like your mod alone has gotten me 95% of the way.
OH SO CLOSE!
stuartn
04-18-2008, 02:54 PM
I've been searching through the FORUMDISPLAY and SHOWTHREAD templates for the code that pulls in the template add_banner. Its not under $navbar, so I checked out $navbar thinking it was globally being pulled over but still no luck. Obviously the template add_banner is in, but it get's pulled those two templates is something I'm struggling width.
Any clues - cause my head is hurting.;-)
stuartn
04-19-2008, 11:56 PM
Sussed it....Helps if you actually ready the details in the install. Works nice.
DieselMinded
05-09-2008, 02:28 AM
Working on 3.7.0 Gold
stuartn
05-09-2008, 06:11 AM
For those wanting to use this with OpenX I would highly recommend it. Also its not very difficult to create a duplicate script that will allow you to run two or multiple set's of ad's throughout the forum. Very nice work indeed.
stuartn
05-09-2008, 06:14 AM
Nice peace of code , thanks for sharing your knowledge :)
OpenX will achieve this and far more if plugged you just use the java code invocation within the code part of the forum manager. Yes you run another database and have to install it. But it offers far more flexibility.
Lee Wallace
06-03-2008, 07:59 PM
is it working for 3.7.x?
Works great with my 3.7.1 and after market skin. This rocks; Thanks Zachariah!!!
snowman872
06-27-2008, 02:58 AM
Working well here with 3.7.2.
I did notice on small thing. Apparently if you do not have a banner defined for a given forum, it creates an uncached template now (addbanner if memory serves). I don't recall that in the past. This is true, even if the banner is "off" for that forum.
Please keep up the good work and keep this add on compatible with vBulletin! Nothing else comes close to it for this specialized purpose. I'll be sending a donation soon. =)
Zachariah
06-27-2008, 12:55 PM
I have a lot of ideas and changes in mind for this.
I need to get some time to add them.
newbuck
08-22-2008, 04:31 PM
How can we make banners be displayed to guests only? Ive tried various codes but can't seem to get it working
DieselMinded
11-12-2008, 06:46 PM
Running on 3.7.4 In debug mode and this is RED on Show Thread and Show Forum Only on Forums / Thread That do not have Your Mod Active on ,
Zachariah
11-13-2008, 12:07 PM
I have it running on VB 3.8
- demo of banner on forum and threads in forum (http://www.chatsworthchamber.com/f34/).
DieselMinded
11-13-2008, 04:44 PM
can you tell us how to cache the add_banner template
Zachariah
11-14-2008, 11:25 AM
hmm there shoulden't be :|
- I'll have to look @ the zip file attached.
I do have a plugin @ hook cache_templates
if (THIS_SCRIPT == "showthread" OR THIS_SCRIPT == "forumdisplay" )
{
$globaltemplates[] = 'add_banner';
}
DieselMinded
11-17-2008, 02:50 PM
your Cache templete is as follows on my board
if ($foruminfo['bannerthread'] == '1' OR $foruminfo['banner'] OR $foruminfo['bannercode']){
$globaltemplates[] = 'add_banner';
}
i switched it to what you just posted and it appears to be fixed now thanks
Chadi
12-06-2008, 10:25 PM
This mod does not work with this one:
https://vborg.vbsupport.ru/showthread.php?t=135297
The code that must be used is:
$showrandomquote
It won't pull when placed in the code box. Do you know of any workaround to this?
Thanks.
magnaromagna
12-16-2008, 04:47 PM
I've been searching through the FORUMDISPLAY and SHOWTHREAD templates for the code that pulls in the template add_banner. Its not under $navbar, so I checked out $navbar thinking it was globally being pulled over but still no luck. Obviously the template add_banner is in, but it get's pulled those two templates is something I'm struggling width.
Any clues - cause my head is hurting.;-)
Nice hacks.
I'd like to put it in another position (not under navbar but near the footer). How can I move it?
Also,
a code to work like to following?
<if condition= THIS HACK>
<else />
$header_advertisement
</if>
Thanks
longgsm
03-14-2009, 04:05 AM
I have changed code from add_banner template to right template then show Forumdisplay and showthread very good.
But I want to add more banner show ForumHome but not show Forumdisplay and showthread?
Thanks for your help!
longgsm
03-19-2009, 12:09 AM
I have changed code from add_banner template to right template then show Forumdisplay and showthread very good.
But I want to add more banner show ForumHome but not show Forumdisplay and showthread?
Thanks for your help!
I have done already.
<if condition="THIS_SCRIPT=='index'">Show Content </if>
Lead Bomber
10-24-2009, 04:31 PM
Works in VB 3.8.4 Patch Level 1
Thanks!
Zachariah
11-20-2009, 05:33 PM
what about for VB 4.0 ?
as is it will not work, update soon
any updates? or similar mod for vb4?
klyde
01-11-2010, 09:57 PM
Any updates?
Jack Jones
01-13-2010, 02:06 AM
Desperate for this for v4.0
Desperate for this for v4.0
same here ... still waiting for this hack so i can move to vb4
REALLY need this to upgrade to VB4 due to commercial obligations.
run.exe
05-23-2010, 07:23 PM
Any ETA for vB 4.x support? I am dead in the water without this mod!
Many thanks - in advance.
Zachariah
05-23-2010, 10:51 PM
Updated to VB4.x
https://vborg.vbsupport.ru/showthread.php?t=243176
run.exe
05-24-2010, 12:12 AM
Thank You, Sir!!!!
hoatran
06-16-2010, 03:25 PM
Thanks for your Add, however it is now does not work with V4.0.X . It even causing problems while we click in to any category...
Zachariah
06-17-2010, 12:25 AM
Thanks for your Add, however it is now does not work with V4.0.X . It even causing problems while we click in to any category...
Updated to VB4.x
https://vborg.vbsupport.ru/showthread.php?t=243176
RedBaron9112
10-17-2010, 11:58 PM
OK, I know this is a really stupid question, but...
A few years ago I set up random banners on a forum, top and bottom of all pages. Here it is:
http://www.horseshoes.com/forums
There are 15 banners in that rotation.
For the life of me I can't recall where I got that plug-in, and in searching, discovered yours.
(I've read every post in this thread!)
Regarding random banners, you posted this code:
<script language="javascript" type="text/javascript">
<!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite2.com' target='_blank'><img src='/banners/image2.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite3.com' target='_blank'><img src='/banners/image3.jpg' alt='' border='0' /></a>"
// keep adding items above here...
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//-->
</script>
When you posted this code, you said it could be pasted in the HTML area of any forum template page. Ummmm.... what does that mean? How do I know where the HTML area is? (Lord, I feel stupid.....)
Where would I put this code to achieve the same top and bottom placement I have in the forums referenced above? (I'm using version 3.6)
To demonstrtae I'm not a total idiot, here's what the current banner plug-in looks like in the Control Panel:
Thank you.
RedBaron9112
10-18-2010, 02:02 AM
It's been so long since I did that original banner placement...
OK, I finally figured out how to access the Header template (which shows you how unfamiliar I am with doing this type of stuff), and below is a screen shot of what I did. You'll see that the line:
<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />$random_banner[$random_number]</if>
has the $random_banner[$random_number] code in it, so I guess that's where I inserted it, and it calls on the PHP code in the parse_templates, shown in the previous post.
So... where do I put the random banner code you posted, in this header code? Would you please advise as to the exact location? It will be appreciated.
Thanks again.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.