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: Getting the absolute filename?  (Read 3617 times)

0 Members and 1 Guest are viewing this topic.

NigelH

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Getting the absolute filename?
« on: October 30, 2003, 03:06:08 pm »

I would like to be able to list the absolute filename in the details when a user views image details.  As standard it shows the url which is effectively a call through the script, I need the absolute address to be shown i.e.

http://www.xxx.co.uk/coppermine/filename.jpg

Is that possible and how?

Many thanks.

PS Just discovered Coppermine and it's incredible!  Well, written and very well presented, I almost feel guilty using it for nothing!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Getting the absolute filename?
« Reply #1 on: October 31, 2003, 06:28:53 am »

edit displayimage.php and look for
Code: [Select]
   // Create the absolute URL for display in info
    $info['URL'] = '<a href=' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . ' >' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
Replace it with
Code: [Select]
   // Create the absolute URL for display in info
    $info['URL'] = '<a href=' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . ' >' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a><br /> '.$CONFIG["ecards_more_pic_target"].$path_to_pic;

In the same way, you can make it clickable, but what's the point of having the naked pic instead of the full url to the html with the embedded pic?

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.012 seconds with 15 queries.