Example #1
0
    if ($sort_style) {
        $forum_style = 0;
        // this is deprecated
        if ($logged_in_user) {
            $logged_in_user->prefs->thread_sorting = $sort_style;
            $logged_in_user->prefs->update("thread_sorting={$sort_style}");
        } else {
            list($forum_style, $old_style) = parse_forum_cookie();
        }
        send_cookie('sorting', implode("|", array($forum_style, $sort_style)), true);
    } else {
        // get the sorting style from the user or a cookie
        if ($logged_in_user) {
            $sort_style = $logged_in_user->prefs->thread_sorting;
        } else {
            list($forum_style, $sort_style) = parse_forum_cookie();
        }
    }
}
page_head($title, 'jumpToUnread();');
$is_subscribed = $logged_in_user && BoincSubscription::lookup($logged_in_user->id, $thread->id);
show_forum_header($logged_in_user);
echo "<p>";
switch ($forum->parent_type) {
    case 0:
        $category = BoincCategory::lookup_id($forum->category);
        show_forum_title($category, $forum, $thread);
        break;
    case 1:
        show_team_forum_title($forum, $thread);
        break;
Example #2
0
    error_page(tra("Not visible to you"));
}
if (!$sort_style) {
    // get the sort style either from the logged in user or a cookie
    if ($user) {
        $sort_style = $user->prefs->forum_sorting;
    } else {
        list($sort_style, $thread_style) = parse_forum_cookie();
    }
} else {
    // set the sort style
    if ($user) {
        $user->prefs->forum_sorting = $sort_style;
        $user->prefs->update("forum_sorting={$sort_style}");
    } else {
        list($old_style, $thread_style) = parse_forum_cookie();
        send_cookie('sorting', implode("|", array($sort_style, $thread_style)), true);
    }
}
switch ($forum->parent_type) {
    case 0:
        $category = BoincCategory::lookup_id($forum->category);
        if ($category->is_helpdesk) {
            page_head(tra("Questions and Answers") . ' : ' . $forum->title);
        } else {
            page_head(tra("Message boards") . ' : ' . $forum->title);
        }
        show_forum_header($user);
        show_forum_title($category, $forum, NULL);
        break;
    case 1: