[Plugin: jQuery Colorbox] Looks Like a great Lightbox, But
-
Looks like a great lightbox plugin, but I just can’t get it to work. Using WP 3.3.1, Twenty Eleven & deactivated all other plugins. Fairly fresh install.
Here’s the problem: images in post/pages, when click on thumbnail, it goes to full size image in new page, NOT the lightbox. The lightbox works fine when I click on the full size image (BIG image), but what’s the point of that? ??
Links seem to work fine, when placed in post. However I can’t get links in custom menu to work, when putting in the proper class.
Any advice/ideas? Happy to hear. But I need to get this resolved or use a different solution.
Cheers everyone,
Kevinhttps://www.ads-software.com/extend/plugins/jquery-colorbox/
-
So I decided I like this lightbox so much, and since this is a brand new site, I am empirically starting from scratch: deleted WP (3.3.1)+ its Database.
Reinstalled WP, fresh new DB. So far, all I have installed or done (via settings) & using Twenty Eleven.
1. askimet
2. jQuery ColorBox
3. Set Permalinks to POST.
Results, so far Jquery Colorbox is working AOK.Here’s my guess as to what the problem was. I had been using a different lightbox, and I have been testing today other lightboxes. Somehow, somehwere, some conflict occurred.
But now I am going to reinstall all the other plugins that I need for this site, and see how it goes.This plugin by default won’t act on links that don’t point directly to the image which was the problem in your case.
When you insert an image make sure the Link URL field points to the file – click the File URL button.
Don’t think that was/is the problem, unless I am missing your point. All my thumbnail links are in this format: https://domain.com/wp-content/uploads/2012/04/filename.jpg
Sorry, I misread. The selector triggers on filenames ending with an image format extension. If that wasn’t the problem, I can only guess.
So I decided I like this lightbox so much, and since this is a brand new site, I am empirically starting from scratch: deleted WP (3.3.1)+ its Database.
Reinstalled WP, fresh new DB. So far, all I have installed or done (via settings) & using Twenty Eleven.
1. askimet
2. jQuery ColorBox
3. Set Permalinks to POST.
Results, so far Jquery Colorbox is working AOK.
Here’s my guess as to what the problem was. I had been using a different lightbox, and I have been testing today other lightboxes. Somehow, somehwere, some conflict occurred.
But now I am going to reinstall all the other plugins that I need for this site, and see how it goes.So, to followup, I have successfully reinstalled all the plugins that I had on my previous WP, AND Jquery Colorbox is STILL working,,, YEA.
It really is a very nice lightbox, with iFrame support, which is why I was looking at it in the beginning.
To reiterate, my theory is that one, or several, or all of the several lightboxes I tried (and deleted, as fully as I could), left something behind, or altered something in the WP core (that even a re-install of WP over the existing install didn’t resolve) caused the problem I experienced with this lightbox not working. I’d say, if it’s possible, the devleoper might try further tests, and amend his plugin to check for the offending files, and do something about it. I realize this is very complicated stuff, but from my reading there are quite a few people having trouble installing this lightbox.
As best I can remember, the lightboxes I tried were: LightBox 3, Lightbox-Plus 2.4.6, Easy FancyBox 1.3.4.9 & lastly, JQuery Colorbox 4.3. An ignorant first bet (on my part) offender would be FancyBox, but I’m just gut-guessing with no evidence to offer at all.
On my fresh istall of WP 3.3.1, I installed JQuery Colorbox 4.3 and ONLY JQuery Colorbox 4.3, and all is well.
Laslty, one feature request: if the lightbox could remain centered, if the background page mistakingly (or intentially) gets scrolled, that would be terrific. I do find that some people (site viewers) get confused with the multiple scroll bars, and/or if they scroll the background and then the lightbox goes up, possibly even off the page.
All in all, great work with this plugin. I am going to enjoy using it ??Hi,
glad you could solve your problems and are still using my plugin.@your feature request:
I guess that this would technically be possible, but if your images are bigger than the screen and you don’t let Colorbox scale them down, users would not be able to scroll around on the site in order to see the whole picture.Maybe I could implement this as an optional feature sometime in the future.
Cheers,
Arne@techotronic,,, the man himself. Well done on the plugin.
The idea of the image or iFrame remaining centered shouldn’t dismiss the idea of scaling,, I think? I get what you mean, that the image/iFrame should fit within the browser window, but it’s also possible to scroll the underlying page. With your lightbox, currently then the image/iFrame scrolls with the underlying page. I THINK that I saw one lightbox (probably FancyBox) where even if the underlying page scrolled, the image/iFrame would remain centered (and scaled) in the browser window.
Get what I mean? In any event, delighted with your lightbox.
Cheers,
KevinPlugin still working great, but I still haven’t figured a way of getting the colorbox-link to work with WP Custom menus. Even using the “Class” field in custom menu setup doesn’t do the trick, becuase WP puts the class in the li tag
<li id="menu-item-155" class="colorbox-link menu-item menu-item-type-custom menu-item-object-custom menu-item-155"><a href="https://facebook.com/TheMidwayBB">The Midway On Facebook</a></li>
The above link works fine, but not with colorbox. The link below works perfectly, but note the class is within the<a>
tags:
<a class="colorbox-link" href="https://themidwaybb.com/wp-content/cal_double.php">Check<br />Availability</a>
Any ideas? A way to fake out WP? (I actually tried typing in the class in the URL field, but WP strips out most, if not all of it.
Still thinking ??
Cheers,
KevinHello. I would be very grateful if you can help me too. I installed the plugin on this website https://blog.lunchbox.ro/ . An example of an img element from the website: <img class=”alignleft size-medium wp-image-873 colorbox-870″ width=”300″ height=”200″ alt=”” src=”https://blog.lunchbox.ro/wp-content/uploads/2012/04/IMG_5998-300×200.jpg” title=”IMG_5998″> . As you can see the colorbox class appears but it doesn’t work. Do you have any ideea? What should I do to make it work?
Thanks,
VladRE my last post, getting Colorbox to work on links in the Custom Menu, I came across another person who wanted the same for Fancybox, SO, thanks to HahahaComedy & his/her code (added in functions.php):
function add_menuclass($ulclass) { return preg_replace('/<a rel="fancybox"/', '<a rel="fancybox" class="fancybox"', $ulclass, 1); } add_filter('wp_nav_menu','add_menuclass');
I did:
function add_menuclass($ulclass) { return preg_replace('/<a rel="colorbox-link"/', '<a class="colorbox-link cboxElement"', $ulclass, 1); } add_filter('wp_nav_menu','add_menuclass');
After editing the functions, in Dashboard/Appearance/Menus, in the screen options tab up top, make sure the Link Relationship XFN is ticked. In Custom Menu involved, in the Link Relationship XFN field I added colorbox-link
This becomes class=”colorbox-link” WITHIN the anchor
<a /a>
, where it’needed, not with the li tags.It WORKS fine, just not sure it’s perfectly written/executed. Also, if I add a Title in the title field in Menu Setup, it stops working, so for now, I live without having the title in the ColorBox.
Anyone confirm this is good code? Fix it perfectly? Make it so the title field doesn’t break the link?
Anyway, for now, I’m happy to have it working at all.
Cheers,
KevinI also cannot get this plugin to work correctly.
After I red this thread I hoped that a re-installation of wordpress could help me, too, because I also tried out several lightbox plugins before installing jquery colorbox.
So I re-installed wordpress. On the fresh installation I only installed another plugin (antispam bee) and then jquery colorbox. Result: It will trigger on single pictures but not on gallerys.Can anyone help?
(WP: 3.3.2)
Hi,
if you post your URL here, I can take a look.
Cheers,
ArneSeems like I cannot send you private msgs here, so I used the form mailer on your homepage to send you the blog’s url.
[edit] oh, forgot about the form mailer. it doesn’t work for me. I used the mail adress provided on the imprint of your homepage.
[edit2] btw it just doesn’t work on the blog I provided within the mail. On my private blog it doesn’t work, too. :/
[edit3] and yes, wp and plugin are up to date. the admin has a username which is different from the default name. could that be a reason? Ive deleted antispambee. still not working. I even deleted htaccess password protection but that changed nothing.
i used this code too.
to add in the title you need to adjust what is being matched. Not entirely sure why this should break to fix the title issue
i removed refrence to the href ie.preg_replace('/rel="colorbox-link"/', 'class="colorbox-link cboxElement"
That should resolve the title issue.
Personally i am having an issue that if i have two links with the same rel only the first to load works. the rest break…
I have no idea why.
My only solution to this is to create duplicate functions that match different rel strings…
very annoying if you ask me …
- The topic ‘[Plugin: jQuery Colorbox] Looks Like a great Lightbox, But’ is closed to new replies.