Hi,
I want to have a lightbox effect for images.
I added to the link in a blog entry:
<a class="elgg-lightbox" ...
and
elgg_load_js('lightbox');
elgg_load_css('lightbox');
to Aalborg-Theme-Init.
=> no lightbox
How does that work ?
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.
- Sepp@HuberSepp
Sepp - 0 likes
- iionly@iionly
iionly - 0 likes
- Sepp@HuberSepp
Sepp - 0 likes
- Sepp@HuberSepp
Sepp - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- Sepp@HuberSepp
Sepp - 0 likes
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
You must log in to post replies.I wanted to edit a blog entry but CKEditor removes class="elgg-lightbox" from the link <a ...
How can I configure CKEditor that it does not remove class="elgg-lightbox" ?
It's not the CKEditor that removes it but the HTMLawed plugin. All "class" attributes are removed from input for security reasons.
what's so dangerous about "class" ?
and what about lightbox effect ?
For one thing classes are often used as jquery selectors for triggering any number of actions. Allowing arbitrary classes to be added to things by anyone could potentially mess up the javascript on the page. Also styling - this isn't a platform with a small number of trusted content creators that know what they're doing. A social network by definition is many content creators pushing content to many people. Do you really want someone reusing classes in user-defined content.
If you're using some admin-only action for a CMS-like feature you can certainly disable filtering for those inputs/outputs assuming you are trusting the content.
If I add 'class="elgg-lightbox"' to the link then a lightbox is opened, but the image is displayed with nonsens data. It seems not to recognize that it is an image.
<a class="elgg-lightbox-photo"
That looks good ...
Try elgg-lightbox-photo instead.