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 04-19-2011 09:00 PM

Quote:

Originally Posted by nick221 (Post 2185127)
Installed mod fine. I can place banners no problem. It's my understanding that I can have as many banners as I want say in Horizontal (0) Banner list and they will all rotate in one after the other. If this is correct it doesn't work for me. Any ideas to help me figure it out?

They will rotate randomly and they do ;)

You may check this if you disable the ones you have already seen. If they don't show you probably haven't setup the right rule.

You may need to use refresh on yourself, but on a life site the banners rotate very well and almost evenly.

y2ksw 04-19-2011 09:02 PM

Quote:

Originally Posted by strudinox (Post 2186384)
I'm not sure if my question has been answered somewhere in the previous 80+ pages, but is there a way to add more locations?

It was answered in the way that each single location can be reused for N banners and rarely you would find enough occasions to use all 10 banner locations together ;)

strudinox 04-19-2011 09:15 PM

Quote:

Originally Posted by y2ksw (Post 2186436)
It was answered in the way that each single location can be reused for N banners and rarely you would find enough occasions to use all 10 banner locations together ;)

Yeah, I understand that for 99% of sites out there. I'm putting together a site where I need many more. Would adding more locations be hard to incorporate?

y2ksw 04-20-2011 06:02 AM

Quote:

Originally Posted by strudinox (Post 2186440)
Yeah, I understand that for 99% of sites out there. I'm putting together a site where I need many more. Would adding more locations be hard to incorporate?

Pretty much ... it will need several additions in many places and in the end it will slow down the process of parsing the banners into the pages.

You are free to do these changes for your own ... I don't like to sound cynical but 10 locations are really enough if you use them together with all other imaginable filters (usergroups, sections, date/time) :) I agree with you, if you skip these settings and make it a location based setup. But you can reuse one location, for example, to show in each of your forum sections a different and dedicated banner set. Most banner software is location based, and this means you have to create for each banner a location. Here, you can use one location for many different banners and the scope can be different.

strudinox 04-20-2011 02:34 PM

Thanks for your reply. If it requires that many changes to the code, then I won't worry about it. The reason I need so many is I planned to use this mod for an additional use alongside advertizing while using custom placement via the code tag.

Maybe creating additional locations can be an additional future in the future? :)

y2ksw 04-20-2011 05:06 PM

Quote:

Originally Posted by strudinox (Post 2186671)
Thanks for your reply. If it requires that many changes to the code, then I won't worry about it. The reason I need so many is I planned to use this mod for an additional use alongside advertizing while using custom placement via the code tag.

Maybe creating additional locations can be an additional future in the future? :)

I see that you would need at most 2 locations. 1 location for the site advertising and another for the code tag. Since you can define a different banner for each forum section and still use the same location (tag code), each code tag would require just as many banners of that section in the database as you probably may show on a single page. Say you have 10 posts and 5 code tags per page, you may use location 0 five times on the same page and setup 5 different (or same) banners for that forum section, and you are done. If you need the same scheme on another section but different banners, you just filter that section with another 5 banners. And in the same time you have still 9 locations to fit your site advertising much the same way :)

strudinox 04-20-2011 05:37 PM

Ohhh, that makes sense, I didn't know you could use the same code tag with the same ID multiple times on the same page. In that case, 9 locations should be plenty! Thanks for your help on this one

valdet 05-13-2011 10:38 AM

Hi Giovanni,

I am trying to have my banners (for guests only) between the first and second post of my threads. However it is not showing the banners at all

Here is the code I am using on postbit_legacy:

Code:

<if condition="$show['guest']">
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) and !$GLOBALS['vbulletin']->GPC['ajax'])">

<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr><br />
<td align="center">
#reklama:2#
</td>
</tr>
</table>

</if>
</if>

I have the same custom code/ placeholder (#reklama:2#) working just fine in navbar template, but it is showing blank in postbit_legacy.

Any hints how to make this work ?

Thanks for your time.

y2ksw 05-13-2011 04:59 PM

Maybe:

($post[postcount] % $vboptions[maxposts]) == 1

makes the difference? I believe without extra parentesis it operates as if:

$post[postcount] % ($vboptions[maxposts] == 1)

The expression may fail due to a division by 0 and thus never execute ...

valdet 05-14-2011 10:19 AM

Quote:

Originally Posted by y2ksw (Post 2195180)
Maybe:

($post[postcount] % $vboptions[maxposts]) == 1

makes the difference? I believe without extra parentesis it operates as if:

$post[postcount] % ($vboptions[maxposts] == 1)

The expression may fail due to a division by 0 and thus never execute ...

The conditional statement which I posted works in every other case. It is working for rotating banners through a simpler mt_rand () plugin. Though I like your solution better, due to tracking capabilities and better banners management.

Here's a sample link with banner (through mt_rand() plugin) between first and second post.

http://www.insurance-forums.net/foru...-t30355-3.html

Note the banner, on navbar is produced by your product but the one between first and second posts is the other plugin. If you have time to check, in that link, I left the placeholder between the banner and the Quick Register form. You will notice it is returning a blank.


I may be wrong so please correct if I am doing so, but my assumption is that the limitation that it should only be run on global_complete hook is maybe causing to stop displaying in postbit_legacy.


Thanks,
Val.


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