I wrapped Facebox in a WordPress 2.5-compatible plugin for easily implementation on a recent freelance project. It’s pretty slick.
Go to the project page to download
If you’re on github (and you should be), follow me here.
Update
1.2.1 is out! Download it from the WordPress Plugin Directory
Woah!
I… you are… Thank you. Out of all the Lightbox, thickbox, slimbox garbage (ugly pop-ups that take 5 seconds each to complete their worthless animations) I found FaceBox which simply pops it up, has a nice translucent border and is simple.
And now you, kind internet person. Have turned it into a simple to use wordpress plugin.
You are my brother now.
Sad News. The plug-in doesn’t work on pictures that are part of a [gallery] post in WordPress. It actually kind of messes things up if any of your posts include a gallery with pictures. Test it out.
Either way, if or after you fix this, you should put this plugin in the official WordPress site with the others, as it’s a wonderful plugin still.
Thank you for the kind words, Kristian!
I will definitely check it out, been kinda hectic the last month or so at work :/
hi … first of all great plugin … but is there a way to load a facebox programmatically? the original facebox script allows to call
jQuery.facebox(‘something cool’);
but it doesn’t work with your plugin in my wordpress theme
Thanks for the feedback, Stefan :)
The facebox plugin is basically a direct copy of the source, so it should be accessible from the jQuery global object. However, the plugin script file may not be loaded in time for your theme js to see it. You might try wrapping whatever you want to do with it in an onload handler, perhaps?
jQuery(function ($) { if ($.facebox) { ... } })Hey Mate, Great plugin! Can you have multiple images pop up when the user clicks on the one link? i.e. like lightbox? CD
Facebox is pretty basic, as far as modal window replacements go. There are a few forks of Facebox on GitHub that indicate support for just what you describe, but I probably won’t have enough free time to implement it in this plugin. Thanks for the compliment, and happy hacking :).
Hey there. Forgive my ignorance, but how do I use this? I had facebox functionality for a XHTML/CSS based site that I’ve converted to wordpress so my customer can use the blog stuff, and I was using facebox to display a hidden <div> within the site code, but it’s not working. Nothing happens. I don’t suppose you could tell me what I’m doing wrong could you (it’s the ‘simple strength calendar’ button in the navbar for the marked website)?
Thankyou for putting this together, by the way - facebox rocks. Tim.
Great plugin!
Facebox was working wonderfully until last week and now for some reason the images are popping up in the bottom right of the browser window. I am wondering if you can tell me why they no longer are popping up in the middle of the window?
Any help would be greatly appreciated.
Thanks in advance
Have you added any plugins recently? If it was working before, I’d suspect a plugin conflict somewhere.
Hello again.
I don’t know if you missed my previous comment, but I can’t get the plugin to display a hidden div. Is this something it can do?
Hi, sorry, I’ve been slammed at work. The plugin itself is only designed to work with images given the
rel="facebox"attribute. Facebox itself can of course show a hidden div like that, but it would be a custom bit of code.Looking at your website, I notice the
rel="facebox"on the calendar link, but I don’t see the wp-facebox.js file referenced anywhere in the head. Is the plugin active?Hi there - thanks for getting back to me. The plugin is indeed active but you’re right - there’s no js reference. I’ll try going in and adding the head code manually.
I don’t suppose you could tell me what the default head code looks like for wp-facebox, could you? I presume it’s a little different to the standard facebox code.
Okay - I’m starting to get somewhere. It will show the hidden div now but not in a facebox style wrapper. It just appears to the right on the page content. I’ll leave it up there so you can see what I’m talking about.
Do you know what I’m doing wrong?
Thanks.
hi, been using the plugin… however, i keep on getting an error on validation and it targets the
if (jQuery&&etc.Basically, what does this do? does it check if jQuery and jQuery.facebox are there? i’ve just started learning php and javascript so please bear with me…
Thanks.
btw, my pages are XHTML 1.0 Transitional
nevermind… i think i got it… thanks for the plugin though
ok, i thought its out. sorry about that… this looks like i’m spamming :D
Sorry about that, Dok, a little slow on the comment approvals. I’m glad you got it working.
So am i right? it checks if jQuery and jQuery.facebox are there? still getting an error with it. If it does, and if you have the time, can you suggest of other ways to do this and also making the html valid?
Also if it helps in figuring out why i get invalid html, I’m using this plugin with codecolorer plugin.
Hi
I am testing this plugin on my WordPress 2.8.4 blog.
Have tried uploading images and adding the rel=”facebox” attribute. It works as it should.
I am wondering how can the rel=”facebox” attribute be automatically added to all images?
Not a PHP programmer so I need some help here. Thanks.
Regards, Rezdwan Hamid
Unfortunately, I have not had time to update this plugin in a long time. Theoretically, it should already add the rel=”facebox” to any linked image that it finds during the filter “the_content”. It’s possible that your theme is not firing that filter, or it may have changed in 2.8, I’m not sure.
I never got around to a config page in the admin section, so the configuration is pretty primitive…
Hello Daniel
Sorry for the late reply.
By the way, thank you for replying to my comments. This is a great plugin mainly for it’s simplicity.
I do hope that you can find some time to update this plugin soon. Some time it works, some time it doesn’t.
Any way, thank you once again for your help.
Regards, Rezdwan Hamid
I am also encountering validation errors relevant to “jQuery && etc.” Specifically the double Amps.
Any current suggestions?
Thanks, it really is a great lightweight plugin> I was excited to find it.
Wrapping the inline script block with commented CDATA comments should prevent those errors.
Hi,
Need your expertise. how to make it work on internet explorer browser?
Many thanks.