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)

Robert Waanders 11-24-2009 11:42 AM

Hey Guys,

I'm having trouble placing the banner on my forum... IN options -> rotating banners system options I've changed the Nth Placeholder to <!--@vbbanners:0@-->, I have placed this option in the header template as: [ad_header_logo]<else /><!--@vbbanners:0@--></if>

I don't see any banners at all... What am I doing wrong, yes there are the default headers, and i have created a banner myself on position 0...

Robert

oferelijah 11-24-2009 08:12 PM

can you add support to the modcp?
i want my mod's to handle this.

10x

RobbieZ 11-25-2009 12:06 AM

I have a customized header already that uses 2 images to create one long one.

How do i include your header template with my customized one so the banner/s sits on top of my right image?

Thanks

y2ksw 11-25-2009 10:00 AM

Quote:

Originally Posted by Robert Waanders (Post 1920084)
Hey Guys,

I'm having trouble placing the banner on my forum... IN options -> rotating banners system options I've changed the Nth Placeholder to <!--@vbbanners:0@-->, I have placed this option in the header template as: [ad_header_logo]<else /><!--@vbbanners:0@--></if>

I don't see any banners at all... What am I doing wrong, yes there are the default headers, and i have created a banner myself on position 0...

Robert

If you have changed the placeholder in the options to: <!--@vbbanners:0@-->, the banners never show up, because you actually try to use a constant. To make the banners work, they need to use a dynamid placeholder, where "0" must be "%d", thus: <!--@vbbanners:%d@-->

Some other valid examples:
@vbbanners:%d@
(mybanners:%d)
$my-ad-placeholder-%d-!

y2ksw 11-25-2009 10:03 AM

Quote:

Originally Posted by oferelijah (Post 1920357)
can you add support to the modcp?
i want my mod's to handle this.

10x

I'm not sure if this is a good idea. ;)

y2ksw 11-25-2009 10:11 AM

Quote:

Originally Posted by RobbieZ (Post 1920469)
I have a customized header already that uses 2 images to create one long one.

How do i include your header template with my customized one so the banner/s sits on top of my right image?

Thanks

If you want to include the banners within CSS headers, you will have to create a script which loads and renders a custom vbulletin page with the banners only. I'm not sure though, if the CSS: url() is capable to load and handle scripts correctly. Please ask a HTML/CSS specialist for advice.

If the CSS is included in vbulletin (the CSS is not saved to disk), and the banners are image only, it should be fine to include a placeholder in the appropriate place. If you save your CSS to file, you will have to use a custom script.

Robert Waanders 11-25-2009 11:01 AM

Quote:

Originally Posted by y2ksw (Post 1920635)
If you have changed the placeholder in the options to: <!--@vbbanners:0@-->, the banners never show up, because you actually try to use a constant. To make the banners work, they need to use a dynamid placeholder, where "0" must be "%d", thus: <!--@vbbanners:%d@-->

Some other valid examples:
@vbbanners:%d@
(mybanners:%d)
$my-ad-placeholder-%d-!

Thanks for your reaction, Ok, I've placed <!--@vbbanners:%d@--> in the header and in the options, is that ok? I still have nothing on my screen... (there's something missing... i Think but I don't see it...

Robert

RobbieZ 11-25-2009 11:23 AM

Quote:

Originally Posted by y2ksw (Post 1920638)
If you want to include the banners within CSS headers, you will have to create a script which loads and renders a custom vbulletin page with the banners only. I'm not sure though, if the CSS: url() is capable to load and handle scripts correctly. Please ask a HTML/CSS specialist for advice.

If the CSS is included in vbulletin (the CSS is not saved to disk), and the banners are image only, it should be fine to include a placeholder in the appropriate place. If you save your CSS to file, you will have to use a custom script.

Therefore my image would have to become background CSS image. I understand. Thanks.

y2ksw 11-25-2009 11:50 AM

Quote:

Originally Posted by Robert Waanders (Post 1920651)
Thanks for your reaction, Ok, I've placed <!--@vbbanners:%d@--> in the header and in the options, is that ok? I still have nothing on my screen... (there's something missing... i Think but I don't see it...

Robert

You have to place <!--@vbbanners:%d@--> in the options and <!--@vbbanners:0@--> in the template, in order to:

- make the placeholder dynamic: <!--@vbbanners:%d@-->
- show a rotating banner in position 0: <!--@vbbanners:0@-->

Concept of the placeholder: Common string which may become <!--@vbbanners:0@--> to <!--@vbbanners:9@--> by code. %d is a C++/PHP formatting placeholder which makes it possibile to script numeric formatting instead of hardcoding. Normally, you would simply ignore the presence of this option. Adversely, you would change this option, only if <!--@vbbanners:%d@--> does not work in your system.

Concept of a banner: Numeric constant which represents a number of banners to be shown at a position between 0-9. The script searches for <!--@vbbanners:0@--> to <!--@vbbanners:9@--> (previously inserted in your templates) and replaces each occurence, if available with a randomly assigned banner, to be shown at exactly that position.

Robert Waanders 11-25-2009 06:33 PM

Hello Giovanni,

Thank you for your very, very usefull posting. For some reason, i don't get the banners to show... very strange... I will puzzle on..

Robert


All times are GMT. The time now is 07:51 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.14391 seconds
  • Memory Usage 1,746KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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