isDevBlog()){
if (
(!$logged_in_user->isSpecialUser(S_SCIENTIST)) &&
(!$logged_in_user->isSpecialUser(S_DEV)) &&
(!$logged_in_user->isSpecialUser(S_ADMIN))
) {
// Since this is a devBlog only people at the project can start threads here.
error_page("This forum is marked as a development blog, only people directly working with the project may start a new thread here.
However, you may post a reply to an existing thread.");
}
}
if (!$logged_in_user->isSpecialUser(S_MODERATOR) && ($logged_in_user->getTotalCredit()<$forum->getPostMinTotalCredit() || $logged_in_user->getExpavgCredit()<$forum->getPostMinExpavgCredit())) {
//If user haven't got enough credit (according to forum regulations)
//We do not tell the (ab)user how much this is - no need to make it easy for them to break the system.
error_page(sprintf(tr(FORUM_ERR_EXPAVG),$forum->getTitle()));
}
if (time()-$logged_in_user->getLastPostTimestamp()<$forum->getPostMinInterval()){
//If the user is posting faster than forum regulations allow
//Tell the user to wait a while before creating any more posts
error_page(tr(FORUM_ERR_INTERVAL));
}
$title = post_str("title", true);
$content = post_str("content", true);
$preview = post_str("preview", true);
if ($content && $title && (!$preview)){
if (post_str('add_signature',true)=="add_it"){
$add_signature=true; // set a flag and concatenate later
} else {
$add_signature=false;
}
check_tokens($logged_in_user->getAuthenticator());
akismet_check($logged_in_user, $content);
$thread = $forum->createThread($title, $content, $logged_in_user, $add_signature);
header('Location: forum_thread.php?id=' . $thread->getID());
}
page_head('Forum');
show_forum_title($forum, NULL, $category->is_helpdesk);
if ($preview == tra("Preview")) {
$options = new output_options;
echo "