Skip to content

Commit d3cea9b

Browse files
committed
Added support for LightBox
1 parent e8a981e commit d3cea9b

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

imcger/imgupload/styles/all/template/event/overall_footer_body_after.html

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131
if ({{ S_IMCGER_FANCYBOX_VERSION > 2 ? 1 : 0 }}) {
3232
link.attr('data-fancybox', attach_id);
3333
link.attr('data-caption', real_filename);
34-
}
35-
else {
34+
} else if ({{ S_LIGHTBOX_ALL_IMAGES || LIGHTBOX_RESIZE_WIDTH || LIGHTBOX_RESIZE_HEIGHT ? 1 : 0 }}) {
35+
// If LightBox aktive add LightBox attribut to the link
36+
link.attr('data-lightbox', attach_id);
37+
link.attr('data-title', real_filename);
38+
} else {
3639
// Do nothing wenn click on image
3740
link.attr('onclick', 'return false;');
3841
}
@@ -44,7 +47,7 @@
4447
* Update the relevant elements and hidden data for an attachment.
4548
*
4649
* @param {int} index The index from phpbb.plupload.ids of the attachment to edit.
47-
* @param {Array} downloadUrl Optional array of download urls to update.
50+
* @param {array} downloadUrl Optional array of download urls to update.
4851
*/
4952
phpbb.plupload.updateRow = function(index, downloadUrl) {
5053
const allowedExt = [{{ IUL_ALLOWED_IMAGES }}];
@@ -58,21 +61,23 @@
5861
let url = downloadUrl[index].replace('&', '&'),
5962
link = $('<a></a>');
6063

61-
// If image add thumbnail to the link
6264
if (isImg) {
65+
// If image add thumbnail to the link
6366
link.attr('href', url).html('<img src="' + url + '&t=1" title="' + attach.real_filename + '" alt="' + attach.real_filename + '">');
6467

6568
// If FancyBox aktive add FancyBox attribut to the link
6669
if ({{ S_IMCGER_FANCYBOX_VERSION > 2 ? 1 : 0 }}) {
6770
link.attr('data-fancybox', attach.attach_id);
6871
link.attr('data-caption', attach.real_filename);
69-
}
70-
else {
72+
} else if ({{ S_LIGHTBOX_ALL_IMAGES || LIGHTBOX_RESIZE_WIDTH || LIGHTBOX_RESIZE_HEIGHT ? 1 : 0 }}) {
73+
// If LightBox aktive add LightBox attribut to the link
74+
link.attr('data-lightbox', attach.attach_id);
75+
link.attr('data-title', attach.real_filename);
76+
} else {
7177
// Do nothing wenn click on image
7278
link.attr('onclick', 'return false;');
7379
}
74-
}
75-
else {
80+
} else {
7681
link.attr('href', url).html(attach.real_filename);
7782
}
7883

0 commit comments

Comments
 (0)