PDA

View Full Version : Lightbox for Facebook Likebox - cookie based??



goldenimage
12-06-2011, 06:53 PM
Okay, here is what I have:




<html>


<div style="width:350px; margin:0 auto 0 auto; heigt:260px">
<h2 style="text-align:center; margin:10px auto 10px auto;">Follow Golden Image Photography on Facebook
</h2>
<iframe src="http://www.facebook.com/plugins/likebox.php?href=www.facebook.com/Golden.Image.Photography&amp;width=350&amp;colorscheme=light&amp;connections=10&amp;stream=false&amp;header=false&amp;height=260" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:350px; height:260px;" allowTransparency="true"></iframe>
</div>

</html>

saved as .php and uploaded to my main level hosting for this domain.

I need to know where to add this code:


<!-- Facebook lightbox -->

<script type="text/javascript">

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

if(readCookie('GoldenImageFacebook') !=="GoldenImageFacebook") {
$(document).ready(function() {
setTimeout("$.fn.fancybox({href:'/facebooklightbox.php', open:true, opacity:0.7})",5000);
})};
</script>

<!-- Fin Facebook Lightbox -->

I am using (Studiopress Genesis) Wordpress.

It isn't working... I am a newb.

Thanks,

djr33
12-06-2011, 10:06 PM
Moderator's note: for some reason this post was caught by our automatic spam filter. Usually this is because there is a keyword in the post, but I don't see what that is. Because of that, there may be a short delay when posting new replies, but a moderator will approve them as soon as possible if that happens.