2008-04-08, 03:19 AM
Can someone give me some help with this find_replace_templatesets.
I am making (my first plugin) a plugin that will add a link to your home page in just before the search link up the top. I am modelling it of the forum message plugin but i have run into a few problems.
I need to find:
So i am using:
But it spits this error:
Parse error: syntax error, unexpected T_CLASS in D:\xampp\htdocs\MYBB\inc\plugins\homelink.php on line 61
I have tryed all sorts of other things but i think there must be something i am missing.
Thanks,
Ps. Line 61 is the code above.
I am making (my first plugin) a plugin that will add a link to your home page in just before the search link up the top. I am modelling it of the forum message plugin but i have run into a few problems.
I need to find:
<div class="menu">
<ul>
And replace it with <div class="menu">
<ul>
<li><a href="{$mybb->settings['homeurl']}"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/on.gif" alt="" />Home</a></li>
So i am using:
find_replace_templatesets('header, '<div class="menu"><ul>', '<li><a href="{$mybb->settings['homeurl']}"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/on.gif" alt="" />Home</a></li>');
But it spits this error:
Parse error: syntax error, unexpected T_CLASS in D:\xampp\htdocs\MYBB\inc\plugins\homelink.php on line 61
I have tryed all sorts of other things but i think there must be something i am missing.
Thanks,
Ps. Line 61 is the code above.