The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add new temp but error
I created a new temp for my product but faulty:
Code:
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\forum\includes\class_core.php(4633) : eval()'d code on line 90 this is code my temp test: Code:
<div class="blockrow"> <label for="pmrecips_ctrl" class="floatcontainer full"> {vb:rawphrase recipients}: <span class="hidden" onclick="return swapbcc(this);" id="bccspan">[<a href="javascript://" >{vb:rawphrase bcc}</a>]</span> </label> <script type="text/javascript" src="clientscript/vbulletin_ajax_suggest.js?v={vb:raw vboptions.simpleversion}"></script> <div id="pmrecips" class="popupmenu nomouseover noclick nohovermenu"> <textarea class="primary full textbox popupctrl" id="pmrecips_ctrl" name="recipients" rows="{vb:if is_browser('mozilla'), 1, 2}" cols="50" tabindex="1">{vb:raw pm.recipients}</textarea> </div> <script type="text/javascript"> <!-- recip_sugg = new vB_AJAX_NameSuggest('recip_sugg', 'pmrecips_ctrl', 'pmrecips'); <vb:if condition="$show['sendmultiple']">recip_sugg.allow_multiple = true;</vb:if> //--> </script> <p class="singledescription">{vb:rawphrase recipients_desc}</p> </div> Code:
$templater = vB_Template::create('test'); $test .= $templater->render(); $vbulletin->templatecache['newthread'] = str_replace('\' . $messagearea . \'', '<div class="blockrow">' . $test . '</div>\' . $messagearea . \'', $vbulletin->templatecache['newthread']); |
#2
|
|||
|
|||
What's in the template cache is php code, and I'd guess that the result of your str_replace() is php code with an error. But I don't know for sure because I'm not sure what $messagearea is set to.
|
#3
|
|||
|
|||
I just test 1 plugin and 1 temp was above fault, but when I remove the code
Quote:
I want to create a username input (as in page send private) when users create new thread |
#4
|
|||
|
|||
Try this..
Code:
$vbulletin->templatecache['newthread'] = str_replace($messagearea, '<div class="blockrow">' . $test . '</div>' . $messagearea, $vbulletin->templatecache['newthread']); |
#5
|
|||
|
|||
thank you, no error but not show in temp
|
#6
|
|||
|
|||
Wait a second there is no $messagearea in the template you're trying to replace it in.
You want something like this... Code:
$vbulletin->templatecache['newthread'] = str_replace('{vb:raw messagearea}', '<div class="blockrow">' . $test . '</div>' . '{vb:raw messagearea}', $vbulletin->templatecache['newthread']); |
#7
|
|||
|
|||
not show
My first code it displays fine if removing line PHP Code:
|
#8
|
||||
|
||||
Template cache is compiled so this {vb:raw messagearea} becames $messagearea if i'm not wrong.
You can try this PHP Code:
|
#9
|
|||
|
|||
Quote:
|
#10
|
|||
|
|||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|