coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: Alex53 on September 21, 2005, 12:32:44 PM

Title: Moderators
Post by: Alex53 on September 21, 2005, 12:32:44 PM
I would like to be able to create users who can approve uploads, but that dont have full access to the configuration, etc. like the admin has, so it would be a kind of Moderator.

I use version 132, please advise whether this is possible.
Title: Re: Moderators
Post by: Nibbler on September 21, 2005, 12:48:48 PM
Not currently possible, but may be in the future. Search the board for previous discussions.
Title: Re: Moderators
Post by: Stramm on September 21, 2005, 05:18:10 PM
tell me if it works... create a group called 'Moderators' (case sensitive)... move a user into that group. This user has to be in (user) admin mode then let him call domain/cpgdir/editpics.php?mode=upload_approval (same as for admin... just admin has that link in the admin menu, the moderator not... you can add it if you want...)

now open editpics.php
after
define('EDIT_PICTURES_MODE', !isset($HTTP_GET_VARS['mode']));
add
define('MODERATOR_MODE', $USER_DATA['group_name']=="Moderators");



few lines below replace
if (UPLOAD_APPROVAL_MODE && !GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
with
if (UPLOAD_APPROVAL_MODE && ((!MODERATOR_MODE) && (!GALLERY_ADMIN_MODE))) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);


this should work but I haven't tested it....