• In the sharing tab, the option, Custom link, URL: {{text}}, which is labeled as image caption does not give a pure image caption and instead gives… div%20class%3D”pswp__caption__text”>YOUR_CAPTION_HERE<%2Fdiv>.

    I have spent the last 5 hours combing through all the javascript and PHP files to try find a work around but can’t seem to find a solution. I would like to get the pure caption or even some unique identifier per image so I can build custom pages for each one. Any help from anyone here even pointing me in the right direction would be very very appreciated. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    The problem is, that the caption is taken from the PhotoSwipe element which contains the caption. However this is NOT just text but also HTML to format the caption and also may contain EXIF data as well:

    <div class="pswp__caption__center">
      <!--- The following content is the "caption" --->
      <div class="pswp__caption__alt">Caption based on alternative text</div>
      <div class="pswp__caption__exif">
        <span class="pswp__caption__exif_camera">SONY DSC-RX100M4</span> <span class="pswp__caption__exif_focal">47mm</span> <span class="pswp__caption__exif_fstop">f/8</span> <span class="pswp__caption__exif_shutter">1/250s</span> <span class="pswp__caption__exif_iso">ISO125</span> <span class="pswp__caption__exif_datetime">2018-09-15</span>
      </div>
    </div>

    So maybe the whole option makes no sense as it works at the moment. To make this work, it would be neccessary to have the caption as text only somewhere in the Photoswipe UI. However this would require a change in PhotoSwipe itself. Also this only implemented for PhotoSwipe 4 which is not maintained any longer and only kept for compabilitiy reasons. So likely a change for this may not ever happen at all, sorry.

    I hope I can bring back the share menu for PhotoSwipe 5 once – but since PhotoSwipe 5 itself does not support that out of the box it has to be developed first as a plugin, similar to the full screen mode and caption output which are also plugins for PhotoSwipe 5.

    Thread Starter massmoaa

    (@massmoaa)

    I understand, thanks so much for the thoughtful reply.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom link, URL {{text}} –?image caption’ is closed to new replies.