vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Rotating Banner System (https://vborg.vbsupport.ru/showthread.php?t=188328)

y2ksw 03-05-2010 06:08 AM

Ok, let's try to trace it down. :)

I have a clean installation and for me it works at any place for any placeholder, ranging from <!--@vbbanners:0@--> to <!--@vbbanners:9@-->. I do have also several production sites where it works perfectly well with any combination of rules, some of which are very complex.

Together, we have found that vbSEO may clean HTML comments, thus the standard placeholders won't work at all, and would have to be replaced by a different one.


(1)
In order to catch all possible errors, please make sure, your placeholder in the options looks like <!--@vbbanners:%d@--> or like @vbbanners:%d@ (if you have vbSEO or other software which cleans HTML). It may have any other combination of characters, as long as a %d appears inside. %d is replaced with numbers between 0 and 9 at runtime.


vbSEO or HTML cleaning software users:
vBulletin Options - Rotating Banner System Options - Nth Placeholder: @vbbanners:%d@

All other users:
vBulletin Options - Rotating Banner System Options - Nth Placeholder: <!--@vbbanners:%d@-->


(2)
Now put a:


vbSEO or HTML cleaning software users:
<div align="center">@vbbanners:0@</div>
<div align="center">@vbbanners:1@</div>

All other users:
<div align="center"><!--@vbbanners:0@--></div>
<div align="center"><!--@vbbanners:1@--></div>

in the template: ad_navbar_below


(3)
and enable the default banners, moving the second banner to position 1. Both banners should appear, one below the other.

---

On a standard installation, this combination of settings works 100% guaranteed on 4.0.2 PL1. I have set it up once again from scratch just to be sure. If it doesn't work for you, I'll install a test board with these settings on, in order to demonstrate the facts.


Possible issues:
- You are using a style which does not implement ad_navbar_below, or which comments out that template. In this case, no banner appears.
- Your system caches pages (e.g. Apache mod_cache). Unless you refresh the page explicitly, the banners don't seem to rotate or won't even appear.
- Your vBulletin Options - Rotating Banner System Options - Nth Placeholder is setup like: <!--@vbbanners:0@--> or @vbbanners:0@. In this case, only banners at location 0 appear. You should have set: <!--@vbbanners:%d@--> or @vbbanners:%d@ instead.

djbaxter 03-05-2010 12:28 PM

Quote:

Originally Posted by y2ksw (Post 1997560)
On a standard installation, this combination of settings works 100% guaranteed on 4.0.2 PL1. I have set it up once again from scratch just to be sure. If it doesn't work for you, I'll install a test board with these settings on, in order to demonstrate the facts.

I don't dispute that you got it to work on a clean install. It may well be that there is a conflict with another add-on somewhere but I have done and double-checked all of the things you list above - still not working reliably.

I am using vBSEO but I don't use (and never have) the "HTML cleaning" option.

Quote:

Originally Posted by y2ksw (Post 1997560)
Possible issues:
- You are using a style which does not implement ad_navbar_below, or which comments out that template. In this case, no banner appears.

No.

Quote:

Originally Posted by y2ksw (Post 1997560)
- Your system caches pages (e.g. Apache mod_cache). Unless you refresh the page explicitly, the banners don't seem to rotate or won't even appear.

No.

Quote:

Originally Posted by y2ksw (Post 1997560)
- Your vBulletin Options - Rotating Banner System Options - Nth Placeholder is setup like: <!--@vbbanners:0@--> or @vbbanners:0@. In this case, only banners at location 0 appear. You should have set: <!--@vbbanners:%d@--> or @vbbanners:%d@ instead.

Set correctly.

y2ksw 03-05-2010 03:13 PM

Quote:

Originally Posted by djbaxter (Post 1997737)
I don't dispute that you got it to work on a clean install. It may well be that there is a conflict with another add-on somewhere but I have done and double-checked all of the things you list above - still not working reliably.

I am using vBSEO but I don't use (and never have) the "HTML cleaning" option.



No.



No.



Set correctly.

Thanks. :)

So the next questions are:

- Do you have a product or plugin which disables or jumps over the global_complete hook, or changes existing hook code? Since banners are rendered there, it is the only place I would look at.
- Which of your products / plugins are working with this hook?
- Do some of the other global_complete hooks call a PHP: die; or: exit(0); command? I suppose not, else no banners would be rendered...

... out of other options and ideas ... :erm:

silencio2222 03-06-2010 12:15 AM

Just wanted to share...I am new to this forum and to vBulletin and am just figuring out how to edit the templates and css....but I needed a rotating banner system...and really like the features in this mod. I have the latest version of vb 4.02 pl1 and after not being able to figure out how to edit the templates I decided to try adding the required code to the build in banner ad setup....and it worked like a charm.

I used the code <div align="center"><!--@vbbanners:0@-->&nbsp;<!--@vbbanners:2@--></div> and created a new ad "below navbar" and "above footer" and they work perfectly....so far. I wanted to banners side by side.

Maybe it's a good shortcut and maybe it's not but right now it's working...really good, tracking the impressions and clicks just like it would otherwise...so maybe this could help someone else...until code changes and causes it not to work...;)

Hey a guy has to be creative right?

Check it out if you want to here and please let me know what you think.

vortodox 03-06-2010 07:52 AM

I would like to put rotating banner instead of default vbulletin logo. Is this possible?
I have putted code in ad_header_logo, and removed image of vbulletin logo, but there is space between image and navigation bar.
You can see it here: http://www.bg-anime.com/forum.php
Can someone help me with this?

Videx 03-06-2010 01:49 PM

Quote:

Originally Posted by vortodox (Post 1998288)
I would like to put rotating banner instead of default vbulletin logo. Is this possible?

Hm. You mean use this as a logo rotator? Yes, I guess you could. In your case I'm not so sure it's the space below that's messing you up, it's the lack of space above to balance it out. Have you tried adding a <br> in there to move it down a bit? Beyond that I have no clue; it's all in the CSS somewhere.

Tettinntil 03-06-2010 04:46 PM

Quote:

Originally Posted by Tettinntil (Post 1996363)
Using this with success on 3.8.4 and working fine on normal forum pages. But when integrating PhotoPost (Gallery), the banners I have put in the left column do not show. I see <!--@vbbanners:1@--> in the source, so it definitely calls for the code (which shows correctly on other forum pages). Any idea why it does not work?

Any help with this?

vortodox 03-06-2010 06:17 PM

Quote:

Originally Posted by Videx (Post 1998480)
Hm. You mean use this as a logo rotator? Yes, I guess you could. In your case I'm not so sure it's the space below that's messing you up, it's the lack of space above to balance it out. Have you tried adding a <br> in there to move it down a bit? Beyond that I have no clue; it's all in the CSS somewhere.

I tried but that didn't helped...
But, with your help I have found Logo rotator, which will resolve my problems :)
Thanks!

skol 03-06-2010 09:59 PM

Guys if your adding adsence it could take up to an hour for it to show have patience...

djbaxter 03-06-2010 11:34 PM

Quote:

Originally Posted by skol (Post 1998749)
Guys if your adding adsence it could take up to an hour for it to show have patience...

That's only true when you're creating a new banner. I'm using existing banners and those should show up immediately, just as they do if they are added via hard coding.


All times are GMT. The time now is 11:01 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02338 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete