The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[SOLVED]Removing escapes from fetched template in parse_templates plugin
I created a plugin to fetch a template and append it to a custom template hook, the problem is the page renders it with escapes which cause it to not function.
this is my plugin: Code:
<plugin active="1" executionorder="5"> <title>parse templates</title> <hookname>parse_templates</hookname> <phpcode><![CDATA[ $template_hook['drc_foot'] .= fetch_template('drc_tst'); ]]></phpcode> </plugin> Code:
<template name="drc_tst" templatetype="template" date="0" username="DrCustUmz" version="1.0"><![CDATA[ <script type="text/javascript" src="test.js"></script> ]]></template> HTML Code:
<!-- BEGIN TEMPLATE: drc_tst --> <script type=\"text/javascript\" src=\"test.js\"></script> <!-- END TEMPLATE: drc_tst --> --------------- Added [DATE]1462226052[/DATE] at [TIME]1462226052[/TIME] --------------- I seemed to have made it work by evaling the template as a variable before appending it, Im not sure this is the best way to go about this all I know is it worked. Any comments? Code:
eval('$drctst = "' . fetch_template('drc_tst') . '";'); $template_hook['drc_foot'] .= $drctst; |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|