View Single Post
  #4  
Old 10-27-2006, 06:06 PM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In Template FORUMHOME > forumhome_forumbit_level1_post

PHP Code:
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if> 
In template FORUMHOME > forumhome_forumbit_level2_post
PHP Code:
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if> 

Those are where you need to insert your banner.

You're replacing the forum description (leaving the forum title) with an image of your choice. Make sure to set the hight and width of the image tag.

You'd have to come up with a way to only display it on the sponsor forums though which makes it a bit more complicated.

If you want it done quick and dirty I would say:

Make a folder called banners or ads or something.

Then insert a quick <img src="./banners/$forum[forumid].gif" height="whatever" width="whatever" border="0"> after the forum description in the code above.

Then make an image that is 1x1 pixels, transparent.

Now look at the forumid's of all your forums. Every sponsor forum (lets say 20,21,22,23) will try to load the corresponding image (ie. forum21 will load 21.gif, forum22 = 22.gif, etc).

So you name your banners according to the forumid's.

All the other forums without any ads will still try to load for example 1.gif, 2.gif etc... so you take that clear 1x1 pixel image you made and call it 1.gif, 2.gif, etc. Enough so all your non-sponsor forums will have a clear image.

That should take care of it, being quick and dirty.


If you want it done right, you'll need an extra field in the forums via the admincp so you can enter your own image name and then set a conditional in the template so that when there's a name in the field it will load the image and when the field is blank or 0 it won't load an image.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01077 seconds
  • Memory Usage 1,777KB
  • 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
  • (2)bbcode_php
  • (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