Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2009, 10:29 AM
CeesT CeesT is offline
 
Join Date: Feb 2008
Location: the Netherlands
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to show ads in showthread?

I am preparing my template (using RC4) and like to have an ad at the bottom of showthread-pages, just above the "previous thread / next thread" links. There is no ad_position template for this in VB4.

Basically I need the same ad which I use in forumdisplay, there we have "ad_location.forum_below_threadlist". In this template I have the adsense code, which works fine in forumdisplay.php.

In template "FORUMDISPLAY" there is a line:
Code:
{vb:raw ad_location.forum_below_threadlist}
which shows the adsense content in forumdisplay-screen fine.

I have put the same above-mentioned code in "SHOWTHREAD" template, but the code does not show in the page-code (checked with firebug). However when I put the complete adsense code directly in SHOWTHREAD template (on the same place (where the "vb:raw" line was) it works fine. It seems that the "vb:raw" line does not work, so I can not use the "ad_location" templates here.

Why does the "vb:raw" not work in SHOWTHREAD, while it works fine in FORUMDISPLAY template ? Is this a RC-4 problem or something I forgot to do ?
Reply With Quote
  #2  
Old 12-20-2009, 10:56 AM
Attitude5ire's Avatar
Attitude5ire Attitude5ire is offline
 
Join Date: Feb 2006
Posts: 791
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should use Ad Location templates, within which u'll find 4 showthread ad locations.
I would suggest to just select one of those templates and then editing 'Showthread' template as to where that Ad location template appears.
Reply With Quote
  #3  
Old 12-20-2009, 12:16 PM
CeesT CeesT is offline
 
Join Date: Feb 2008
Location: the Netherlands
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Attitude5ire View Post
You should use Ad Location templates, within which u'll find 4 showthread ad locations.
I would suggest to just select one of those templates and then editing 'Showthread' template as to where that Ad location template appears.
Basically your suggestion works, added one of the 'showthread' ad locations to 'showthread' template. But then I have to remove the ad-location from the original place, which is not the 'showthread' template, but the postbit and postbit-legacy.

To prevent extra work after a VB template update, I would prefer to use a custom template for this, but I can not get this working too.
I have added a new template called "ad_next_prev" and it shows in the template list under 'Custom Templates'. But is also does not show when I change the template name from the showthread-template to the custom template name.

Does it need extra work in css files before a (custom) template is shown?
Reply With Quote
  #4  
Old 12-20-2009, 04:39 PM
Attitude5ire's Avatar
Attitude5ire Attitude5ire is offline
 
Join Date: Feb 2006
Posts: 791
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for custom templates to work i believe u need to add Hook and plugins to actually link them to template, i duno how vb4 plugin or hook works but u might want to ask arnd coding area on how to link custom templates. Just adding new template doesnt do the trick.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:00 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.03577 seconds
  • Memory Usage 2,190KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete