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: Force absolute URLs for thumbnails.php  (Read 2556 times)

0 Members and 1 Guest are viewing this topic.

steveski

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Force absolute URLs for thumbnails.php
« on: October 15, 2010, 12:59:19 am »

Is there a way to force all thumbnail URLs to be absolute and not relative?  Not sure which file/template to change to do this.  (I realize it is probably a hack).

I want it to be

src="http://www.noizemag.com/photos/albums/2010_Events/MRNY_BBCM/thumb_mrny_bbcm2010_07_5949.jpg"

instead of

src = "albums/2010_Events/MRNY_BBCM/thumb_mrny_bbcm2010_07_5949.jpg"
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Force absolute URLs for thumbnails.php
« Reply #1 on: October 15, 2010, 11:05:25 am »

Open include/functions.inc.php, find
Code: [Select]
$pic_url = get_pic_url($row, 'thumb');and replace with
Code: [Select]
$pic_url = $CONFIG['ecards_more_pic_target'].get_pic_url($row, 'thumb');
Logged

steveski

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Force absolute URLs for thumbnails.php
« Reply #2 on: October 15, 2010, 05:23:04 pm »

Thank you!  Worked perfectly.  This also fixes the Facebook problem of not embedding photo thumbnails when linking to a Coppermine album from Facebook.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Force absolute URLs for thumbnails.php
« Reply #3 on: October 15, 2010, 05:46:19 pm »

Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.