holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r12773: LJSUP-13843: Tumblr on lj-like and shari...

Committer: akanashin
LJSUP-13843: Tumblr on lj-like and sharing
U   trunk/cgi-bin/LJ/CleanHtml/Like.pm
U   trunk/templates/CleanHtml/Like.tmpl
Modified: trunk/cgi-bin/LJ/CleanHtml/Like.pm
===================================================================
--- trunk/cgi-bin/LJ/CleanHtml/Like.pm	2012-10-17 06:55:53 UTC (rev 12772)
+++ trunk/cgi-bin/LJ/CleanHtml/Like.pm	2012-10-17 07:11:20 UTC (rev 12773)
@@ -126,7 +126,8 @@
     my $title_ehtml = Encode::decode_utf8( LJ::ehtml( $meta->{'title'} ) );
 
     $params->{'lj_like.twitter'} = 1;
-    $params->{'title_ehtml'} = $title_ehtml;
+    $params->{'title_ehtml'} = LJ::eurl($title_ehtml);
+
     $params->{'locale'} = $locale;
 }
 
@@ -204,7 +205,7 @@
     my $entry_url = $self->{'entry_url'};
     my $entry_url_ehtml = LJ::ehtml($entry_url);
 
-    $params->{'url_ehtml'} = $entry_url_ehtml;
+    $params->{'url_ehtml'} = LJ::eurl($entry_url_ehtml);
     $params->{'site_root'} = $LJ::SITEROOT;
 
     foreach my $button (@$buttons) {

Modified: trunk/templates/CleanHtml/Like.tmpl
===================================================================
--- trunk/templates/CleanHtml/Like.tmpl	2012-10-17 06:55:53 UTC (rev 12772)
+++ trunk/templates/CleanHtml/Like.tmpl	2012-10-17 07:11:20 UTC (rev 12773)
@@ -35,7 +35,7 @@
 
 <tmpl_if lj_like.tumblr>
 <div class="lj-like-item lj-like-item-tumblr">
-<a class="tumblr-share-button" target="_blank" data-url="<tmpl_var url_ehtml>" data-text="<tmpl_var title_ehtml>" href="http://tumblr.com/share/link"><TMPL_VAR expr="ml('ljlike.tumblr')"></a>
+<a class="tumblr-share-button" target="_blank" data-url="<tmpl_var url_ehtml>" data-title="<TMPL_IF title_ehtml><tmpl_var title_ehtml><TMPL_ELSE><TMPL_VAR expr="ml('widget.officialjournals.nosubject')"></TMPL_IF>" href="http://tumblr.com/share/link"><TMPL_VAR expr="ml('ljlike.tumblr')"></a>
 </div>
 </tmpl_if>
 

Tags: akanashin, holyandrew, ljcom, pm, tmpl
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