coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: steveski on October 15, 2010, 12:59:19 AM

Title: Force absolute URLs for thumbnails.php
Post by: steveski 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"
Title: Re: Force absolute URLs for thumbnails.php
Post by: ΑndrĂ© on October 15, 2010, 11:05:25 AM
Open include/functions.inc.php, find
$pic_url = get_pic_url($row, 'thumb');
and replace with
$pic_url = $CONFIG['ecards_more_pic_target'].get_pic_url($row, 'thumb');
Title: Re: Force absolute URLs for thumbnails.php
Post by: steveski 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.
Title: Re: Force absolute URLs for thumbnails.php
Post by: ΑndrĂ© on October 15, 2010, 05:46:19 PM
Please mark your thread as solved: http://forum.coppermine-gallery.net/index.php/topic,55415.msg270631.html#msg270631