vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Changing Usergroup ID (https://vborg.vbsupport.ru/showthread.php?t=51010)

Boofo 03-30-2003 09:33 PM

Changing Usergroup ID
 
Can someone please tell me how I would go about changing the Usergroupid for the "Banned by Moderators" usergroupid from 9 to 8? Mine is set at nine and it is supposed to be set at 8 for default vbulletin, isn't it?

filburt1 03-30-2003 10:28 PM

[sql]
UPDATE usergroup SET usergroupid = 8 WHERE usergroupid = 9;
UPDATE user SET usergroupid = 8 WHERE usergroupid = 9;
[/sql]
Might cause unpredictable results though, for all I know.

Boofo 03-31-2003 07:58 AM

What is the default Banned by Moderators group? I had a usergroup I set up called Banned at usergroup 8 because I never saw the Banned by Moderators group until I test banned someone from the mod cp. It never showed up until then. That was the only reason I made a special banned group. If this is the default one, then I don't need the other one. But since it was usergroup 8, this one seemed to move up to usergroup 9. Can anyone verify or dispel filburt's possibility?

Xenon 03-31-2003 10:42 AM

you have to upgrade the forumpermission table, too.

but it's not needed, the val of the id is irrelevant.
here for example it's 9, too.

Boofo 03-31-2003 10:51 AM

So I'd probably be better off to just go change the usergroupid for the banned group in the php files where I have coded things for that group instead of changing the actual usergroupid number then?

Xenon 03-31-2003 10:56 AM

yes :)

i won't make those things hardcoded....

just create a function isbanned() and use this function everywhere instead of $bbuserinfo[usergroupid]==8..

Boofo 03-31-2003 11:04 AM

Ok, how would I go about making that function? That sounds like a better idea, anyway. But there are certain areas where it will not work. Like if you have USERGROUPID NOT IN (5,6,7,9). How would you do it then?

Xenon 03-31-2003 03:26 PM

you're right some problems are still there...

add this to functions.php:

PHP Code:

$bannedusergroupid x;
function 
isbanned() {
global 
$bbuserinfo,$bannedusergroupid;
return 
$bbuserinfo['usergroupid'] == $bannedusergroupid;



so you can use $bannedusergroupid in your usergroupid NOT IN (5,6,7,$bannedusergroupid) :)

Boofo 03-31-2003 05:08 PM

Quote:

Today at 12:26 PM Xenon said this in Post #8
you're right some problems are still there...

add this to functions.php:

PHP Code:

$bannedusergroupid x;
function 
isbanned() {
global 
$bbuserinfo,$bannedusergroupid;
return 
$bbuserinfo['usergroupid'] == $bannedusergroupid;



so you can use $bannedusergroupid in your usergroupid NOT IN (5,6,7,$bannedusergroupid) :)

I just need to change the x to the banned usergroupid number, right? Also, does it matter where it goes in functions?

Xenon 03-31-2003 07:29 PM

right and no it doesn't matter :)


All times are GMT. The time now is 12:51 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.01512 seconds
  • Memory Usage 1,732KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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