Beispiel #1
0
     phorum_api_user_subscribe($message["user_id"], $message["thread"], $PHORUM["forum_id"], $subscribe_type);
 } elseif ($mode == 'reply') {
     phorum_api_user_unsubscribe($message["user_id"], $message["thread"]);
 }
 if ($PHORUM["DATA"]["LOGGEDIN"]) {
     // Mark own message read.
     phorum_db_newflag_add_read(array(0 => array("id" => $message["message_id"], "forum" => $message["forum_id"])));
     // Increase the user's post count.
     phorum_api_user_increment_posts();
 }
 // Actions for messages which are approved.
 if ($message["status"] > 0) {
     // Update forum statistics.
     phorum_db_update_forum_stats(false, 1, $message["datestamp"]);
     // Mail subscribed users.
     phorum_email_notice($message);
 }
 // Mail moderators.
 if ($PHORUM["email_moderators"] == PHORUM_EMAIL_MODERATOR_ON) {
     phorum_email_moderators($message);
 }
 /*
  * [hook]
  *     after_post
  *
  * [description]
  *     This hook can be used for performing actions based on what the
  *     message contained. It is specifically useful for altering the
  *     redirect behavior.
  *
  * [category]
Beispiel #2
0
  *         phorum_db_pm_send(
  *             $PHORUM["DATA"]["LANG"]["mod_foo"]["MessageApprovedSubject"],
  *             $pm_message,
  *             $data[0]["user_id"]
  *             );
  *
  *         return $data;
  *
  *     }
  *     </hookcode>
  */
 if (isset($PHORUM["hooks"]["after_approve"])) {
     phorum_hook("after_approve", array($old_message, PHORUM_APPROVE_MESSAGE));
 }
 if ($old_message['status'] != PHORUM_STATUS_HIDDEN) {
     phorum_email_notice($old_message);
 }
 if (isset($PHORUM['args']['old_forum']) && is_numeric($PHORUM['args']['old_forum'])) {
     $PHORUM['forum_id'] = (int) $PHORUM['args']['old_forum'];
 }
 if (isset($PHORUM['args']["prepost"])) {
     // add some additional args
     $addcode = "";
     if (isset($PHORUM['args']['moddays']) && is_numeric($PHORUM['args']['moddays'])) {
         $addcode .= "moddays=" . $PHORUM['args']['moddays'];
     }
     if (isset($PHORUM['args']['onlyunapproved']) && is_numeric($PHORUM['args']['onlyunapproved'])) {
         if (!empty($addcode)) {
             $addcode .= ",";
         }
         $addcode .= "onlyunapproved=" . $PHORUM['args']['onlyunapproved'];