From cc8b10f067483f21bcdf983292db4e7a2c25e665 Mon Sep 17 00:00:00 2001 From: "Janus B. Kristensen" Date: Fri, 13 May 2005 19:14:19 +0000 Subject: [PATCH] Use bbcode svn path=/trunk/boinc/; revision=6147 --- html/user/bbcode.php | 33 +++++++++++++++++++++++++++++++++ html/user/forum_edit.php | 7 +++++-- html/user/forum_reply.php | 2 +- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 html/user/bbcode.php diff --git a/html/user/bbcode.php b/html/user/bbcode.php new file mode 100644 index 0000000000..cbf8b5ad60 --- /dev/null +++ b/html/user/bbcode.php @@ -0,0 +1,33 @@ + + +

BBCode tags are a way to specify what kind of formatting you want where on various +pages on this project. It's similar to HTML, although simplified for use here. The +tags start with a [ (where you would have used < in HTML) and stop with ] (where +you would have used > in HTML).

+

Examples:

+ +

Lists are also possible:
[list]
*Item 1
*Item 2
[/list] to:

+ +

Please note if you mess up and don't close a tag or don't specify a parameter +correctly, the raw tag itself will display instead of the formatted text.

+ diff --git a/html/user/forum_edit.php b/html/user/forum_edit.php index 6a15674a35..e67711fc65 100644 --- a/html/user/forum_edit.php +++ b/html/user/forum_edit.php @@ -6,6 +6,7 @@ require_once('../inc/util.inc'); db_init(); $logged_in_user = get_logged_in_user(); +$logged_in_user = getForumPreferences($logged_in_user); // decorate object with forum preference info (uses DB) // needed to see if user is 'special'. @@ -31,7 +32,8 @@ if ($_POST['submit']) { exit(); } if ($logged_in_user->id != $post->user) { - // Can't edit other's posts. + //if (!(isSpecialUser($logged_in_user,0)) && ($logged_in_user->id != $post->user)) { + // Can't edit other's posts unless you're a moderator echo "You are not authorized to edit this post."; exit(); } @@ -57,7 +59,8 @@ if (!$is_spec && (time() > $post->timestamp + MAXIMUM_EDIT_TIME)){ } if ($logged_in_user->id != $post->user) { - // Can't edit other's posts. + //if (!(isSpecialUser($logged_in_user,0)) && ($logged_in_user->id != $post->user)) { + // Can't edit other's posts unless you're a moderator echo "You are not authorized to edit this post."; exit(); } diff --git a/html/user/forum_reply.php b/html/user/forum_reply.php index db0df42976..c3887fbcd1 100644 --- a/html/user/forum_reply.php +++ b/html/user/forum_reply.php @@ -153,7 +153,7 @@ function show_message_row($thread, $category, $post=NULL) { function quote_text($text, $cols = 0) { /* $cols is depricated. */ - $text = "
" . $text . "
"; + $text = "[quote]" . $text . "[/quote]"; return $text; } ?>