The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Template Error After Server Move
What could cause the following error when trying to view posts after a server move? And does anyone have any idea how to fix it?
Quote:
|
#2
|
|||
|
|||
I thought you of all people would give more info then that!
What is on line 292 of class_postbit.php (what hook/template)? What is on line 24 of that template/plugin? According to a quick google search 'private' is now a PHP Keyword/constant, using somthing like $vbphrase[private] is probably causing you an error, are you running PHP5? |
#3
|
||||
|
||||
Quote:
The line in the class_postbit.php is: Code:
eval('$postbit = "' . fetch_template($this->templatename) . '";'); HTML Code:
<if condition="THIS_SCRIPT != private AND !$show['moderated'] AND $post['threadid']"><a href="printpost.php?$session[sessionurl]t=$post[threadid]&p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" border="0" /></a></if> |
#4
|
|||
|
|||
By testing against a string value.
|
#5
|
||||
|
||||
Ok, I added the single quotes around it and that fixed it. Is that how we had to do it for all of those now when we have the AND in there? Or just for private? And are there any other things I should know about PHP 5 and the templates?
And thank you for sending me in the right direction. PHP 5 is not every forgiving it seems. Code:
<if condition="THIS_SCRIPT != 'private' AND !$show['moderated'] AND $post['threadid']"><a href="printpost.php?$session[sessionurl]t=$post[threadid]&p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" border="0" /></a></if> How do we do that, sir? |
#6
|
|||
|
|||
You just did it by adding quotes.
|
#7
|
||||
|
||||
Ahh, so I really should have been doing that all along, even in PHP 4, huh?
Thank you for the info, Marco. |
#8
|
|||
|
|||
Yes you should always do that. Otherwise it will only work if the string is not also defined as constant or is a reserved word. Without quotes you are trusting on luck if it will work or not.
|
#9
|
||||
|
||||
I can't believe I did it that way. I always do the quotes when I do it without the AND. Must have been an off day there.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|