diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-04-11 00:19:29 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-04-11 00:19:29 +0000 |
commit | 4f55c9fb81287f7790a471ff5bf318cb8189d59f (patch) | |
tree | c0e2d5e2e1f575f1dedfa925bd9d760eda6c8c78 /phpBB/includes/functions_posting.php | |
parent | f17c36cea455ac858511a9a191572a457c4a33f8 (diff) | |
download | forums-4f55c9fb81287f7790a471ff5bf318cb8189d59f.tar forums-4f55c9fb81287f7790a471ff5bf318cb8189d59f.tar.gz forums-4f55c9fb81287f7790a471ff5bf318cb8189d59f.tar.bz2 forums-4f55c9fb81287f7790a471ff5bf318cb8189d59f.tar.xz forums-4f55c9fb81287f7790a471ff5bf318cb8189d59f.zip |
BBCode parser + decoder, missing some tags and mildly broken at this time
git-svn-id: file:///svn/phpbb/trunk@3812 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 3eaefe1b1b..48ee7f3060 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -125,7 +125,7 @@ function generate_topic_icons($mode, $enable_icons) } // DECODE TEXT -> This will/should be handled by bbcode.php eventually -function decode_text(&$message) +function decode_text(&$message, $bbcode_uid) { global $config, $censors; @@ -158,6 +158,7 @@ function decode_text(&$message) obtain_word_list($censors); } + $message = str_replace(":$bbcode_uid", '', $message); $message = preg_replace($match, $replace, $message); return; @@ -548,7 +549,7 @@ function user_notification($mode, $subject, $forum_id, $topic_id, $post_id) // Format text to be displayed - from viewtopic.php - centralizing this would be nice ;) function format_display($message, $html, $bbcode, $uid, $url, $smilies, $sig) { - global $auth, $forum_id, $config, $censors, $user; + global $auth, $forum_id, $config, $censors, $user, $bbcode; // If the board has HTML off but the post has HTML // on then we process it, else leave it alone @@ -558,6 +559,7 @@ function format_display($message, $html, $bbcode, $uid, $url, $smilies, $sig) } // Second parse bbcode here + $message = $bbcode->bbcode_second_pass($message); // If we allow users to disable display of emoticons // we'll need an appropriate check and preg_replace here @@ -773,6 +775,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ 'enable_smilies' => $post_data['enable_smilies'], 'enable_magic_url' => $post_data['enable_urls'], 'bbcode_uid' => $bbcode_uid, + 'bbcode_bitfield' => $post_data['bbcode_bitfield'] ); if ($mode != 'edit' || $post_data['message_md5'] != $post_data['post_checksum']) |