View Full Version : Usergroups moderate forums
JohnWoo
05-08-2004, 10:00 PM
Hello all!
Not sure - may se something like it exists already, but i was not able to find :)
- To add whole usegroup as forum moderator leave username field blank and select usergroup from list below
-To add normal mod leave that select in "Selected by username" position
While editing group mod still leave username field blank :)
msimplay
05-09-2004, 08:58 AM
screenshots ?
Milorad
05-09-2004, 09:30 AM
why is this necessary?
usergroups can be given appropriate moderator permissions for selected forums through admincp already
JohnWoo
05-09-2004, 11:34 AM
why is this necessary?
usergroups can be given appropriate moderator permissions for selected forums through admincp already
:)
Feel myself completely stupid, but how??? (and have no admincp near to check...)
msimplay
05-09-2004, 11:52 AM
assign a moderator to the forum via forums and moderators
ps i wasn't sure what your hack did so i asked for screenshots :o
JohnWoo
05-09-2004, 03:35 PM
May be i got already modified code, but i am sure that it was not possible to give moderator rights to whole usergroup (primary).
That settings on moderator.php?do=add just change usergroup settings for single user set as forum moderator.
PS sorry - can't attach even small image - it shows error always.. Images inside zip :)
PPS - [Moderators] is name of usergroup on that image :)
msimplay
05-09-2004, 04:17 PM
OOHH i see now basicly u can set a usergroup to moderator a forum
instead of just one user
whats the benefits of this
when u can just change a users group or create a new one and set them to moderator in status or even use status masks
JohnWoo
05-09-2004, 04:22 PM
:)
Some people like me too lazy sometimes :) And prefer to make hack and add one group as moderator instead of adding 25 single user moderators :)
Or add once user to one usergroup instead of adding him 30 times as moderator to 30 forums :)
msimplay
05-09-2004, 07:13 PM
ooh i get it now its a mass make assign moderator to a forum kinda thing i think i'll may actually use this :P
ooh i get it now its a mass make assign moderator to a forum kinda thing i think i'll may actually use this :P
Invisionboard already has this one, was waiting for it ;) nice job
teksigns
05-10-2004, 02:27 AM
Hello all!
Not sure - may se something like it exists already, but i was not able to find :)
- To add whole usegroup as forum moderator leave username field blank and select usergroup from list below
-To add normal mod leave that select in "Selected by username" position
While editing group mod still leave username field blank :)
your instructions say to find :
globalize($_POST, array(
'moderator',
'moderatorid' => INT,
'modusername' => STR_NOHTML,
'usergroupid' => INT,
'membergroupids'
));
if ($modusername == '')
{
print_stop_message('invalid_user_specified');
}
$userinfo = $DB_site->query_first("
SELECT userid, username, usergroupid, membergroupids
FROM " . TABLE_PREFIX . "user
WHERE username = '" . addslashes($modusername) . "'
");
$foruminfo = $DB_site->query_first("
SELECT forumid,title
FROM " . TABLE_PREFIX . "forum
WHERE forumid = $moderator[forumid]
");
if ($userinfo['userid'] AND $foruminfo['forumid'])
{ // no errors
require_once('./includes/functions_misc.php');
$moderator['userid'] = $userinfo['userid'];
$noalter = explode(',', $undeletableusers);
if (!in_array($userinfo['userid'], $noalter))
however my code looks like this :
globalize($_POST, array(
'moderator',
'moderatorid' => INT,
'modusername' => STR_NOHTML,
'usergroupid' => INT,
'membergroupids'
));
if ($modusername == '')
{
print_stop_message('invalid_user_specified');
}
$userinfo = $DB_site->query_first("
SELECT userid, username, usergroupid, membergroupids
FROM " . TABLE_PREFIX . "user
WHERE username = '" . addslashes($modusername) . "'
");
$foruminfo = $DB_site->query_first("
SELECT forumid,title
FROM " . TABLE_PREFIX . "forum
WHERE forumid = $moderator[forumid]
");
if ($userinfo['userid'] AND $foruminfo['forumid'])
{ // no errors
require_once('./includes/functions_misc.php');
$moderator['userid'] = $userinfo['userid'];
$moderator['permissions'] = convert_array_to_bits($moderator, $_BITFIELD['moderatorpermissions'],1);
if (!empty($moderatorid))
{
// update
$DB_site->query(fetch_query_sql($moderator, 'moderator', "WHERE moderatorid = $moderatorid"));
}
else
{
// insert
$newusergroupid = $userinfo['usergroupid'];
$newmembergroupids = $userinfo['membergroupids'];
$noalter = explode(',', $undeletableusers);
if (!in_array($userinfo['userid'], $noalter))
JohnWoo
05-10-2004, 09:31 AM
my fault
sorry :)
fixed txt uploaded
teksigns
05-10-2004, 01:53 PM
my fault
sorry :)
fixed txt uploaded
my forums are now getting database errors .
Database error in vBulletin 3.0.0:
Invalid SQL:
SELECT permissions, FIND_IN_SET(forumid, '64,15,-1') AS pos
FROM moderator
WHERE modgroupid = 2 AND forumid IN (64,15,-1)
ORDER BY pos ASC
LIMIT 1
mysql error: Unknown column 'modgroupid' in 'where clause'
mysql error number: 1054
you must have added a few fields to the database tables and forgot about them .
JohnWoo
05-10-2004, 02:01 PM
what about sql request in the beginning of .txt ?
ALTER TABLE moderator ADD modgroupid SMALLINT(4) DEFAULT '0' NOT NULL
teksigns
05-10-2004, 02:06 PM
what about sql request in the beginning of .txt ?
ALTER TABLE moderator ADD modgroupid SMALLINT(4) DEFAULT '0' NOT NULL
opps
works now ....
thank you !
i click install
teksigns
05-10-2004, 02:14 PM
when viewing my forums it does not show my moderators in the moderator
box near the end like before ....
now it shows [-Moderators-]
and is a link ....
when clicked it gives errors that no such user exist....
can you make this display the moderators like before ....
teksigns
05-11-2004, 03:56 PM
when viewing my forums it does not show my moderators in the moderator
box near the end like before ....
now it shows [-Moderators-]
and is a link ....
when clicked it gives errors that no such user exist....
can you make this display the moderators like before ....
any ideas?
nexialys
10-31-2004, 01:42 PM
hum... never updated, and good feature ...
fulviods
04-17-2008, 09:16 AM
nice mod does it work on a 3.7 RC1?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.