Thread: Miscellaneous Hacks - Rotating Banner System
View Single Post
  #2115  
Old 11-30-2012, 05:56 PM
tibobdenazareth tibobdenazareth is offline
 
Join Date: Nov 2012
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Based on what I've done so far, here's a summary for anybody or especially newbie (like me) looking for a lot of things but doesn't want to go through hundreds of pages of info.

TO PLACE IN THE HEADER ... AS LOGO

Style Manager--> Edit Templates--> header

REPLACE: (from 3rd line)
<vb:if condition="$stylevar['titleimage']"><div><a name="top" href="{vb:link forumhome}" class="logo-image"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></div></vb:if>

WITH:
<vb:if condition="$stylevar['titleimage']"><div><a name="top" href="{vb:link forumhome}" class="logo-image"><!--@vbbanners:0@--></a></div></vb:if>

NB- There's an issue with the stand-alone swf flash file with no transparent background, covering all the login info found in the header template. Works better with png image files.

Still waiting to see if there's a way to send the swf logo banner file in the background.

------------------------------------

TO PLACE AFTER FIRST POST

Style Manager--> Edit Templates--> Ad location Templates--> ad_showthread_firstpost_sig

Add at the end: <div align="center"><!--@vbbanners:0@--></div>

NB- ad_showthread_firstpost_sig places the banner as a SIGNATURE after the first post;
ad_showthread_firstpost_start places the banner inside at the start of the first post
ad_thread_first_post_content places the banner in the content space of the first post (NOT WORKING FOR ME anyway)

-------------------------------------

TO PLACE 2 BANNERS SIDE BY SIDE (Horizontal)

1) Make sure the 2 banner dimensions will fit horizontally without overlapping, based on the total horizontal ad space in the site width. Both at the same position
since they will occupy just one "row" of space together. If you set them at diff position, it will work but this would be a waste of banner position. Instead of
using banners:0@ and banners:0@, use (for example) banners:0@ and banners:1@ [again, this is a waste of position 1]
2) Wherever you are insterting them just write the following code in the appropriate template: <div align="center"><!--@vbbanners:0@--><!--@vbbanners:0@--></div>

-------------------------------------

TO PLACE BANNERS EVERY 5th AND 10th POST

Style Manager--> Edit Templates--> Postbit Templates--> postbit_legacy

Paste the following code at the end:

<vb:if condition="THIS_SCRIPT == 'showthread' AND (($post['postcount'] % 15 == 10) OR $post['postcount'] == 10)">
<div class="thread_controls">
<div style="width: 100%; text-align: center">
<!--@vbbanners:3@-->
</div>
</div>
<vb:elseif condition="THIS_SCRIPT == 'showthread' AND (($post['postcount'] % 15 == 5) OR $post['postcount'] == 5)" />
<div class="thread_controls">
<div style="width: 100%; text-align: center">
<!--@vbbanners:4@-->
</div>
</div>
</vb:if>

NB- This code assumes you have already created at position 3 a banner to be placed after every 10th post and a position 4 banner after every 5th post.
Feel free to adjust according to your banner list settings. You may even include 2 banners at the same position in those codes. See above for instructions.

------------------------------------

Hope that helps.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01922 seconds
  • Memory Usage 1,769KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete