"Bookmark Image" fix? "Bookmark Image" fix?
 

News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

"Bookmark Image" fix?

Started by alphasix, November 29, 2003, 02:20:48 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

alphasix

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:

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

instead of:

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)
$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:


                    $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?

DJMaze

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
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0