aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-02-21 12:47:35 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-02-21 12:47:35 +0000
commitc74d2538ec68fa1c6f3da6d26e31a09f2045557b (patch)
treebe1c11d7d9e403c7b884c7d08e34111f0806d350 /phpBB/includes/functions_posting.php
parent9c12fe83db3914b4e35bdcef75cc70e2f75044d6 (diff)
downloadforums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar
forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.gz
forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.bz2
forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.xz
forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.zip
- put consoring and smilie processing into functions (we use them all over the place) for better changing and consistency.
- changed docs/AUTHORS to reflect the recent code re-use in functions_messenger.php - pleasing the users a little bit more by using table constants. :D - login box if "mode" is not allowed -> posting (thought about trigger_error integration, but we do not need this that often). git-svn-id: file:///svn/phpbb/trunk@4836 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php21
1 files changed, 9 insertions, 12 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 9a0aa1bd48..2383558100 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -91,22 +91,21 @@ function generate_smilies($mode, $forum_id)
// Format text to be displayed - from viewtopic.php - centralizing this would be nice ;)
function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $url, $smilies, $sig)
{
- global $auth, $forum_id, $config, $censors, $user, $bbcode, $phpbb_root_path;
+ global $auth, $forum_id, $config, $user, $bbcode, $phpbb_root_path;
// Second parse bbcode here
$bbcode->bbcode_second_pass($message, $uid);
// If we allow users to disable display of emoticons we'll need an appropriate
// check and preg_replace here
- $message = (!$smilies || !$config['allow_smilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $message) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $message);
+ $message = smilie_text($message, !$smilies);
// Replace naughty words such as farty pants
- if (sizeof($censors))
+/* if (sizeof($censors))
{
$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $message . '<'), 1, -1));
- }
-
- $message = str_replace("\n", '<br />', $message);
+ }*/
+ $message = str_replace("\n", '<br />', censor_text($message));
// Signature
if ($sig && $config['allow_sig'] && $signature && $auth->acl_get('f_sigs', $forum_id))
@@ -114,15 +113,13 @@ function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $
$signature = trim($signature);
$bbcode->bbcode_second_pass($signature, $siguid);
+ $signature = smilie_text($signature);
- $signature = (!$config['allow_smilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $signature) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $signature);
-
- if (sizeof($censors))
+/* if (sizeof($censors))
{
$signature = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $signature . '<'), 1, -1));
- }
-
- $signature = str_replace("\n", '<br />', $signature);
+ }*/
+ $signature = str_replace("\n", '<br />', censor_text($signature));
}
else
{