holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r12765: LJSUP-13593: Add new button for lj-like ...

Committer: akanashin
LJSUP-13593: Add new button for lj-like (surfingbird)
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 08:53:47 UTC (rev 12764)
+++ trunk/bin/upgrading/en_LJ.dat	2012-10-16 11:46:04 UTC (rev 12765)
@@ -5446,6 +5446,8 @@
 ljcom.userinfo.wishes.viewall|staleness=1
 ljcom.userinfo.wishes.viewall=View all Wishes
 
+ljlike.surfingbird=Surf
+
 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 08:53:47 UTC (rev 12764)
+++ trunk/cgi-bin/LJ/CleanHtml/Like.pm	2012-10-16 11:46:04 UTC (rev 12765)
@@ -39,12 +39,23 @@
     my ($buttons_list) = @_;
 
     unless ($buttons_list) {
-        return [qw( repost
-                    facebook
-                    twitter
-                    surfinbird
-                    google
-                    vkontakte)];
+
+        my $remote = LJ::get_remote();
+
+        $buttons_list = [qw( 
+                            repost
+                            facebook
+                            twitter
+                            surfinbird
+                            google
+                        )];
+
+        if (($remote && LJ::SUP->is_remote_sup()) || LJ::SUP::is_sup_ip()) {
+            push @$buttons_list, 'vkontakte', 'surfinbird';
+        }
+
+        return $buttons_list;
+
     }
 
     my @buttons = ();

Modified: trunk/templates/CleanHtml/Like.tmpl
===================================================================
--- trunk/templates/CleanHtml/Like.tmpl	2012-10-16 08:53:47 UTC (rev 12764)
+++ trunk/templates/CleanHtml/Like.tmpl	2012-10-16 11:46:04 UTC (rev 12765)
@@ -28,8 +28,8 @@
 </tmpl_if>
 
 <tmpl_if lj_like.surfinbird>
-<div>
-<a target="_blank" class="surfinbird__like_button" data-text="<tmpl_var title_ehtml>" data-url="<TMPL_VAR url_ehtml>" href="http://surfingbird.ru/share">Серф</a>
+<div class="lj-like-item lj-like-item-surfinbird">
+<a target="_blank" class="surfinbird__like_button" data-text="<TMPL_VAR expr="ml('ljlike.surfingbird')">" data-url="<tmpl_var url_ehtml>" href="http://surfingbird.ru/share">Серф</a>
 </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