2012-01-05, 09:37 AM
Hello, I'm writing a plugin for the warning system... (So I don't know if this has to be moved in the Development section..) And here is what I get:
And the error came out only today .__.
Quote:Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting '}' in C:\xampp\htdocs\mybb16\inc\plugins\warnnotinfraction.php(138) : eval()'d code on line 36This is my function:
function warn_pm()
{
// Unfortunately, we've to globalize many variables...
global $mybb, $send_pm_checked, $message, $lang, $user;
global $pm_notify, $templates, $smilieinserter, $pm_subject, $codebuttons;
global $send_pm_forced;
// It's always a good idea to send a notify to the user. (IMO)
$send_pm_checked = ($mybb->settings['wsi_force_pm']) ? "checked=\"checked\"" : "";
$send_pm_forced = ($mybb->settings['wsi_force_pm']) ? "return false; " : "";
// Are we coming here from a post?
if($mybb->input['pid'])
{
$warnedpost = get_post($mybb->input['pid']);
$message = $lang->sprintf($lang->warning_pm_message, $user['username'], $mybb->settings['bbname'], $lang->sprintf($lang->wsi_msg, $warnedpost['username'], $warnedpost['message'], $mybb->settings['bburl'], $mybb->input['pid']), '{points}');
}
else // No, we're coming here from profile.
{
$message = $lang->sprintf($lang->warning_pm_message, $user['username'], $mybb->settings['bbname'], '{points}', "");
}
eval("\$pm_notify = \"".$templates->get("warnings_warn_pm")."\";"); // We've to get this template again to apply changes.
}
The hook is warnings_warn_end... I can't see any error And the error came out only today .__.