Hey guys,
I'm trying to open a picture (from a thumb) in a lightbox but I only get garbish (cryptic signs, I think the browser is trying to open the pic as text and not as an image). I already copied the code from the showcase-plugin for that, where it seems to work, but it doesn' work on my server. A direct call of the url works, but a call within a lightbox not. Here is the (simplified) code. Please, can you help me?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Arsalan Shah@arsalanlee
Arsalan Shah - 0 likes
- Viktor@vPriVate
Viktor - 0 likes
- Viktor@vPriVate
Viktor - 0 likes
- Evan Winslow@ewinslow
Evan Winslow - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
You must log in to post replies.Try to get file using file_get_contents
Thanks for this hint, but the output is the same :(
I'm experiencing this problem since Elgg 1.9, with 1.8 the output was fine. The content-type within the header should work, in the view.php the img within the <a>-tag is displayed correctly.
I now *could* create an extra-view (which I, for testing, already did) to call the content for the lightbox within an <img>-tag, but in this case the size for the lightbox is very small the every first time I click on an image to open it -.-
Which elgg-version is this community-site? Already 1.9 (it seems like that because of the theme)? Here the showcase-plugin (where I have the above code-snippet from) works fine as well...
I was grabbing a bit deeper and found another possible class (within the lightbox.js) to declare a lightbox:
elgg-lightbox-photo
This sets the content-type for the lightbox to photo:true, which means:
This solves my problem! It would be great if this class could mentioned in the docs somewhere...
Hey, Viktor, glad you found a solution -- agreed that'd be nice to have in the docs. Can you report an issue on github for us to add that or better yet submit a PR to add it? Thanks!
That's one of the reasons I've started creating image urls with an 'image.jpg' type ending
Better compatibility with dumb libraries