forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 miscellaneous => Topic started by: sjj1805 on August 30, 2019, 05:45:23 pm

Title: Hyperlinks not working in description field
Post by: sjj1805 on August 30, 2019, 05:45:23 pm
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
Code: [Select]
[url=http://stevejjones.co.uk/takeaway/albums/Files/Farmer_Johns.pdf]Menu / Bookings[/url]
Any idea how to fix this please?
Title: Re: Hyperlinks not working in description field
Post by: lurkalot on August 30, 2019, 10:25:56 pm
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
Title: Re: Hyperlinks not working in description field
Post by: 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.
Title: Re: Hyperlinks not working in description field
Post by: lurkalot on August 31, 2019, 07:53:55 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. 
Title: Re: Hyperlinks not working in description field
Post by: ron4mac on August 31, 2019, 02:37:02 pm
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
Code: [Select]
$caption .= '<span class="thumb_caption thumb_caption_caption">' . strip_tags(bb_decode($row['caption'])) . '</span>';with
Code: [Select]
$caption .= '<span class="thumb_caption thumb_caption_caption">' . bb_decode($row['caption']) . '</span>';
Title: Re: Hyperlinks not working in description field
Post by: sjj1805 on September 01, 2019, 01:57:49 am
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.