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: HACK: Link to origonal image directly.  (Read 2116 times)

0 Members and 1 Guest are viewing this topic.

pkulak

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
    • PKulak.com
HACK: Link to origonal image directly.
« on: May 04, 2004, 01:16:56 am »

In displayimage.php change:

Code: [Select]
   if (isset($image_size['reduced'])) {
        $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
        $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
        $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
        $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title; //added by gaugau
        $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
        $pic_html .= "</a>\n";
    } else {

to

Code: [Select]
   if (isset($image_size['reduced'])) {
        $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
        $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
        $fulsize_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
        $pic_html = "<a href=\"$fulsize_url\" target=\"top\">";
        $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title; //added by gaugau
        $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
        $pic_html .= "</a>\n";
    } else {
Logged
"To do any good at all, just believing you are right and you motives are good isn't enough." - Ursula K. Le Guin

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: HACK: Link to origonal image directly.
« Reply #1 on: May 04, 2004, 04:06:19 am »

Just turn the intermediate pictures off in the Admin and it will do the same....
Logged
SANIsoft PHP applications for E Biz

pkulak

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
    • PKulak.com
Re: HACK: Link to origonal image directly.
« Reply #2 on: May 04, 2004, 04:55:07 am »

LINK to the image directly, not DISPLAY the image directly. ;)
Logged
"To do any good at all, just believing you are right and you motives are good isn't enough." - Ursula K. Le Guin

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: HACK: Link to origonal image directly.
« Reply #3 on: May 04, 2004, 07:13:09 am »

 :-[ Oops! My bad
Logged
SANIsoft PHP applications for E Biz
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 14 queries.