- Posts: 5
- Thank you received: 0
Show filename in Responsive Lightbox
-
sjeng.aarts
Active member - Topic Author
- Offline
- New Member
-
Less
More
2 weeks 3 days ago #52212
by sjeng.aarts
Show filename in Responsive Lightbox was created by sjeng.aarts
Is there a way to show the filenames from the individual files in the image directory of the Hot Responsive Lightbox plugin?
I don't want to use the the alt values because the (many) images changes often.
I don't want to use the the alt values because the (many) images changes often.
Please Log in to join the conversation.
2 weeks 2 days ago #52213
by milos
Replied by milos on topic Show filename in Responsive Lightbox
Hello,
This plugin shows the empty ALT value. If you want to have a text below the thumbnail image that shows the filename, it's possible, but this can't be any custom text. Just the image file name. To achieve this, edit the file /plugins/content/responsivelightbox/responsivelightbox.php and change this line:
to this:
Regards,
Milos
This plugin shows the empty ALT value. If you want to have a text below the thumbnail image that shows the filename, it's possible, but this can't be any custom text. Just the image file name. To achieve this, edit the file /plugins/content/responsivelightbox/responsivelightbox.php and change this line:
Code:
$output.= '<li><a href="'.URI :: base().'/'.$images_dir[0].$file.'" data-imagelightbox="'.$lightboxMode.'"><img src="'.$thumbnail_image.'" alt="" /></a></li>';
to this:
Code:
$output.= '<li><a href="'.URI :: base().'/'.$images_dir[0].$file.'" data-imagelightbox="'.$lightboxMode.'"><img src="'.$thumbnail_image.'" alt="" /></a><p>'.$file.'</p></li>';
Regards,
Milos
Please Log in to join the conversation.
-
sjeng.aarts
Active member - Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
1 week 6 days ago #52216
by sjeng.aarts
Replied by sjeng.aarts on topic Show filename in Responsive Lightbox
Hi Milos,
Thanks for your answer, but the code you gave me does not work.
Just showing the file name is the solution I am looking for.
When I add <p>'.$file.'</p> nothing happens.
Can you please check it?
Thanks for your answer, but the code you gave me does not work.
Just showing the file name is the solution I am looking for.
When I add <p>'.$file.'</p> nothing happens.
Can you please check it?
Please Log in to join the conversation.
1 week 6 days ago #52219
by milos
Replied by milos on topic Show filename in Responsive Lightbox
Hello,
Are you using the plugin or module? The solution I gave you is for the plugin. Are you sure which plugin you are using for your page? Please send the link to your website where the lightbox is published so we can check.
Regards,
Milos
Are you using the plugin or module? The solution I gave you is for the plugin. Are you sure which plugin you are using for your page? Please send the link to your website where the lightbox is published so we can check.
Regards,
Milos
Please Log in to join the conversation.
-
sjeng.aarts
Active member - Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
1 week 6 days ago #52220
by sjeng.aarts
Replied by sjeng.aarts on topic Show filename in Responsive Lightbox
Hi Milos,
I am using (the plugin) Lightbox in a module.
see www.sjengaarts.nl --> homepage scroll down to Gallery annual plants
Thanx
I am using (the plugin) Lightbox in a module.
see www.sjengaarts.nl --> homepage scroll down to Gallery annual plants
Thanx
Please Log in to join the conversation.
1 week 6 days ago #52221
by milos
Replied by milos on topic Show filename in Responsive Lightbox
Hello,
In the first post, you indicated that you are using the plugin. For module, edit file /modules/mod_hot_responsive_lightbox/tmpl/default.php
Around line 266 change this part:
to this:
Regards,
Milos
In the first post, you indicated that you are using the plugin. For module, edit file /modules/mod_hot_responsive_lightbox/tmpl/default.php
Around line 266 change this part:
Code:
if (isset($alt_value[$index_alt])) {
echo '<li><a href="'.$mosConfig_live_site.'/'.$images_dir.$file.'" data-imagelightbox="'.$lightboxMode.$uniqueid.'"><img src="'.$thumbnail_image.'" alt="'.$alt_value[$index_alt].'" /></a></li>';
} else {
echo '<li><a href="'.$mosConfig_live_site.'/'.$images_dir.$file.'" data-imagelightbox="'.$lightboxMode.$uniqueid.'"><img src="'.$thumbnail_image.'" alt="" /></a></li>';
}
to this:
Code:
if (isset($alt_value[$index_alt])) {
echo '<li><a href="'.$mosConfig_live_site.'/'.$images_dir.$file.'" data-imagelightbox="'.$lightboxMode.$uniqueid.'"><img src="'.$thumbnail_image.'" alt="'.$alt_value[$index_alt].'" /></a><p>'.$file.'</p></li>';
} else {
echo '<li><a href="'.$mosConfig_live_site.'/'.$images_dir.$file.'" data-imagelightbox="'.$lightboxMode.$uniqueid.'"><img src="'.$thumbnail_image.'" alt="" /></a><p>'.$file.'</p></li>';
}
Regards,
Milos
Please Log in to join the conversation.
Time to create page: 0.242 seconds