Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Hyperlinks not working in description field  (Read 35957 times)

0 Members and 1 Guest are viewing this topic.

sjj1805

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Hyperlinks not working in description field
« 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?
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Hyperlinks not working in description field
« Reply #1 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
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

sjj1805

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Hyperlinks not working in description field
« Reply #2 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.
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Hyperlinks not working in description field
« Reply #3 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. 
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Hyperlinks not working in description field
« Reply #4 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>';
Logged

sjj1805

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Hyperlinks not working in description field
« Reply #5 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.