11
Here is the code for the AMS mod, use ctrl+F (find) to find where to implement the following text in its submit.php
$notification_handler->subscribe('story', $story->storyid(), 'approve', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
}
}
// Increment author's posts count (only if it's a new AmsStory)
// First case, it's not an anonyous, the story is approved and it's a new story
if($uid && $approve && empty($storyid)) {
$tmpuser=new xoopsUser($uid);
$member_handler =& xoops_gethandler('member');
$member_handler->updateUserByField($tmpuser, 'posts', $tmpuser->getVar('posts') + 1);
}
// Second case, it's not an anonymous, the story is NOT approved and it's NOT a new story (typical when someone is approving a submited story)
if(is_object($xoopsUser) && $approve && !empty($storyid)) {
$storytemp = new NewsStory( $storyid );
if(!$storytemp->published() && $storytemp->uid()>0) { // the article has been submited but not approved
$tmpuser=new xoopsUser($storytemp->uid());
$member_handler =& xoops_gethandler('member');
$member_handler->updateUserByField($tmpuser, 'posts', $tmpuser->getVar('posts') + 1);
}
unset($storytemp);
}
// Manage upload(s)