Савинцев Егор 🚶 (savintsev_egor) wrote in changelog,
Савинцев Егор 🚶
savintsev_egor
changelog

[livejournal] r17297: LJSUP-6535: Facebook Like Button With Fa...

Committer: esavintcev
LJSUP-6535: Facebook Like Button With Faces
U   trunk/cgi-bin/LJ/Widget/FaceBookILike.pm
Modified: trunk/cgi-bin/LJ/Widget/FaceBookILike.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/FaceBookILike.pm	2010-09-07 07:14:02 UTC (rev 17296)
+++ trunk/cgi-bin/LJ/Widget/FaceBookILike.pm	2010-09-07 08:52:40 UTC (rev 17297)
@@ -12,19 +12,12 @@
     my $class = shift;
     my %opts = @_;
 
-#use Data::Dumper;
-#warn Dumper \%opts;
-
-#    return '';
-#    return '' unless LJ::is_enabled('widget_fb_i_like');
-
-=head
-    my $entry = LJ::Entry->new($journalu->{'userid'}, ditemid => $this->{'itemid'});
-    return $null_link unless $entry->security eq 'public';
-=cut
     my $entry_url = LJ::eurl($opts{journal}->journal_base);
+    my $width = $opts{width} || 450;
+    my $height = $opts{height} || 80;
+    my $color = $opts{color} || "light";
 
-    my $ret = qq|<iframe src="http://www.facebook.com/plugins/like.php?href=$entry_url&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>|;
+    my $ret = qq|<iframe src="http://www.facebook.com/plugins/like.php?href=$entry_url&amp;layout=standard&amp;show_faces=true&amp;width=$width&amp;action=like&amp;colorscheme=$color&amp;height=$height" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:${width}px; height:${height}px;" allowTransparency="true"></iframe>|;
 
     return $ret;
 

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