Beispiel #1
0
        case "message":
            if ($PHORUM["DATA"]["OPTION_ALLOWED"]["subscribe_mail"]) {
                $subscribe_type = PHORUM_SUBSCRIPTION_MESSAGE;
            }
            break;
        case "":
            if ($PHORUM["DATA"]["OPTION_ALLOWED"]["subscribe_mail"]) {
                $subscribe_type = PHORUM_SUBSCRIPTION_NONE;
            }
            break;
        default:
            trigger_error("Illegal message subscription type: " . htmlspecialchars($message["subscription"]));
            break;
    }
    if ($subscribe_type === NULL) {
        phorum_api_user_unsubscribe($message["user_id"], $message["thread"]);
    } else {
        phorum_api_user_subscribe($message["user_id"], $message["thread"], $PHORUM["forum_id"], $subscribe_type);
    }
}
$PHORUM["posting_template"] = "message";
$PHORUM["DATA"]["OKMSG"] = $PHORUM["DATA"]["LANG"]["MsgModEdited"];
$PHORUM['DATA']["BACKMSG"] = $PHORUM['DATA']["LANG"]["BackToThread"];
$PHORUM["DATA"]["URL"]["REDIRECT"] = phorum_api_url(PHORUM_READ_URL, $message["thread"], $message["message_id"]);
/*
 * [hook]
 *     posting_action_edit_post
 *
 * [description]
 *     Allow modules to perform custom action whenever the user edits his post.
 *     This can be used to e.g. redirect the user immediately back to the edited
Beispiel #2
0
//   along with this program.                                                 //
////////////////////////////////////////////////////////////////////////////////
if (!defined("PHORUM_CONTROL_CENTER")) {
    return;
}
// remove threads fromlist
if (isset($_POST["delthreads"])) {
    foreach ($_POST["delthreads"] as $thread) {
        phorum_api_user_unsubscribe($PHORUM['user']['user_id'], $thread);
    }
}
// change any email settings
if (isset($_POST["sub_type"])) {
    foreach ($_POST["sub_type"] as $thread => $type) {
        if ($type != $_POST["old_sub_type"][$thread]) {
            phorum_api_user_unsubscribe($PHORUM['user']['user_id'], $thread);
            phorum_api_user_subscribe($PHORUM['user']['user_id'], $thread, $_POST["thread_forum_id"][$thread], $type);
        }
    }
}
// the number of days to show
if (isset($_POST['subdays']) && is_numeric($_POST['subdays'])) {
    $subdays = $_POST['subdays'];
} elseif (isset($PHORUM['args']['subdays']) && !empty($PHORUM["args"]['subdays']) && is_numeric($PHORUM["args"]['subdays'])) {
    $subdays = $PHORUM['args']['subdays'];
} else {
    $subdays = phorum_api_user_get_setting('cc_subscriptions_subdays');
}
if ($subdays === NULL) {
    $subdays = 2;
}