mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-04 07:47:34 +02:00
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
This commit is contained in:
@@ -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('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$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('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$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
|
||||
|
Reference in New Issue
Block a user