The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Is it possible to fetch a template in a plugin and then output the template?
I'm trying to do it and it doesn't seem to work for me..... |
#2
|
|||
|
|||
![]() Code:
eval('$YourTemplate = "' . fetch_template('YourTemplate') . '";'); How did you define the template? What hook to use? |
#3
|
|||
|
|||
![]()
OK, that does seem to almost work. I'm sure I'd tried it numerous times and it didn't work. I'm using the global_start hook as I'm trying to add the template copy to custom header. This is my template I'm fetching....
HTML Code:
<if condition="$show['notifications']"> <b><a href="{$channel_fix}usercp.php$session[sessionurl_q]">$vbphrase[your_notifications]:</a> $notifications_total</b> <script type="text/javascript" src="clientscript/vbulletin_notifications_nopopups.js?v=$vboptions[simpleversion]"></script> <script type="text/javascript"> vBulletin.register_control("vB_Notifications_NoPopups", "notifications"); </script> <else /> <b><a href="{$channel_fix}private.php$session[sessionurl_q]">Private Messages</a>: $vbphrase[unread_x_nav_compiled], $vbphrase[total_x_nav_compiled].</b> </if> --------------- Added [DATE]1234238099[/DATE] at [TIME]1234238099[/TIME] --------------- OK, used parse_templates hook instead and it's all good. Cheers! |
#4
|
||||
|
||||
![]()
As you've found out, the phrase variable does not exist at global_start yet.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|