is there a way to insert an HTML "link" on the image description
Permalink Browser Info Environment
First, the Plug-in is amazing, you have provided max control of just about everything. There is only one thing that I wonder if is possible and perhaps you could advise.
Is there a way that I could add HTML to the description box? this way I can add a hand-coded link to a page?
I don't know if you have considered adding a URL link feature to the "Thumbnails - Hover " located on the "settings section", That would be an amazing feature, maybe a simple field just to manually enter a url and an option to assign an icon, similar to the magnifying icon, maybe a "+" or Link icon
thank you
Is there a way that I could add HTML to the description box? this way I can add a hand-coded link to a page?
I don't know if you have considered adding a URL link feature to the "Thumbnails - Hover " located on the "settings section", That would be an amazing feature, maybe a simple field just to manually enter a url and an option to assign an icon, similar to the magnifying icon, maybe a "+" or Link icon
thank you
Type: | Ticket |
---|---|
Status: | Archived |
I Realized the link would probably be added to the description, so maybe a blank field to add a link could be provided on the image the description section
Hi
1. Currently, to display html in title/description, you need to edit this file (remove escaping functions):
packages/grand_gallery/blocks/grand_gallery/js_files/photo-swipe.js
Line 70: Replace
with
------------
Line 78: Replace
with
You will need to do it everytime package is updated.
But I will consider removing escaping function in future, probably it is not needed there.
2. When you edit images in block, there is a link below "Tags": "Enable more options". It will take you to Settings page.
Change "Max. number of images per gallery" to "Enable all fields".
Read all info in that section (for example max. number of images with default php settings is 72).
Now in block, instead aforementioned link, select field will appear (where you can change default lightbox behaviour to something else).
In "Thumbnails - Hover " you can change icon. Write "link" (or something like that) and you will get basic font awesome icon for links.
You can't mix icons in single gallery unless you make custom template for it.
1. Currently, to display html in title/description, you need to edit this file (remove escaping functions):
packages/grand_gallery/blocks/grand_gallery/js_files/photo-swipe.js
Line 70: Replace
item.title += '<span class="gg-photo-swipe-title">'+_.escape(galleryEl.getAttribute('title'))+'</span>';
with
item.title += '<span class="gg-photo-swipe-title">'+galleryEl.getAttribute('title')+'</span>';
------------
Line 78: Replace
description = _.escape(description);
with
//description = _.escape(description);
You will need to do it everytime package is updated.
But I will consider removing escaping function in future, probably it is not needed there.
2. When you edit images in block, there is a link below "Tags": "Enable more options". It will take you to Settings page.
Change "Max. number of images per gallery" to "Enable all fields".
Read all info in that section (for example max. number of images with default php settings is 72).
Now in block, instead aforementioned link, select field will appear (where you can change default lightbox behaviour to something else).
In "Thumbnails - Hover " you can change icon. Write "link" (or something like that) and you will get basic font awesome icon for links.
You can't mix icons in single gallery unless you make custom template for it.
You would probably need to strip html tags from title too.
packages/grand_gallery/blocks/grand_gallery/view.php
Line 93
Replace
with
packages/grand_gallery/blocks/grand_gallery/view.php
Line 93
Replace
title="<?php echo h($image['view_title']); ?>"
with
title="<?php echo h(strip_tags($image['view_title'])); ?>"
Thank you for your instructions. they are detailed and simple, I appreciate the great support