Must Register Must Register
 

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]

Main Menu

Must Register

Started by bajs, March 31, 2006, 12:46:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bajs

I have a bunch of albums in my gallery, and it would be a hard job to go in in every album and specify that only registred users can view the files.

Then there's this other option:

When set to "No", unlogged users (i.e. guests or anonymous users) can not access anything in your gallery except the login screen (and the registration screen, if you allow registrations). Completely disabling anonymous access will probably decrease your site's popularity. Use this option only if you need your gallery to be absolutely private. The recommended setting is to leave anonymous access enabled and use the more specific permissions by groups and albums settings instead.

which I'm not too fond of either.

So I wonder, is there any way to make registration a mandatory procedure, but still, give the unregistred users access to only view the thumbnails? Or maybe, to only view the categories, but no pictures?

cause it'd realllly be some hard work to change each album manually ...  :-\


Joachim Müller


bajs

that's great! Precicely what I wanted.

Though, this goes for all categories and albums. Can I make only ONE category public - while all other albums and categories stays the way they are now (currently, anonym. can only view thumbnails, I added the "if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);" thingy)


Joachim Müller


bajs

I have the option set up "Everybody" ...

But ever since I installed that hack thingy (thumbnails only) it doesn't matter if I set the option to "viewed by everybody". cause it still won't let non registred users view the images.

At least that's what it does to my gallery

Stramm

undo your edits... then find in displayimage.php
$album = isset($_GET['album']) ? $_GET['album'] : '';
below add
if ($album != xxx  && !USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);

replace the 'xxx' with the aid of the album you want to be able to be browsed by unregistered users
(the aid can be seen in the browser's statusbar when moving the mousepointer over the album --> you'll see something like thumbnails.php?album=11 , in this case the aid is 11)

jerx

#7
I like to grant access to full size images for a certain category and not for one album only. I tried this:

if ($cat != xxx  && !USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);

Unfortunately it does not work correctly. If you go into the category and click on a recent comment or random picture, you are able to view the full size image. But if you go into one of the cagory' s albums and click on a picture, you get the error message "You need to register to access this page".

Does anybody know how to make it work properly?