holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

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

Committer: akanashin
LJSUP-13843: Tumblr on lj-like and sharing
U   trunk/bin/upgrading/en_LJ.dat
U   trunk/cgi-bin/LJ/CleanHtml/Like.pm
U   trunk/templates/CleanHtml/Like.tmpl
Modified: trunk/bin/upgrading/en_LJ.dat
===================================================================
--- trunk/bin/upgrading/en_LJ.dat	2012-10-16 21:15:59 UTC (rev 12769)
+++ trunk/bin/upgrading/en_LJ.dat	2012-10-17 06:18:44 UTC (rev 12770)
@@ -5456,6 +5456,8 @@
 
 ljlike.surfingbird=Surf
 
+ljlike.tumblr=Tumblr
+
 ljru.nav=LJ.ru
 
 ljru.nav.avito|staleness=1

Modified: trunk/cgi-bin/LJ/CleanHtml/Like.pm
===================================================================
--- trunk/cgi-bin/LJ/CleanHtml/Like.pm	2012-10-16 21:15:59 UTC (rev 12769)
+++ trunk/cgi-bin/LJ/CleanHtml/Like.pm	2012-10-17 06:18:44 UTC (rev 12770)
@@ -47,6 +47,7 @@
                             facebook
                             twitter
                             google
+                            tumblr
                         )];
 
         if (($remote && LJ::SUP->is_remote_sup()) || LJ::SUP::is_sup_ip()) {
@@ -81,6 +82,9 @@
         elsif ( $button =~ /^(?:su|surfinbird)$/i ) {
             push @buttons, 'surfinbird';
         }
+        elsif ( $button =~ /^(?:tu|tumblr)$/i ) {
+            push @buttons, 'tumblr';
+        }
         elsif ( $button =~ /^(?:lj|livejournal)$/i ) {
             push @buttons, 'livejournal';
         }
@@ -136,6 +140,11 @@
     $params->{'lj_like.surfinbird'} = 1;
 }
 
+sub __tumblr {
+    my ($self, $params) = @_;
+    $params->{'lj_like.tumblr'} = 1;
+}
+
 sub __vkontakte {
     my ($self, $params, $vkontakte_like_js) = @_;
 
@@ -214,6 +223,9 @@
         elsif ( $button eq 'surfinbird' ) {
             $self->__surfinbird($params);
         }
+        elsif ( $button eq 'tumblr' ) {
+            $self->__tumblr($params);
+        }
         elsif ( $button eq 'vkontakte' ) {
             $self->__vkontakte($params, $opts->{'vkontakte_like_js'});
         }

Modified: trunk/templates/CleanHtml/Like.tmpl
===================================================================
--- trunk/templates/CleanHtml/Like.tmpl	2012-10-16 21:15:59 UTC (rev 12769)
+++ trunk/templates/CleanHtml/Like.tmpl	2012-10-17 06:18:44 UTC (rev 12770)
@@ -33,6 +33,12 @@
 </div>
 </tmpl_if>
 
+<tmpl_if lj_like.tumblr>
+<div class="lj-like-item lj-like-item-tumblr">
+<a 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>
+</div>
+</tmpl_if>
+
 <tmpl_if lj_like.vk_no_conf>
 <div class="lj-like-item lj-like-item-vkontakte"><b>[vkontakte like]</b></div>
 </tmpl_if>

Tags: akanashin, dat, 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