Quote:
Originally Posted by Lynne
You can't have all those conditions and phrases in there and line breaks. Try taking a look at what the template cache looks like in the database. *That* is what you are trying to look at and it doesn't look like what you have above. Why don't you just remove that code from the postbit(_legacy)? What is wrong with that?
|
Nothing - actually, just after I posted that I co. Could easily solve all that by just adding manually a simple if condition. Easy peasy.
Last question though... now I really don't understand. I'm replacing a small template with an extra line of HTML and it's giving me another error?
Parse error: syntax error, unexpected T_STRING in /home/www/f/includes/functions_editor.php(583) : eval()'d code on line 1
PHP Code:
global $vbulletin;
if($vbulletin->options['hide_attach_enable']) {
$find = '</div>';
$replace = '<label for="cb_hideattach"><input type="checkbox" name="hideattach" id="hideattach" /></label></div>';
$vbulletin->templatecache['newpost_disablesmiliesoption'] = str_replace($find, $replace, $vbulletin->templatecache['newpost_disablesmiliesoption']);
}
I'm trying to replace the last </div> with one more option, then end the div, and it's not seeming to work... I'm using the hook newreply_form_start. Do I need a different location?
Nevermind.
Easy fix for this is escape all the double quotes. \" Oops. =p