more admins? more admins?
 

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

more admins?

Started by lilleman, May 02, 2005, 01:27:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lilleman

my gallery (version 1.3.1) is bridged with invision power board (version 2.0.0) and now i want more users to be able to help me in the gallery
i know there are no moderator possibility so admin it is... im on it so far
i have a group of "supermoderators" that ive made in my forum so one way might be:

if (!(GALLERY_ADMIN_MODE || ($USER_DATA['user_group'] == X))) {
   cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}

problem is i dont know what groupnumber the group have so i havnt got it to work... ive tried with 0 to 20 i guess with no luck (0 was no god because that gave everyone (even not logged in) admin rights)
ive searched some in here and also read that if i click on users (usermgr.php) i can give a group admin rights... problem there is that when i click on users i got the following message:

Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/xxxx....xxxx/www/gallery/usermgr.php on line 59

the following is what the code look like (from line 58 to 61 atleast)

function list_users()
58 {
59     global $CONFIG, usermgr.php, $HTTP_GET_VARS;
60     global $lang_usermgr_php, $lang_byte_units, $register_date_fmt;
61     global $lim_user;

i cant remember editing this file when bridging but can that have to do with the integration of invision power board?
any solution will do... and i know you not recemmend having multiple admins but i know what risk i take and im willing to take it

tia
//lilleman

Nibbler

Update your gallery to 1.3.3, that will also fix the issue with usermgr.php. Going to the users page is only going to redirect you to your board anyway. If you want multiple gallery admins, the best place to modify is your bridge file, look for :

define('USER_IS_ADMIN', USER_ID ? ($USER_DATA['mgroup'] == IB_ADMIN_GROUP) : 0);

and modify to something like

define('USER_IS_ADMIN', USER_ID ? ($USER_DATA['mgroup'] == IB_ADMIN_GROUP || $USER_DATA['mgroup'] == 123) : 0);

You should be able to see the group number in the forums, but it would definately be visible in the database.