Hi all,
I have tried this and it works good however it only works within vb if I try to use the same template in vba it does not? any help will be appreciated Product: vBulletin Hook Location: global_start Code:
eval('$adv_portal_rotating_articles = "' . fetch_template('adv_portal_rotating_articles') . '";'); |
global_start is too early
try global_setup_complete instead |
Quote:
Still not working if i use this $adv_portal_rotating_articles in forumhome or any vb page it works fine but not in vba --------------- Added [DATE]1249411354[/DATE] at [TIME]1249411354[/TIME] --------------- Quote:
it should be defined through CMPS CP |
or also $GLOBALS[adv_portal_rotating_articles] should also work;)
|
Quote:
Quote:
Quote:
Quote:
I can get the contents of my test template to show, but it escapes my quotes within my HTML, so no styling is applied. :( --------------- Added 12 Oct 2009 at 12:11 --------------- Here's the code that I used: 2 plugins: 1] location: "global_start" name: "test_template_plugin" with followign code: PHP Code:
name: "Cached - test_template" with followign code: PHP Code:
my template contents (test_template) (VERY simple) HTML Code:
<table class="test_template_table"> --------------- Added [DATE]1255400076[/DATE] at [TIME]1255400076[/TIME] --------------- I was trying to follow the advice of the first post that I quoted, and it just didn't work. I changed the first plugin to include the eval() code for my variable, and it worked properly. :) Sorry for the bother. :) |
This is a best way to add a template to a product in vb4?
|
Also would like to know if this article is still valid? Anyone can provide us with some confirmation please.
|
No this is only valid for the 3.x series of vBulletin. Check the VB 4.x Articles section for more relevant articles.
|
but why not working in STANDARD_REDIRECT template ? how can i do?
|
I have tried everything you have provided to the very letter, and it simply doesn't work at all... the variable is always null when I call for it in the template.
I'm trying to add a custom template to the forumhome_forumbit_level1_post template. What am I doing wrong!? Here's how I have it set up: New Custom Template - title is: sponsorForumButtons Right now I just have it filled with "TESTING THE NEW TEMPLATE" I have added a new Plugin, which is active, in global_start (I've tried in forumdisplay_complete, forumdisplay_start, global_complete, all the forumhome hooks... I've tried every single hook location I could think of... none seem to work) This is the exact code of the Plugin: //Sponsor Forum Buttons eval('$sponsorForumButtons = "' . fetch_template('sponsorForumButtons') . '";'); Then in the forumhome_forumbit_level1_post template I have: $sponsorForumButtons Right where I want it to show up. No matter what I try the variable just doesn't show up... even if I EXPLICITLY set the variable in the forumdisplay_start (or any other) hook... shouldn't the global_complete hook be available to every template!? Even so, how is it that the variable is ALWAYS null? It seems like the variable will show up in the FORUMDISPLAY template, but if I put it into the forumhome_forumbit_level1_post template, the variable is inexplicably null. I have even tried to cache the template in cache_templates and parse_templates. That code looks like this: $globaltemplates[]='sponsorForumButtons'; NOTHING WORKS! I am having a nervous breakdown. Please save me from killing myself... |
All times are GMT. The time now is 03:37 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|