From: Michael Vogel Date: Sat, 12 Oct 2013 06:29:39 +0000 (+0200) Subject: Preparations for the upcoming bidirectional twitter sync. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=59b64ece25381f39708c45ba28dc45488b6aac54;p=friendica.git Preparations for the upcoming bidirectional twitter sync. --- diff --git a/include/bbcode.php b/include/bbcode.php index 0f8c2df74e..f74c86b50a 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -349,6 +349,10 @@ function GetProfileUsername($profile, $username) { if ($diaspora != $profile) return($diaspora); + $twitter = preg_replace("=https?://twitter.com/(.*)=ism", "$1@twitter.com", $profile); + if ($twitter != $profile) + return($twitter); + $StatusnetHost = preg_replace("=https?://(.*)/user/(.*)=ism", "$1", $profile); if ($StatusnetHost != $profile) { $StatusnetUser = preg_replace("=https?://(.*)/user/(.*)=ism", "$2", $profile); diff --git a/include/contact_selectors.php b/include/contact_selectors.php index 44ff7ab040..5e35ecd7e1 100644 --- a/include/contact_selectors.php +++ b/include/contact_selectors.php @@ -85,7 +85,8 @@ function network_to_name($s) { NETWORK_MYSPACE => t('MySpace'), NETWORK_MAIL2 => t('Email'), NETWORK_GPLUS => t('Google+'), - NETWORK_PUMPIO => t('pump.io') + NETWORK_PUMPIO => t('pump.io'), + NETWORK_TWITTER => t('Twitter') ); call_hooks('network_to_name', $nets);