Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Must Register  (Read 3957 times)

0 Members and 1 Guest are viewing this topic.

bajs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 90
Must Register
« on: March 31, 2006, 12:46:55 pm »

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 ...  :-\
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

bajs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 90
Re: Must Register
« Reply #3 on: April 06, 2006, 05:26:47 pm »

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)

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Must Register
« Reply #4 on: April 06, 2006, 07:09:34 pm »

Logged

bajs

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 90
Re: Must Register
« Reply #5 on: April 12, 2006, 04:09:44 pm »

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
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Must Register
« Reply #6 on: April 12, 2006, 05:32:45 pm »

undo your edits... then find in displayimage.php
Code: [Select]
$album = isset($_GET['album']) ? $_GET['album'] : '';below add
Code: [Select]
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 85
Re: Must Register
« Reply #7 on: September 19, 2006, 06:43:04 am »

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

Code: [Select]
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?
« Last Edit: September 19, 2006, 09:54:13 am by jerx »
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.