Example #1
0
function show_message_row($thread, $parent_post)
{
    global $g_logged_in_user;
    global $content;
    global $preview;
    $x1 = "Message:" . html_info() . post_warning();
    $x2 = "";
    if ($parent_post) {
        $x2 .= " reply to <a href=#" . $parent_post->id . ">Message ID " . $parent_post->id . "</a>:";
    }
    $x2 .= "<form action=forum_reply.php?thread=" . $thread->id;
    if ($parent_post) {
        $x2 .= "&post=" . $parent_post->id;
    }
    $x2 .= " method=\"post\">\n";
    $x2 .= form_tokens($g_logged_in_user->authenticator);
    $x2 .= "<textarea name=\"content\" rows=\"18\" cols=\"80\">";
    $no_quote = get_int("no_quote", true) == 1;
    if ($preview) {
        $x2 .= htmlspecialchars($content);
    } else {
        if (!$no_quote) {
            if ($parent_post) {
                $x2 .= quote_text(htmlspecialchars($parent_post->content), 80) . "\n";
            }
        }
    }
    if (!$g_logged_in_user->prefs->no_signature_by_default) {
        $enable_signature = "checked=\"true\"";
    } else {
        $enable_signature = "";
    }
    $x2 .= "</textarea><p>\r\n\t\t<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\">\r\n\t\t<input type=\"submit\" value=\"Post reply\">\r\n\t\t<input name=\"add_signature\" id=\"add_signature\" value=\"add_it\" " . $enable_signature . " type=\"checkbox\">\r\n\t\t<label for=\"add_signature\">Add my signature to this reply</label>\r\n\r\n\t\t</form>\r\n\t";
    row2($x1, $x2);
}
         $select_1 = "checked=\"true\"";
     } else {
         $select_2 = "checked=\"true\"";
     }
 } else {
     $select_0 = "checked=\"true\"";
 }
 row1(tra("Message-board identity"));
 row2(tra("Avatar") . "\n    <br><p class=\"text-muted\">" . tra("An image representing you on the message boards.") . "\n    <br>" . tra("Format: JPG or PNG. Size: at most 4 KB, 100x100 pixels") . "</p>", "<input type=\"radio\" id=\"avatar_select_0\" name=\"avatar_select\" value=\"0\" " . $select_0 . ">\n        <label for=\"avatar_select_0\">" . tra("Don't use an avatar") . "</label><br>\n    <input type=\"radio\" id=\"avatar_select_1\" name=\"avatar_select\" value=\"1\" " . $select_1 . ">\n        <label for=\"avatar_select_1\">" . tra("Use a Globally Recognized Avatar provided by %1", "<a href=\"http://gravatar.com\">Gravatar.com</a>") . "</label><br>\n    <input type=\"radio\" id=\"avatar_select_2\" name=\"avatar_select\" value=\"2\" " . $select_2 . ">\n        <label for=\"avatar_select_2\">" . tra("Use this uploaded avatar:") . "</label> <input type=\"file\" name=\"picture\">");
 if (strlen($user->prefs->avatar)) {
     row2(tra("Avatar preview") . "<br><p class=\"text-muted\">" . tra("This is how your avatar will look") . "</p>", "<img src=\"" . $user->prefs->avatar . "\" width=\"100\" height=\"100\">");
 }
 $signature_by_default = $user->prefs->no_signature_by_default == false ? "checked=\"checked\"" : "";
 $signature = $user->prefs->signature;
 $maxlen = 250;
 row2(tra("Signature for message board posts") . html_info() . "<br><br>" . tra("Check out %1various free services%2\n<br> providing dynamic 'signature images'\n<br> showing your latest credit info, project news, etc.", "<a href=https://boinc.berkeley.edu/links.php#sigs>", "</a>"), textarea_with_counter("signature", 250, $signature) . "<br><input type=\"checkbox\" name=\"signature_by_default\" " . $signature_by_default . "> " . tra("Attach signature by default"));
 if ($user->prefs->signature != "") {
     row2(tra("Signature preview") . "<br><p class=\"text-muted\">" . tra("This is how your signature will look in the forums") . "</p>", output_transform($user->prefs->signature));
 }
 // ------------ Message display  -----------
 $forum_hide_avatars = $user->prefs->hide_avatars ? "checked=\"checked\"" : "";
 $forum_hide_signatures = $user->prefs->hide_signatures ? "checked=\"checked\"" : "";
 $forum_link_popup = $user->prefs->link_popup ? "checked=\"checked\"" : "";
 $forum_image_as_link = $user->prefs->images_as_links ? "checked=\"checked\"" : "";
 $forum_jump_to_unread = $user->prefs->jump_to_unread ? "checked=\"checked\"" : "";
 $forum_ignore_sticky_posts = $user->prefs->ignore_sticky_posts ? "checked=\"checked\"" : "";
 $forum_highlight_special = $user->prefs->highlight_special ? "checked=\"checked\"" : "";
 $forum_minimum_wrap_postcount = intval($user->prefs->minimum_wrap_postcount);
 $forum_display_wrap_postcount = intval($user->prefs->display_wrap_postcount);
 row1(tra("Message display"));
 row2(tra("What to display"), "<input type=\"checkbox\" name=\"forum_hide_avatars\" " . $forum_hide_avatars . "> " . tra("Hide avatar images") . "<br>\n    <input type=\"checkbox\" name=\"forum_hide_signatures\" " . $forum_hide_signatures . "> " . tra("Hide signatures") . "<br>\n    <input type=\"checkbox\" name=\"forum_images_as_links\" " . $forum_image_as_link . "> " . tra("Show images as links") . "<br>\n    <input type=\"checkbox\" name=\"forum_link_popup\" " . $forum_link_popup . "> " . tra("Open links in new window/tab") . "<br>\n    <input type=\"checkbox\" name=\"forum_highlight_special\" " . $forum_highlight_special . "> " . tra("Highlight special users") . "<br>\n    <input type=\"text\" name=\"forum_display_wrap_postcount\" size=3 value=\"" . $forum_display_wrap_postcount . "\"> " . tra("Display this many messages per page") . "<br />\n    ");
