This message board is available as an
id&setup=1>RSS feed
";
page_tail();
// This function shows the threads for the given forum
// Starting from $start,
// using the given $sort_style (as defined in forum.php)
// and using the features for the logged in user in $user.
//
function show_forum($forum, $start, $sort_style, $user) {
$gotoStr = "";
$nav = show_page_nav($forum, $start);
if ($nav) {
$gotoStr = "
$nav
";
}
echo $gotoStr; // Display the navbar
start_forum_table(array("", tra("Threads"), tra("Posts"), tra("Author"), tra("Views"), "".tra("Last post").""), "id=\"catview\" cellspacing=0");
$sticky_first = !$user || !$user->prefs->ignore_sticky_posts;
// Show hidden threads if logged in user is a moderator
//
$show_hidden = is_moderator($user, $forum);
$threads = get_forum_threads(
$forum->id, $start, THREADS_PER_PAGE,
$sort_style, $show_hidden, $sticky_first
);
if ($user) {
$subs = BoincSubscription::enum("userid=$user->id");
}
// Run through the list of threads, displaying each of them
$n = 0; $i=0;
foreach ($threads as $thread) {
$owner = BoincUser::lookup_id($thread->owner);
$unread = thread_is_unread($user, $thread);
//if ($thread->status==1){
// This is an answered helpdesk thread
if ($user && is_subscribed($thread, $subs)) {
echo '
';
} else {
// Just a standard thread.
echo '
';
}
echo "
";
if ($thread->hidden) {
echo "[".tra("hidden")."]";
}
if ($unread) {
if ($thread->sticky) {
if ($thread->locked) {
show_image(NEW_IMAGE_STICKY_LOCKED, "This thread is sticky and locked, and you haven't read it yet", "sticky/locked/unread");
} else {
show_image(NEW_IMAGE_STICKY, "This thread is sticky and you haven't read it yet", "sticky/unread");
}
} else {
if ($thread->locked) {
show_image(NEW_IMAGE_LOCKED, "You haven't read this thread yet, and it's locked", "unread/locked");
} else {
show_image(NEW_IMAGE, "You haven't read this thread yet", "unread");
}
}
} else {
if ($thread->sticky) {
if ($thread->locked) {
show_image(IMAGE_STICKY_LOCKED, "This thread is sticky and locked", "sticky/locked");
} else {
show_image(IMAGE_STICKY, "This thread is sticky", "sticky");
}
} else {
if ($thread->locked) {
show_image(IMAGE_LOCKED, "This thread is locked", "locked");
} else {
show_image(IMAGE_POST, "You read this thread", "read");
}
}
}
echo "