Making an image appear in Lightbox from a link
Permalink
I have been struggling with this all day and I am stumped. If someone could help me I would be very grateful. I have been trying to make a link on an image in content that would make the image appear in Lightbox. There is lots of stuff about this in the Forum but everything I try fails - either the new image goes to a different page or I get a "download image" window.
Here is the link:http://barbarazechel.de/index.php?cID=227...
Can anyone see what I am doing wrong?
Here is the link:http://barbarazechel.de/index.php?cID=227...
Can anyone see what I am doing wrong?
The free fancybox gallery contains examples of the code you need.
That's true but you can't add the gallery in a normal content box and that is what I need. Others have made it work - I have read all of the posts and I am doing something wrong and don't see what. Can anyone help?
http://www.concrete5.org/marketplace/addons/lightboxed-image/
try this one
try this one
This is a great block and I will probably use it in the future but again it doesn't allow you to lightbox an image in context.
I wasn't thinking you should actually use it. Just dismantle it for examples of how to do it yourself, probably possible by modifying the view of a normal content block.
@majorius's suggestion of the lightboxed image also looks like a good starting point.
@majorius's suggestion of the lightboxed image also looks like a good starting point.
In the end, I have done essentially what you said. I found another forum where it was explained how to get around conflictig scripts (http://www.concrete5.org/community/forums/themes/jquery-conflict-area-not-editable/) and that solved the biggest problem. The solution isn't pretty but the client will be able to lightbox images in content and that is what we needed. Thanks for trying to help!
A trick I have been experimenting with is to edit the jQuery plugin script file and wrap the plugin code in an if statement.
This does not prevent duplicate downloads, but can stop a duplicate download from breaking a site (robustness depends entirely on the order of download).
In the long term there should be an improved script management change coming in the next version of C5 that helps prevent multiple downloading of things like fancybox.
(function($){ // make sure jq plugin is not already defined if(typeof $.fn.fancybox === 'undefined'){ // Original plugin code } })(jQuery);
This does not prevent duplicate downloads, but can stop a duplicate download from breaking a site (robustness depends entirely on the order of download).
In the long term there should be an improved script management change coming in the next version of C5 that helps prevent multiple downloading of things like fancybox.