vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Forum Home Enhancements - Add new Ad Location to ForumHome (https://vborg.vbsupport.ru/showthread.php?t=195442)

vietfancy 11-03-2008 10:00 PM

Add new Ad Location to ForumHome
 
If you noticed, by default in "ad_location_template" group; we only have "ad_forumhome_afterforums" but not "ad_forumhome_beforeforums".

If you need to add "ad_forumhome_beforeforums" to your forum homepage then here is what you need to do:

1. Create a new template as ad_forumhome_beforeforums
2. In index.php

find:
Code:

    'ad_forumhome_afterforums',
add below:
Code:

    'ad_forumhome_beforeforums',
find:
Code:

eval('$ad_location[\'ad_forumhome_afterforums\'] = "' . fetch_template('ad_forumhome_afterforums') . '";');
add below:
Code:

eval('$ad_location[\'ad_forumhome_beforeforums\'] = "' . fetch_template('ad_forumhome_beforeforums') . '";');
3. Open ForumHome template, and add $ad_location[ad_forumhome_beforeforums] right after $navbar

demo: http://lacloi.com

SEOvB 11-05-2008 02:41 AM

why would you do file edits for a simple template edit?

You have to edit the template to put your variable in it, so i can't think of a reason why you'd do it like this?

timrox 11-06-2008 10:23 AM

thanks for the tip.. It is a bit of overkill for the example you gave because (as FRDS mentioned) it only get used once, where you could just modify the template, but it is useful if you use it in more than one place.

Couldn't you make it as a plugin instead of a file edit? (I'm a noob at this vb hacking)

sarahk 12-08-2008 12:32 AM

How would you add an ad between sections on the homepage?

rabeel 06-02-2012 03:49 AM

demo is not working.


All times are GMT. The time now is 09:19 AM.

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.01860 seconds
  • Memory Usage 1,717KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete