Committer: esavintcev
LJSUP-6535: Facebook Like Button With FacesU 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&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&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&layout=standard&show_faces=true&width=$width&action=like&colorscheme=$color&height=$height" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:${width}px; height:${height}px;" allowTransparency="true"></iframe>|; return $ret;