![]() |
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"> Code:
$templater = vB_Template::create('test'); |
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.
|
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 |
Try this..
Code:
$vbulletin->templatecache['newthread'] = str_replace($messagearea, '<div class="blockrow">' . $test . '</div>' . $messagearea, $vbulletin->templatecache['newthread']); |
Quote:
|
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']); |
not show :(
My first code it displays fine if removing line PHP Code:
|
Template cache is compiled so this {vb:raw messagearea} becames $messagearea if i'm not wrong.
You can try this PHP Code:
|
Quote:
|
Quote:
|
It could be a problem of the condition try to remove only the condition and leave the rest of the code just to see
--------------- Added [DATE]1372173285[/DATE] at [TIME]1372173285[/TIME] --------------- else use this code by Boofo in the "parse_templates" hook PHP Code:
|
Quote:
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\forum\includes\class_core.php(4633 ) : eval()'d code on line 91 |
Mmh did you use "parse_templates" as hook location? If yes then i don't know what's the problem maybe this one is a little tricky but it should 100% works
Hook: parse_templates PHP Code:
|
1 Attachment(s)
Quote:
Attachment 145574 |
What's your exact code plugin?
|
1 Attachment(s)
yes :)
|
this is the final code just replace "your template code" with your template code and it will work fine unless you won't escape quotes :)
PHP Code:
|
not work, you can TeamViewer help me :(
I need to create a user name is entered in newthread, and the user name are displayed like private.php page?do=newpm |
My code is working? Do you want to add an input in the newthread page where users put username?
|
Quote:
I want to create a new thread, enter username like this Attachment 145576 |
That's not easy as it seems that's a lot of work! You can't copy and paste codes from pm templates :) and even if you get this working on newthread page there is other works to do in the thread creation process! Just to know why do you need this? :)
|
You don't enter usernames in the newthread area though...
|
I feel good and this is the function. I want to try it or to create new thread.
|
Why... you don't send new threads to people. You'd have to completely disable the ckeditor and add the custom code to it, or rewrite the vBulletin code to work inside of it (ckeditor).
|
Quote:
|
blabla, i have done :D
|
Yes but this doesn't make sense after you put an username what do you expect from it? I mean nothing will happen :D
|
What does that field even do though?
|
All times are GMT. The time now is 06:50 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|