Kinneas
05-23-2008, 02:01 PM
I'm still very new to this, so sorry if the answer is obvious.
I'm just trying to create a simple plugin which will auto insert into postbit. The aim at the moment is just to put something after the MSN/AIM icons. I've been able to insert just text, but not a lot more.
The plugin code is here:
eval('$templateblah = "' . fetch_template('testblah') . '";');
$find = '<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]';
$replace = "$templateblah";
$vbulletin->templatecache['postbit'] = str_replace($find, $find . $replace, $vbulletin->templatecache['postbit']);
Now in the template "testblah", if I just put random text in it's fine, but if I try and do any html with hyperlinking (Eg, <a href="blah">Hello</a>, it throws a wobbly and gives me lines of :
Parse error: syntax error, unexpected T_STRING in /home/mrmb/public_html/testforum/includes/class_postbit.php(292) : eval()'d code on line 71
It works without the quotation marks (Eg, <a href=blah>Hello</a>) but surely that's not the way it should be done?
Can anyone help?
I'm just trying to create a simple plugin which will auto insert into postbit. The aim at the moment is just to put something after the MSN/AIM icons. I've been able to insert just text, but not a lot more.
The plugin code is here:
eval('$templateblah = "' . fetch_template('testblah') . '";');
$find = '<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]';
$replace = "$templateblah";
$vbulletin->templatecache['postbit'] = str_replace($find, $find . $replace, $vbulletin->templatecache['postbit']);
Now in the template "testblah", if I just put random text in it's fine, but if I try and do any html with hyperlinking (Eg, <a href="blah">Hello</a>, it throws a wobbly and gives me lines of :
Parse error: syntax error, unexpected T_STRING in /home/mrmb/public_html/testforum/includes/class_postbit.php(292) : eval()'d code on line 71
It works without the quotation marks (Eg, <a href=blah>Hello</a>) but surely that's not the way it should be done?
Can anyone help?