ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[ljcom] r9599: LJSUP-6867: Twitter auth - LJSUP-7075: S...

Committer: ssafronova
LJSUP-6867: Twitter auth - LJSUP-7075: Should add new strings to the user profile in the External services.
U   trunk/cgi-bin/LJ/Hooks/Userinfo.pm
U   trunk/htdocs/manage/profile/index.bml.text.local
Modified: trunk/cgi-bin/LJ/Hooks/Userinfo.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Userinfo.pm	2010-10-08 04:14:13 UTC (rev 9598)
+++ trunk/cgi-bin/LJ/Hooks/Userinfo.pm	2010-10-08 07:26:03 UTC (rev 9599)
@@ -427,6 +427,20 @@
         };
     }
 
+    if ($u->is_person && $u->prop('twitter_access_token')) {
+        my $tw_name = LJ::ehtml($u->prop('twitter_name'));
+        my $tw_link = LJ::ehtml($u->prop('twitter_link'));
+
+        $ret .= qq{
+            <tr class='im_lj'>
+                <td class='im_icon'>
+                    <img src='$LJ::IMGPREFIX/twitter-profile.gif' alt='' />
+                </td>
+                <td colspan="2"><a href="$tw_link">$tw_name</a></td>
+            </tr>
+        };
+    }
+
     if ($u->prop('im_openid')) {
         my $openid = LJ::ehtml($u->prop('im_openid'));
 
@@ -512,6 +526,19 @@
     $ret .= qq{<a href="$LJ::SITEROOT/manage/settings/?cat=extensions">$ml{facebook_change}</a>};
     $ret .= "</td></tr>\n";
 
+    $ret .= "<tr><td class='field_name'>" . LJ::Lang::ml('/manage/profile/index.bml.chat.twitter'). "</td><td>";
+    if ($u->prop('twitter_access_token')) {
+        my $tw_name = $u->prop('twitter_name');
+        $ret .= qq{
+            <img src="$LJ::IMGPREFIX/twitter-profile.gif">
+            <strong>$tw_name</strong>
+        }
+    } else {
+        $ret .= "<em>(" . LJ::Lang::ml('/manage/profile/index.bml.chat.twitter.none') . ")</em> ";
+    }
+    $ret .= qq{<a href="$LJ::SITEROOT/manage/settings/?cat=extensions">} . LJ::Lang::ml('/manage/profile/index.bml.chat.twitter.change') . '</a>';
+    $ret .= "</td></tr>\n";
+
     $ret .= "<tr><td class='field_name'>$ml{openid_field_name}</td><td>";
     $ret .= LJ::html_text({
         'name' => 'contact_openid',

Modified: trunk/htdocs/manage/profile/index.bml.text.local
===================================================================
--- trunk/htdocs/manage/profile/index.bml.text.local	2010-10-08 04:14:13 UTC (rev 9598)
+++ trunk/htdocs/manage/profile/index.bml.text.local	2010-10-08 07:26:03 UTC (rev 9599)
@@ -15,6 +15,12 @@
 
 .chat.msnusername=Windows LiveID 
 
+.chat.twitter=Twitter
+
+.chat.twitter.none=None
+
+.chat.twitter.change=Change
+
 .error.gender.not_specified=Please select one of the following options.
 
 .friendof=Show list of users who have friended you.

Tags: ljcom, local, pm, ssafronova
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments