when i try to activate a plugin i get this error.
Fatal error: Cannot redeclare find_replace_templatesets() (previously declared in /home/145642/public_html/forum/inc/adminfunctions_templates.php:22) in /home/145642/public_html/forum/inc/adminfunctions_templates.php on line 101
Attach the copy of that plugin file here.
(2010-12-05, 11:30 PM)Yaldaram Wrote: [ -> ]Attach the copy of that plugin file here.
<snip>
[attachment=20680]
There is no error in the plugin BTW. There is something else that is doing the issue.
Find both occurrences of:
require "../inc/adminfunctions_templates.php";
change to:
require_once "../inc/adminfunctions_templates.php";
(2010-12-05, 11:35 PM)MattRogowski Wrote: [ -> ]Find both occurrences of:
require "../inc/adminfunctions_templates.php";
change to:
require_once "../inc/adminfunctions_templates.php";
now i get the same error when i activate it.
(2010-12-05, 11:36 PM)Dark Byte Wrote: [ -> ] (2010-12-05, 11:35 PM)MattRogowski Wrote: [ -> ]Find both occurrences of:
require "../inc/adminfunctions_templates.php";
change to:
require_once "../inc/adminfunctions_templates.php";
now i get the same error when i activate it.
Try to change them like this;
require MYBB_ROOT."/inc/adminfunctions_templates.php";
Did you change them both, and you're sure the file is saved?? You're getting this error because ./inc/adminfunctions_templates.php is being called more than once, this code stops that.
I've also unapproved the attachment you posted, labrocca's plugins can't be redistributed.
(2010-12-05, 11:42 PM)MattRogowski Wrote: [ -> ]Did you change them both, and you're sure the file is saved?? You're getting this error because ./inc/adminfunctions_templates.php is being called more than once, this code stops that.
I've also unapproved the attachment you posted, labrocca's plugins can't be redistributed.
yes i did. and deleted the old file and re uploaded the edited code. this only fixed the deactivation when i activate it i get the error.
Try this;
<snip>
It should work.