Example #3
0
}
echo '<form action="forum_edit.php?id=' . $post->id . '" method="POST">\\n';
echo form_tokens($logged_in_user->authenticator);
start_table();
row1("Edit your message");
if ($can_edit_title) {
    //If this is the user can edit the thread title display a way of doing so
    if ($preview) {
        row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($title) . '">');
    } else {
        row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($thread->title) . '">');
    }
}
if ($preview) {
    row2(tra("Message") . html_info() . post_warning(), '<textarea name="content" rows="12" cols="80">' . htmlspecialchars($content) . '</textarea>');
} else {
    row2(tra("Message") . html_info() . post_warning(), '<textarea name="content" rows="12" cols="80">' . htmlspecialchars($post->content) . '</textarea>');
}
if ($post->signature) {
    $enable_signature = "checked=\"true\"";
} else {
    $enable_signature = "";
}
row2('', '<input id="add_signature" name="add_signature" value="1" ' . $enable_signature . ' type="checkbox">
	<label for="add_signature">' . tra("Add my signature to this post") . '</label>');
row2("", "<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"><input type=\"submit\" name=\"submit\" value=\"OK\">");
end_table();
echo "</form>";
page_tail();
$cvs_version_tracker[] = "\$Id: forum_edit.php 15758 2008-08-05 22:43:14Z davea \$";
//Generated automatically - do not edit
Example #4
0
    echo "</div>\n";
}
echo "<form action=\"forum_edit.php?id=" . $post->id . "\" method=\"POST\" name=\"post\" onsubmit=\"return checkForm(this)\">\n";
echo form_tokens($logged_in_user->authenticator);
start_table();
row1(tra("Edit your message"));
if ($can_edit_title) {
    //If this is the user can edit the thread title display a way of doing so
    if ($preview) {
        row2(tra("Title") . html_info(), "<input type=\"text\" name=\"title\" value=\"" . htmlspecialchars($title) . "\">");
    } else {
        row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($thread->title) . '">');
    }
}
if ($preview) {
    row2(tra("Message") . html_info() . post_warning(), $bbcode_html . "<textarea name=\"content\" rows=\"12\" cols=\"80\" class=\"message_field\">" . htmlspecialchars($content) . "</textarea>");
} else {
    row2(tra("Message") . html_info() . post_warning(), $bbcode_html . '<textarea name="content" rows="12" cols="80" class="message_field">' . htmlspecialchars($post->content) . '</textarea>');
}
if ($post->signature) {
    $enable_signature = "checked=\"true\"";
} else {
    $enable_signature = "";
}
row2("", "<input id=\"add_signature\" name=\"add_signature\" value=\"1\" " . $enable_signature . " type=\"checkbox\">\n    <label for=\"add_signature\">" . tra("Add my signature to this post") . "</label>");
row2("", "<input class=\"btn btn-default\" type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"><input class=\"btn btn-primary\" type=\"submit\" name=\"submit\" value=\"OK\">");
end_table();
echo "</form>";
page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
Example #5
0
    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();
