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 [2]   Go Down

Author Topic: Disallow unregistered to see original size  (Read 17377 times)

0 Members and 1 Guest are viewing this topic.

Keanuette

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Disallow unregistered to see original size
« Reply #20 on: October 24, 2004, 01:22:51 pm »

ok, just read the previous thread and added that extra bit. Thanks anyho.  ;D
Logged

Coyote

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Disallow unregistered to see original size
« Reply #21 on: December 20, 2004, 10:18:00 pm »

This is great - but Is it possible to validate the usergroup with code similar to above? Im using the smf bridge (non api version)

I just want the above code to work for users in the group 'Newbie'. But I cant find how to validate it :(

Any ideas appreciated.

Thanks,

Tony,
Logged

legend_neo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
Re: Disallow unregistered to see original size
« Reply #22 on: January 16, 2005, 10:24:53 pm »

hi .. i searched but cant find which mod u r talking about ...  or which php file that u r refering  ..

so in a simple way  ... if i ch mod full size images using ftp client like "cute ftp" and ch mood them to "660"  ... will it work ???

please explain me ... will it just prevent ppl from linking to the pic .. i mean the pic will be displayed on the gallery  ... aor it has any other effect as well .....
Logged

Ronski

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Disallow unregistered to see original size
« Reply #23 on: June 27, 2005, 02:05:47 pm »

been trying to figure out how to do this, great thread thanks for all the code posts everyone!

Cheers,
Kieron
Logged

LilAngel

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Disallow unregistered to see original size
« Reply #24 on: December 06, 2005, 07:12:56 pm »

I had this small hack on 1.3, and I would really like to use it again. I don't want to use the disable guest access function, cause I do allow people to browse the gallery.. just not see the HQs.
Logged

Xandrios

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Disallow unregistered to see original size
« Reply #25 on: December 07, 2005, 08:06:39 pm »

For the new 1.4.2 version of the gallery it works a bit different. You need to edit include/themes.inc.php, this is how it works:

find:
Quote
            $pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";
         

and replace that with:
Quote
            if(USER_ID) {
            $pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";
         }else{
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" onclick=\"alert('Please login to see the full size picture.')\"/><br />";      
         }

You can leave out the Alert-part if you want, but its a nice way to makes things clear for your visitors.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Disallow unregistered to see original size
« Reply #26 on: January 19, 2006, 02:50:51 am »

This it the wrong place to discuss the 1.4 version but since you did, let me say that you should *never* edit themes.inc.php.  Instead, copy the code you need from the sample theme's theme.php file into your theme's theme.php and modify at will.  The variables & functions in the sample theme show you all the display-related things you can modify without touching the core Coppermine code.

Another way in version 1.4 to do what this thread discusses is to use my plugin:
http://forum.coppermine-gallery.net/index.php?topic=25010.0.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.069 seconds with 20 queries.