No access to guests No access to guests
 

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

Main Menu

No access to guests

Started by Forrest, December 19, 2003, 04:00:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Forrest

I have a couple different user forums with multiple photo gallerys.  I don't want any one to have access to any of the photos in the coppermine website without using a login id.  

I know I could make the albums only visible by Registered Users, but my registered users probably won't setup their albums this way.  And I would hate to have to set every album to registered users only.

Another option I have considered is:  Using mod_auth_mysql (in apache) to require a user to login to the coppermine directory.  I could even point mod_auth_mysql to the coppermine user database, for a more centralized password database.

Have you seen anyone do this before?

Do you know of any other solution routes I could use?  The only thing I don't like about the above, is he user will have to login twice.  Once to get into the website, and then again to upload.....

Thanks for all the help!

Casper

create an .htaccess file for the cpg albums directory (and all contained directories) which restricts access to the albums to logged on users. Then set config as here;

'Show first level album thumbnails in categories' = NO

'The content of the main page' = remove 'random' and 'last up'.

This should leave your cpg homepage  with the list of catagories and albums, but no thumbs.  And anyone not logged in will not be able to get to the albums.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

hm, this makes the script rely on .htaccess/webserver means of authentification, so the users will have to know an addidtional username and password.


I'd go for this option:
  • use a bridge file to enable bbs integration into coppermine - this way, coppermine will "know" all your registered users
  • in coppermine config, look for "Users can can have private albums" and set it to "yes"
  • in album properties of each album, look for the dropdown box that is labelled "Album can be viewed by" and choose the option "Members of the 'Registered' group"[/list:u]If you have loads of albums (say: more than hundred) you could also write a little query to run in mySQL that will set all abums as "registered users only".

    GauGau

Forrest

Thanks.

I think that I will just create a cron job to change all Albums to visibility "2".

There isn't a way to edit the PHP file to only allow "registered users view", and there not even be an option for "Everyone" is there?

Thanks again

Forrest

Forrest

Just for any future people that may want the same thing, here's what I did:

vi copper_allprivate

#!/bin/sh
mysql -u root -pmypassword
use copperminedb
UPDATE cpg11d_albums SET visibility=2;
exit


Then added this to cron.daily.

I still would like to see if there is a way to prevent an album from becomeing "Everyone" access.

But this will work too.

Thanks!

Joachim Müller

did you try what I was suggesting?
I can't see how a cron job should be used for this - most users who are webhosted don't have access to cron jobs at all, but if this works for you: fine...

GauGau

Oasis

you don't need to use cron jobs..
just go to the cpg11d_albums table and run
UPDATE cpg11d_albums SET visibility=2
that will set all existing albums to registered only
then edit the table properties so that visibility defaults to 2 instead of zero
that will make all new albums registered only
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org