row1(tra("Create a new thread"));
$submit_help = "";
$body_help = "";
if ($content && !$title) {
    $submit_help = "<br /><font color=\"red\">" . tra("Remember to add a title") . "</font>";
}
if ($force_title && $title) {
    row2(tra("Title"), htmlspecialchars($title) . "<input type=\"hidden\" name=\"title\" value=\"" . htmlspecialchars($title) . "\">");
} else {
    row2(tra("Title") . $submit_help, "<input type=\"text\" name=\"title\" size=80 value=\"" . htmlspecialchars($title) . "\">");
}
row2(tra("Message") . html_info() . post_warning() . $body_help, $bbcode_html . "<textarea name=\"content\" rows=\"12\" cols=\"80\" class=\"message_field\">" . htmlspecialchars($content) . "</textarea>");
if (!$logged_in_user->prefs->no_signature_by_default) {
    $enable_signature = "checked=\"true\"";
} else {
    $enable_signature = "";
}
if (is_news_forum($forum)) {
    row2("", "<input name=export type=checkbox>" . tra("Show this item as a Notice in the BOINC Manager") . "<br><span class=note>" . tra("Do so only for items likely to be of interest to all volunteers.") . "</span>");
}
row2("", "<input name=\"add_signature\" value=\"add_it\" " . $enable_signature . " type=\"checkbox\"> " . tra("Add my signature to this post"));
row2("", "<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"> <input type=\"submit\" value=\"" . tra("OK") . "\">");
end_table();
echo "</form>\n";
page_tail();
$cvs_version_tracker[] = "\$Id\$";
Example #6
0
function show_message_row($thread, $parent_post)
{
    global $logged_in_user, $bbcode_html;
    global $content, $preview;
    $x1 = tra("Message:") . html_info() . post_warning();
    $x2 = "";
    if ($parent_post) {
        $x2 .= " " . tra("reply to %1Message ID%2:", "<a href=#" . $parent_post->id . ">", " " . $parent_post->id . "</a>");
    }
    $x2 .= "<form action=forum_reply.php?thread=" . $thread->id;
    if ($parent_post) {
        $x2 .= "&post=" . $parent_post->id;
    }
    $x2 .= " method=\"post\" name=\"post\" onsubmit=\"return checkForm(this)\">\n";
    $x2 .= form_tokens($logged_in_user->authenticator);
    $x2 .= $bbcode_html . "<textarea name=\"content\" rows=\"18\" cols=\"80\">";
    $no_quote = get_int("no_quote", true) == 1;
    if ($preview) {
        $x2 .= htmlspecialchars($content);
    } else {
        if (!$no_quote) {
            if ($parent_post) {
                $x2 .= quote_text(htmlspecialchars($parent_post->content)) . "\n";
            }
        }
    }
    if (!$logged_in_user->prefs->no_signature_by_default) {
        $enable_signature = "checked=\"true\"";
    } else {
        $enable_signature = "";
    }
    $x2 .= "</textarea><p>\n        <input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\">\n        <input type=\"submit\" value=\"" . tra("Post reply") . "\">\n        &nbsp;&nbsp;&nbsp;\n        <input type=\"checkbox\" name=\"add_signature\" id=\"add_signature\" value=\"add_it\" " . $enable_signature . ">\n        <label for=\"add_signature\">" . tra("Add my signature to this reply") . "</label>\n\n        </form>\n    ";
    row2($x1, $x2);
}
Example #7
0
function show_questions($profile)
{
    $response1 = "";
    $response2 = "";
    if (isset($profile->response1)) {
        $response1 = $profile->response1;
    }
    if (isset($profile->response2)) {
        $response2 = $profile->response2;
    }
    row1(show_profile_heading1());
    rowify(show_profile_question1() . html_info());
    show_textarea("response1", $response1);
    row1(show_profile_heading2());
    rowify(show_profile_question2() . html_info());
    show_textarea("response2", $response2);
    show_language_selection($profile);
}
} else {
    $select_0 = "checked=\"true\"";
}
row1("Message-board identity");
row2("Avatar\r\n\t<br><span class=\"note\">An image representing you on the message boards.\r\n\t<br>Format: JPG or PNG. Size: at most 4 KB, 100x100 pixels</span>", "<input type=\"radio\" id=\"avatar_select_0\" name=\"avatar_select\" value=\"0\" " . $select_0 . ">\r\n\t\t<label for=\"avatar_select_0\">Don't use an avatar</label><br>\r\n\t<input type=\"radio\" id=\"avatar_select_1\" name=\"avatar_select\" value=\"1\" " . $select_1 . ">\r\n\t\t<label for=\"avatar_select_1\">Use a Globally Recognized Avatar provided by <a href=\"http://gravatar.com\">Gravatar.com</a></label><br>\r\n\t<input type=\"radio\" id=\"avatar_select_2\" name=\"avatar_select\" value=\"2\" " . $select_2 . ">\r\n\t\t<label for=\"avatar_select_2\">Use this uploaded avatar:</label> <input type=\"file\" name=\"picture\">");
if (strlen($user->prefs->avatar)) {
    row2("Avatar preview<br><span class=\"note\">This is how your avatar will look</span>", "<img src=\"" . $user->prefs->avatar . "\" width=\"100\" height=\"100\">");
}
if (!$user->prefs->no_signature_by_default) {
    $signature_by_default = "checked=\"checked\"";
} else {
    $signature_by_default = "";
}
$signature = $user->prefs->signature;
$maxlen = 250;
row2("Signature for message board posts" . html_info() . "<br><br>Check out <a href=http://boinc.berkeley.edu/links.php#sigs>various free services</a>\r\n\t<br> providing dynamic 'signature images'\r\n\t<br> showing your latest credit info, project news, etc.", "<textarea name=\"signature\" rows=4 cols=50 id=\"signature\" onkeydown=\"textCounter(this.form.signature, this.form.remLen,{$maxlen});\"\r\n\tonkeyup=\"textCounter(this.form.signature, this.form.remLen,250);\">" . $signature . "</textarea>\r\n\t<br><input name=\"remLen\" type=\"text\" id=\"remLen\" value=\"" . ($maxlen - strlen($signature)) . "\" size=\"3\" maxlength=\"3\" readonly> chars remaining\r\n\t<br><input type=\"checkbox\" name=\"signature_by_default\" " . $signature_by_default . "> Attach signature by default ");
if ($user->prefs->signature != "") {
    row2("Signature preview" . "<br><span class=note>This is how your signature will look in the forums</span>", output_transform($user->prefs->signature));
}
// ------------ Message display  -----------
if ($user->prefs->hide_avatars) {
    $forum_hide_avatars = "checked=\"checked\"";
} else {
    $forum_hide_avatars = "";
}
if ($user->prefs->hide_signatures) {
    $forum_hide_signatures = "checked=\"checked\"";
} else {
    $forum_hide_signatures = "";
}
if ($user->prefs->link_popup) {
Example #9
0
    echo "</div>\n";
}
echo "<form action=\"forum_post.php?id=" . $forum->id . "\" method=\"POST\">\n";
echo form_tokens($logged_in_user->authenticator);
echo "<br />";
start_table();
row1_top(tra("Create a new thread"));
//New thread
$submit_help = "";
$body_help = "";
if ($content && !$title) {
    $submit_help = "<br /><font color=\"red\">Remember to add a title</font>";
}
if ($force_title && $title) {
    row2(tra("Title"), htmlspecialchars($title) . "<input type=\"hidden\" name=\"title\" value=\"" . htmlspecialchars($title) . "\">");
} else {
    row2(tra("Title") . $submit_help, "<input type=\"text\" name=\"title\" size=\"62\" value=\"" . htmlspecialchars($title) . "\">");
}
//Message
row2(tra("Message") . html_info() . post_warning() . $body_help, "<textarea name=\"content\" rows=\"12\" cols=\"54\">" . htmlspecialchars($content) . "</textarea>");
if (!$logged_in_user->prefs->no_signature_by_default) {
    $enable_signature = "checked=\"true\"";
} else {
    $enable_signature = "";
}
row2("", "<input name=\"add_signature\" value=\"add_it\" " . $enable_signature . " type=\"checkbox\">" . tra("Add my signature to this post"));
row2("", "<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"> <input type=\"submit\" value=\"OK\">");
end_table();
echo "</form>\n";
page_tail();
$cvs_version_tracker[] = "\$Id: forum_post.php 16747 2008-12-29 10:19:25Z jbk \$";