vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Usergroups moderate forums (https://vborg.vbsupport.ru/showthread.php?t=64904)

JohnWoo 05-08-2004 10:00 PM

Usergroups moderate forums
 
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

Quote:

Originally Posted by Milorad
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

mx3 05-10-2004 01:46 AM

Quote:

Originally Posted by msimplay
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

Quote:

Originally Posted by JohnWoo
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 :

Code:

        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 :


Code:

        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

Quote:

Originally Posted by JohnWoo
my fault
sorry :)
fixed txt uploaded



my forums are now getting database errors .


Quote:

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

Quote:

Originally Posted by JohnWoo
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

Quote:

Originally Posted by teksigns
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?


All times are GMT. The time now is 04:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01150 seconds
  • Memory Usage 1,767KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete