Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r18982: LJSUP-8678 (Mail sharing should go to ht...

Committer: ailyin
LJSUP-8678 (Mail sharing should go to http://api.addthis.com); [tags: lusever]
U   trunk/cgi-bin/LJ/S2.pm
U   trunk/cgi-bin/LJ/Share.pm
Modified: trunk/cgi-bin/LJ/S2.pm
===================================================================
--- trunk/cgi-bin/LJ/S2.pm	2011-04-27 04:34:50 UTC (rev 18981)
+++ trunk/cgi-bin/LJ/S2.pm	2011-04-27 04:37:38 UTC (rev 18982)
@@ -3804,8 +3804,7 @@
         my $entry = LJ::Entry->new($journalu->{'userid'}, ditemid => $this->{'itemid'});
         return $null_link unless $entry->security eq 'public';
         my $entry_url = LJ::eurl($entry->url);
-        my $entry_title = LJ::eurl($entry->subject_text);
-        my $url = "http://www.facebook.com/sharer.php?u=$entry_url&t=$entry_title";
+        my $url = "http://www.facebook.com/sharer.php?u=$entry_url";
         my $link = LJ::S2::Link($url, $ctx->[S2::PROPS]->{"text_share_facebook"}, LJ::S2::Image("$LJ::IMGPREFIX/btn_facebook.gif", 24, 24));
         return $link;
     }
@@ -3814,16 +3813,18 @@
         my $entry = LJ::Entry->new($journalu->{'userid'}, ditemid => $this->{'itemid'});
         return $null_link unless $entry->security eq 'public';
         my $post_id = $entry->journalid . ':' . $entry->ditemid;
-        my $entry_url = LJ::eurl($entry->url); # for js
-        my $link = LJ::S2::Link("http://twitter.com/share?url=$entry_url", $ctx->[S2::PROPS]->{"text_share_twitter"}, LJ::S2::Image("$LJ::IMGPREFIX/twitter.gif", 24, 24));
+        my $entry_url = LJ::eurl($entry->url);
+        my $entry_title = LJ::eurl($entry->subject_text);
+        my $link = LJ::S2::Link("http://twitter.com/share?url=$entry_url&text=$entry_title", $ctx->[S2::PROPS]->{"text_share_twitter"}, LJ::S2::Image("$LJ::IMGPREFIX/twitter.gif", 24, 24));
         return $link;
     }
 
     if ($key eq "share_email") {
         my $entry = LJ::Entry->new($journalu->{'userid'}, ditemid => $this->{'itemid'});
         return $null_link unless $entry->security eq 'public';
-        my $entry_url = LJ::eurl($entry->url); # for js
-        my $url = "$LJ::SITEROOT/tools/tellafriend.bml?journal=$journal&itemid=$this->{'itemid'}&u=$entry_url";
+        my $entry_url = LJ::eurl($entry->url);
+        my $entry_title = LJ::eurl($entry->subject_text);
+        my $url = "http://api.addthis.com/oexchange/0.8/forward/email/offer?username=internal&url=$entry_url&title=$entry_title";
         my $link = LJ::S2::Link($url, $ctx->[S2::PROPS]->{"text_share_email"}, LJ::S2::Image("$LJ::IMGPREFIX/btn_email.gif", 24, 24));
         return $link;
     }

Modified: trunk/cgi-bin/LJ/Share.pm
===================================================================
--- trunk/cgi-bin/LJ/Share.pm	2011-04-27 04:34:50 UTC (rev 18981)
+++ trunk/cgi-bin/LJ/Share.pm	2011-04-27 04:37:38 UTC (rev 18982)
@@ -44,7 +44,7 @@
             'bindLink' => 'http://digg.com/submit?url={url}'
         },
         'email' => {
-            'bindLink' => 'http://api.addthis.com/oexchange/0.8/forward/email/offer?username=internal&url={url}'
+            'bindLink' => 'http://api.addthis.com/oexchange/0.8/forward/email/offer?username=internal&url={url}&title={title}'
         },
         'tumblr' => {
             'bindLink' => 'http://www.tumblr.com/share?v=3&u={url}'

Tags: andy, livejournal, lusever, pm
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