1
Mods & Plugins (Releases & Support) / Re: [Mod] Display image codes on details page (image permalink)
« on: March 24, 2008, 01:21:59 PM »Can this be made to work with images hosted off site?
I get something like this:Code: [Select]<a href="http://mysite.com"><img src="http://mysite.com/data/media/3/http://i140.photobucket.com/albums/r32/image.gif" border="0" alt="http://i140.photobucket.com/albums/r32/image.gif"></a>
Notice the "img src" tag, the path is wrong...
Thanks!
There is a function named: is_remote(_) that it see if the image is remote. Ok you need to do the next
Find into the mod:Code: [Select]$uploaded_image_path = $script_url."/".MEDIA_DIR."/".$cat_id."/".$new_name;
and remplace:
$uploaded_thumb_path = $script_url."/".THUMB_DIR."/".$cat_id."/".$new_name;Code: [Select]if(is_remote($new_name)){
$uploaded_image_path = $new_name;
}else{
$uploaded_image_path = $script_url."/".MEDIA_DIR."/".$cat_id."/".$new_name;
}
if(is_remote($image_row['image_thumb_file']))
$uploaded_thumb_path = $image_row['image_thumb_file'];
else
$uploaded_thumb_path = $script_url."/".THUMB_DIR."/".$cat_id."/".$new_name;
Not work ! Can you fix it ?