Quote:
|
Go for it. An unnamed dev gave it to me a long while back.
|
Hey all,
I think i'm being really dumb here, looking for some help. In my Navbar Template i want to call another template that i want to create, rather that adding code irectly into the navbar template. Am i right in thinking that i have to register the code in a php file on the server, or can i do this all via a plug in and templates? if so, does anyone have some code for a simple example, i.e. call 1 new template from within another VB default template? - I ask because unless i am mistaken what i've read thus far seems to focus more on adding code to PHP files. Currently running 4.1.10. The template I want to call from navbar template is called memberbar_basic. |
Quote:
Code:
$templater = vB_Template::create('memberbar_basic'); and you would put {vb:raw memberbar_basic} in the navber template. Hook location parse_templates would probably be a good place for your plugin. |
Hiya,
Thanks for responding - I can't seem to get it to work though, let me review whats currently configured. Template = memberbar_member_basic Template content = memberbar member basic test. Plugin name = memberbar_member_basic Plugin Hook = Parse Templates Plugin Content = PHP Code:
I tried moving {vb:raw memberbar_member_basic} to other templates, specifically forumhome but its still not rendering. would i have to use variables? if so, is there a guide/overview of what variables would bee needed anywhere? Thanks B |
Off hand there's a typo in the middle line, it's missing the first "m" in "memberbar"
If that error is in your real code it wouldn't work. |
haha, now i do really feel stupid....
ok, modified my thread correcting the typo and im please to say its working!.. /grabs coat.. (p.s. thank you!) --------------- Added [DATE]1330432890[/DATE] at [TIME]1330432890[/TIME] --------------- --------------- Added [DATE]1330432974[/DATE] at [TIME]1330432974[/TIME] --------------- Progressing from my previous query. I need to register some variables to allow notifications to be registered in my plugin (Post # 216) I've tried following this guide here.. https://www.vbulletin.com/forum/show...ons-menu-place I attempted the following, to no avail. Plugin name = memberbar_member_basic Plugin Hook = Parse Templates Plugin Content = PHP Code:
Code moved. PHP Code:
Thanks B |
Progressing from my previous query.
I need to register some variables to allow notifications to be registered in my plugin (Post # 216) I've tried following this guide here.. https://www.vbulletin.com/forum/show...ons-menu-place I attempted the following, to no avail. Plugin name = memberbar_member_basic Plugin Hook = Parse Templates Plugin Content = PHP Code:
Code moved. PHP Code:
Thanks B |
OK, I have done.
|
PHP Code:
PHP Code:
PHP Code:
|
All times are GMT. The time now is 10:56 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|