![]() |
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', Code:
'ad_forumhome_beforeforums', Code:
eval('$ad_location[\'ad_forumhome_afterforums\'] = "' . fetch_template('ad_forumhome_afterforums') . '";'); Code:
eval('$ad_location[\'ad_forumhome_beforeforums\'] = "' . fetch_template('ad_forumhome_beforeforums') . '";'); demo: http://lacloi.com |
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? |
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) |
How would you add an ad between sections on the homepage?
|
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|