10
does someone have an opinion about this????
I already tried this:
if ( !empty( $isnew ) )
{
$notification_handler -> triggerEvent( 'story', $story -> storyid(), 'approve', $tags );
// } DELETED BY ME
$notification_handler -> triggerEvent( 'global', 0, 'new_story', $tags );
/*
$poster = new XoopsUser($story->uid());
$subject = _AM_ARTPUBLISHED;
$message = sprintf(_AM_HELLO,$poster->uname());
$message .= "nn"._AM_YOURARTPUB."nn";
$message .= _AM_TITLEC.$story->title()."n"._AM_URLC.XOOPS_URL."/modules/".$xoopsModule->dirname()."/article.php?storyid=".$story->storyid()."n"._AM_PUBLISHEDC.formatTimestamp($story->published(),"m",0)."nn";
$message .= $xoopsConfig['sitename']."n".XOOPS_URL."";
$xoopsMailer =& getMailer();
$xoopsMailer->useMail();
$xoopsMailer->setToEmails($poster->getVar("email"));
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
$xoopsMailer->setFromName($xoopsConfig['sitename']);
$xoopsMailer->setSubject($subject);
$xoopsMailer->setBody($message);
$xoopsMailer->send();
} //ADDED BY ME
*/
}
redirect_header( 'index.php?op=newarticle', 1, _AM_DBUPDATED );
exit();
break;
see the comments. But it seems like now there will be no notification sent at all when creating new articles.