Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r19347: LJSUP-9143 (Problems with loading button...

Committer: ailyin
LJSUP-9143 (Problems with loading buttons in LJ-like)
U   trunk/cgi-bin/LJ/Hooks/LJLike.pm
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/LJ/Hooks/LJLike.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/LJLike.pm	2011-06-23 06:39:38 UTC (rev 19346)
+++ trunk/cgi-bin/LJ/Hooks/LJLike.pm	2011-06-23 06:58:40 UTC (rev 19347)
@@ -38,8 +38,8 @@
 
     my $api_id = $LJ::VKONTAKTE_CONF->{'client_id'};
 
-    LJ::include_raw( 'html' => qq{<script type="text/javascript" src="http://userapi.com/js/api/openapi.js?31"></script>}
-                             . qq{<script type="text/javascript">VK.init({apiId: $api_id, onlyWidgets: true});</script>} );
+    LJ::need_res ( 'js/jquery/jquery.vkloader.js' );
+    LJ::include_raw( 'html' => qq{<script type="text/javascript">jQuery.VK.init({apiId: $api_id, onlyWidgets: true});</script>} );
 } );
 
 1;

Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2011-06-23 06:39:38 UTC (rev 19346)
+++ trunk/cgi-bin/cleanhtml.pl	2011-06-23 06:58:40 UTC (rev 19347)
@@ -821,7 +821,7 @@
                         $vkontakte_like_js{$uniqid}
                             = qq{<div id="vk_like_$uniqid"></div>}
                             . qq{<script type="text/javascript">}
-                            . qq{VK.Widgets.Like("vk_like_$uniqid",$widget_opts_out);}
+                            . qq{jQuery.VK.addButton("vk_like_$uniqid",$widget_opts_out);}
                             . qq{</script>};
                         $newdata .= qq{<div class="lj-like-item lj-like-item-vkontakte"><x-vk-like id="$uniqid"></div>};
                     }

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