forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 PHPnuke/Postnuke Support => Topic started by: alphasix on November 29, 2003, 02:20:48 am

Title: "Bookmark Image" fix?
Post by: alphasix on November 29, 2003, 02:20:48 am
I am using the PHP-Nuke coppermine 1.2RC4 version on a BSD box with Apache (I'm not sure any of that will make a difference, but included just in case.)

Anyway, since upgrading to 1.2 I have had problems with the "Bookmark Image" link in that is would send a broken URL for the picture due to a malformed HTTP link, it would look something like this:

Code: [Select]
http://www.mysite.commodules.php?name=coppermine&file=displayimage&pos=-128

instead of:

Code: [Select]
http://www.mysite.com[b]/[/b]modules.php?name=coppermine&file=displayimage&pos=-128

I finally interested enough to attempt to remedy this:

in displayimage.php look for the following (line 290 for me)
Code: [Select]
$info["URL"] = <<<JSCT
<a href="{$CONFIG["ecards_more_pic_target"]}$CPG_URL&file=displayimage&pos=-{$CURRENT_PIC_DATA["pid"]}"
onClick="addBookmark('{$CURRENT_PIC_DATA["filename"]}','{$CONFIG["ecards_more_pic_target"]}$CPG_URL&file=displayimage&pos=-{$CURRENT_PIC_DATA["pid"]}');return false">{$lang_picinfo"bookmark_page"]}</a>
JSCT;


and change it to the following:

Code: [Select]

                    $info["URL"] = <<<JSCT
<a href="{$CONFIG["ecards_more_pic_target"]}/$CPG_URL&file=displayimage&pos=-{$CURRENT_PIC_DATA["pid"]}"
onClick="addBookmark('{$CURRENT_PIC_DATA["filename"]}','{$CONFIG["ecards_more_pic_target"]}/$CPG_URL&
file=displayimage&pos=-{$CURRENT_PIC_DATA["pid"]}');return false">{$lang_picinfo["bookmark_page"]}</a>
JSCT;


The only changes I made to the code: I added the "/" before $CPG_URL in both occurences.


Has anyone else had this problem with Bookmarking images?
Title: "Bookmark Image" fix?
Post by: DJMaze on November 29, 2003, 03:29:09 am
Nope because our ecards_more_pic_target in the coppermine config has a "/" at the end so our config screen should say:

http://www.mysite.com/

and not like yours:

http://www.mysite.com