aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-25 14:16:17 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-25 14:16:17 +0000
commitd1676cb6bf7c0ae5addf3cc954c636f9a6cbaf41 (patch)
tree93348b36766ec01214ccecd9d09ef9dddfa2910f /phpBB/includes/message_parser.php
parent7f497764e1f40419f1dcacecc6762bebf588bcbf (diff)
downloadforums-d1676cb6bf7c0ae5addf3cc954c636f9a6cbaf41.tar
forums-d1676cb6bf7c0ae5addf3cc954c636f9a6cbaf41.tar.gz
forums-d1676cb6bf7c0ae5addf3cc954c636f9a6cbaf41.tar.bz2
forums-d1676cb6bf7c0ae5addf3cc954c636f9a6cbaf41.tar.xz
forums-d1676cb6bf7c0ae5addf3cc954c636f9a6cbaf41.zip
my attempt to fix custom profile fields
- added the load settings for custom profile fields - re-added our famous make_clickable function - removed group_by clauses (due to the lang id selection the group by clause is no more needed) I hope that i have not just created new bugs. ;) git-svn-id: file:///svn/phpbb/trunk@5712 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php28
1 files changed, 2 insertions, 26 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 29e817a369..9101b5ee87 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -894,32 +894,8 @@ class parse_message extends bbcode_firstpass
// into relative versions when the server/script path matches the link
function magic_url($server_url)
{
- static $match;
- static $replace;
-
- if (!is_array($match))
- {
- $match = $replace = array();
- // Be sure to not let the matches cross over. ;)
-
- // relative urls for this board
- $match[] = '#(^|[\n ]|\()(' . preg_quote($server_url, '#') . ')/([^ \t\n\r<"\'\)&]+|&(?!lt;))*#i';
- $replace[] = '$1<!-- l --><a href="$2/$3">$3</a><!-- l -->';
-
- // matches a xxxx://aaaaa.bbb.cccc. ...
- $match[] = '#(^|[\n ]|\()([\w]+:/{2}.*?([^ \t\n\r<"\'\)&]+|&(?!lt;))*)#ie';
- $replace[] = "'\$1<!-- m --><a href=\"\$2\" target=\"_blank\">' . ((strlen('\$2') > 55) ? substr(str_replace('&amp;', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&amp;', '&', '\$2'), -10) : '\$2') . '</a><!-- m -->'";
-
- // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
- $match[] = '#(^|[\n ]|\()(w{3}\.[\w\-]+\.[\w\-.\~]+(?:[^ \t\n\r<"\'\)&]+|&(?!lt;))*)#ie';
- $replace[] = "'\$1<!-- w --><a href=\"http://\$2\" target=\"_blank\">' . ((strlen('\$2') > 55) ? substr(str_replace('&amp;', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&amp;', '&', '\$2'), -10) : '\$2') . '</a><!-- w -->'";
-
- // matches an email@domain type address at the start of a line, or after a space.
- $match[] = '#(^|[\n ]|\()([a-z0-9&\-_.]+?@[\w\-]+\.(?:[\w\-\.]+\.)?[\w]+)#ie';
- $replace[] = "'\$1<!-- e --><a href=\"mailto:\$2\">' . ((strlen('\$2') > 55) ? substr('\$2', 0, 39) . ' ... ' . substr('\$2', -10) : '\$2') . '</a><!-- e -->'";
- }
-
- $this->message = preg_replace($match, $replace, $this->message);
+ // We use the global make_clickable function
+ $this->message = make_clickable($this->message, $server_url);
}
// Parse Smilies