Quote:
Originally Posted by peterska2
Just one question, what's the best way to link usergroups created in 4images to usergroups in vB?
|
I've release an update version for those who have multiple vB custom groups, so you can set multiple vB groups to be Album's USER group, ADMIN group, or WAITING for MODERATION group.
(updated in the first post)
Just want to make changes? here's how:
NOTE: remember to backup the old files if you had them working good. I just make this work, didnt have time to fully test it. Let me know if it works good.
In constants.php:
Look for
PHP Code:
// User levels
define('GUEST', 0);
define('USER_AWAITING', 3);
define('USER', 2);
define('ADMIN', 6);
Replaced by
PHP Code:
// User default levels
define('GUEST', 0); // GUEST group or ID
define('USER_AWAITING_DEFAULT', 3);
define('USER_DEFAULT', 2);
define('ADMIN_DEFAULT', 6);
// User groups level
$waitinggroups = array(3, 4); // vB Group should be waiting for moderate. seperate each group by comma
$usergroups = array(2, 7); // Groups that are USERS in album. seperate each group by comma
$admingroups = array(6); // vB groups that are ADMINS in album. seperate each group by comma
Define the groups that should be user, admin in $waitinggroups, $usergroups, $admingroups, seperate each group by comma
In sessions.php:
Look for
PHP Code:
// Get Userinfo
$session_info = $site_sess->return_session_info();
$user_info = $site_sess->return_user_info();
Add after:
PHP Code:
// Set USERGROUP levels
if (in_array($user_info[user_level], $admingroups))
{
define('ADMIN', $user_info[user_level]);
}
else define('ADMIN',ADMIN_DEFAULT);
if (in_array($user_info[user_level], $usergroups))
{
define('USER', $user_info[user_level]);
}
else define('USER',USER_DEFAULT);
if (in_array($user_info[user_level], $waitinggroups))
{
define('USER_AWAITING', $user_info[user_level]);
}
else define('USER_AWAITING',USER_AWAITING_DEFAULT);