From c5f993eb42b81fa2c09601d65b8b60e6c55328d6 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 10 Jun 2014 20:20:51 +0200 Subject: [PATCH] Added support for detecting app.net profiles --- include/bbcode.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index d6fc81983f..23949d24be 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -608,6 +608,10 @@ function GetProfileUsername($profile, $username) { if ($twitter != $profile) return($username." (".$twitter.")"); + $appnet = preg_replace("=https?://alpha.app.net/(.*)=ism", "$1@alpha.app.net", $profile); + if ($appnet != $profile) + return($username." (".$appnet.")"); + $gplus = preg_replace("=https?://plus.google.com/(.*)=ism", "$1@plus.google.com", $profile); if ($gplus != $profile) return($username." (".$gplus.")"); @@ -634,7 +638,7 @@ function GetProfileUsername($profile, $username) { // pumpio (http://host.name/user) $rest = preg_replace("=https?://([\.\w]+)/([\.\w]+)(.*)=ism", "$3", $profile); if ($rest == "") { - $pumpio = preg_replace("=https?://([\.\w]+)/([\.\w]+)(.*)=ism", "*$2@$1*", $profile); + $pumpio = preg_replace("=https?://([\.\w]+)/([\.\w]+)(.*)=ism", "$2@$1", $profile); if ($pumpio != $profile) return($username." (".$pumpio.")"); } @@ -898,8 +902,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal // Check for sized text // [size=50] --> font-size: 50px (with the unit). - $Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism","$2",$Text); - $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","$2",$Text); + $Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism","$2",$Text); + $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","$2",$Text); // Check for centered text $Text = preg_replace("(\[center\](.*?)\[\/center\])ism","
$1
",$Text);