Hyperlinks not working in description field Hyperlinks not working in description field
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Hyperlinks not working in description field

Started by sjj1805, August 30, 2019, 05:45:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sjj1805

Since I upgraded to PHP 7.x I have noticed that if i place a hyperlink in the 'Description field that on the "Thumbnails.php" screen it no longer works but simply displays the text.
The hyperlink placed in the "Title" field still works as it should.

On the "Displayimage.php" screen both hyperlinks display and work correctly.
There are times where I need two different hyperlinks for the same image. As an example pleasew view firstly the screen that dows not work
http://stevejjones.uk/takeaway/thumbnails.php?album=10

Then compare this to the screen that does work
http://stevejjones.uk/takeaway/displayimage.php?album=10&pid=734#top_display_media

You will see the line  "Menu/Bookings" works on the second link but not the first.
Here is the code entered into the "Description" field
[url=http://stevejjones.co.uk/takeaway/albums/Files/Farmer_Johns.pdf]Menu / Bookings[/url]

Any idea how to fix this please?

lurkalot

What version did you upgrade from?   The ability to use bbcode tags [ i m g ] and [ u r l ] was removed from comments or upload descriptions in cpg1.4.21 onwards for security reasons. https://forum.coppermine-gallery.net/index.php/topic,58309.msg286780.html#msg286780
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

sjj1805

I have only ever used versions 1.5.x
I checked an old virtual box virtual machine I have that is running Windows XP SP3 with PHP Version 5.3.6.
The Coppermine version in that virtual machine is 1.5.18 and the hyperlinks work perfectly in both the Title and the description fields.

On my normal computer I upgraded my version of PHP from 5.3.6 to PHP v7.1.7 and also upgraded the version of coppermine I had at that time - 1.5.46 - to coppermine 1.6.03 and discovered a few bugs which I hah previously reported on this forum have since been sorted out.

lurkalot

Quote from: sjj1805 on August 31, 2019, 02:47:52 AM
I have only ever used versions 1.5.x
I checked an old virtual box virtual machine I have that is running Windows XP SP3 with PHP Version 5.3.6.
The Coppermine version in that virtual machine is 1.5.18 and the hyperlinks work perfectly in both the Title and the description fields.

On my normal computer I upgraded my version of PHP from 5.3.6 to PHP v7.1.7 and also upgraded the version of coppermine I had at that time - 1.5.46 - to coppermine 1.6.03 and discovered a few bugs which I hah previously reported on this forum have since been sorted out.

Sorry I misunderstood your original post, now I see what you're saying.  Basically, the links show fine when viewing a image in normal view, but not in thumbnail view, or on the thumbnail page.  I have no answer for this, but hopefully one of the other team members will come along with a solution. 
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

ron4mac

Hyper links have not been clickable in a description (caption) displayed with a thumbnail since before CPG 1.4.x.  If you had a gallery where it displayed like that, it must have been due to a custom modification.

In the file include/functions.inc.php, at about line # 1154, replace the line
$caption .= '<span class="thumb_caption thumb_caption_caption">' . strip_tags(bb_decode($row['caption'])) . '</span>';
with
$caption .= '<span class="thumb_caption thumb_caption_caption">' . bb_decode($row['caption']) . '</span>';

sjj1805

Ron4Mac,
Many thanks - that has fixed it.
I don't remember modifying that particular code but over the years I have (obviously) made various modifications to personalise my site.