function show_title($forum, $thread) { 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; } }
} } switch ($forum->parent_type) { case 0: $category = BoincCategory::lookup_id($forum->category); if ($category->is_helpdesk) { page_head(tra("Questions and Answers") . ' : ' . $forum->title); ?> <link href="forum_help_desk.php" rel="up" title="Forum Index"><?php } else { page_head(tra("Message boards") . ' : ' . $forum->title); ?> <link href="forum_index.php" rel="up" title="Forum Index"><?php } show_forum_header($user); show_forum_title($category, $forum, NULL); break; case 1: $team = BoincTeam::lookup_id($forum->category); page_head('Team message board for <a href="team_display.php?teamid=$team->id">$team->name</a>'); show_forum_header($user); show_team_forum_title($forum); break; } ?> <form action="forum_forum.php" method="get"> <?php echo start_table("noborder"); ?> <table width="100%"> <tr valign="top">
} check_tokens($logged_in_user->authenticator); if (!akismet_check($logged_in_user, $content)) { $warning = "Your post has been flagged as spam by the Akismet anti-spam system. Please modify your text and try again."; $preview = tra("Preview"); } else { create_post($content, $parent_post_id, $logged_in_user, $forum, $thread, $add_signature); header('Location: forum_thread.php?id=' . $thread->id); } } page_head(tra("Post to thread")); show_forum_header($logged_in_user); 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; } echo "<p>"; if ($preview == tra("Preview")) { $options = new output_options(); echo "<div id=\"preview\">\n"; echo "<div class=\"header\">" . tra("Preview") . "</div>\n"; echo output_transform($content, $options); echo "</div>\n"; } start_forum_table(array(tra("Author"), tra("Message"))); show_message_row($thread, $parent_post);
echo "\n <tr class=\"row{$j}\">\n <td>\n <a href=\"forum_forum.php?id={$forum->id}\">{$t}</a>\n <br><span class=\"smalltext\">{$d}</span>\n </td>\n <td class=\"numbers\">{$forum->threads}</td>\n <td class=\"numbers\">{$forum->posts}</td>\n <td class=\"lastpost\">" . time_diff_str($forum->timestamp, time()) . "</td>\n </tr>"; } page_head(tra("%1 Message boards", PROJECT)); show_forum_header($user); if (FORUM_QA_MERGED_MODE === true) { $categories = BoincCategory::enum("true order by orderID"); } else { echo "<p>" . tra("If you have a question or problem, please use the %1Questions & Answers%2 section of the message boards.", "<a href=\"forum_help_desk.php\">", "</a>") . "</p>"; $categories = BoincCategory::enum("is_helpdesk=0 order by orderID"); } $first = true; foreach ($categories as $category) { if ($first) { $first = false; echo "<p>"; show_forum_title($category, NULL, NULL); echo "<p>"; show_mark_as_read_button($user); start_forum_table(array(tra("Topic"), tra("Threads"), tra("Posts"), tra("Last post"))); } if (strlen($category->name)) { echo ' <tr class="subtitle"> <td class="category" colspan="4">' . $category->name . '</td> </tr> '; } $forums = BoincForum::enum("parent_type=0 and category={$category->id} order by orderID"); $i = 0; foreach ($forums as $forum) { show_forum_summary($forum, $i++);
$warning = tra("Your message was flagged as spam by the Akismet anti-spam system. Please modify your text and try again."); $preview = tra("Preview"); } else { $thread = create_thread($title, $content, $logged_in_user, $forum, $add_signature, $export); header('Location: forum_thread.php?id=' . $thread->id); } } page_head(tra("Create new thread"), '', '', '', $bbcode_js); show_forum_header($logged_in_user); if ($warning) { echo "<span class=error>{$warning}</span><p>"; } switch ($forum->parent_type) { case 0: $category = BoincCategory::lookup_id($forum->category); show_forum_title($category, $forum, null); break; case 1: show_team_forum_title($forum); break; } if ($preview == tra("Preview")) { $options = null; echo "<h2>" . tra("Preview") . "</h2>\n"; echo "<div class=\"pm_preview\">"; echo output_transform($content, $options); echo "</div>\n"; } echo "<form action=\"forum_post.php?id=" . $forum->id . "\" method=\"POST\" name=\"post\" onsubmit=\"return checkForm(this)\">\n"; echo form_tokens($logged_in_user->authenticator); start_table();
require_once '../inc/util.inc'; require_once '../inc/time.inc'; if (DISABLE_FORUMS) { error_page("Forums are disabled"); } check_get_args(array()); $user = get_logged_in_user(false); page_head(tra("Questions and answers")); echo "<p>" . tra("Talk live via Skype with a volunteer, in any of several languages. Go to %1BOINC Online Help%2.", "<a href=\"http://boinc.berkeley.edu/help.php\">", "</a>") . "</p>"; show_forum_header($user); $categories = BoincCategory::enum("is_helpdesk=1 order by orderID"); $first = true; foreach ($categories as $category) { if ($first) { $first = false; show_forum_title($category, null, null); echo "<p>"; show_mark_as_read_button($user); start_forum_table(array(tra("Topic"), tra("Questions"), tra("Last post"))); } if (strlen($category->name)) { echo "\n <tr class=\"subtitle\">\n <td class=\"category\" colspan=\"4\">", $category->name, "</td>\n </tr>\n "; } $forums = BoincForum::enum("parent_type=0 and category={$category->id} order by orderID"); $i = 1; foreach ($forums as $forum) { $j = $i % 2; $i++; echo "\n <tr class=\"row{$j}\">\n <td>\n <a href=\"forum_forum.php?id={$forum->id}\">{$forum->title}</a>\n <br><small>", $forum->description, "</small>\n </td>\n <td class=\"numbers\">", $forum->threads, "</td>\n <td class=\"lastpost\">", time_diff_str($forum->timestamp, time()), "</td>\n </tr>\n "; } }