vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Allow Mods a temporary ban of users (https://vborg.vbsupport.ru/showthread.php?t=39584)

Smoothie 06-10-2002 12:01 AM

did you run the query on your database and add the template?

ladyfyre 06-10-2002 12:05 AM

yes :)

Smoothie 06-10-2002 12:41 AM

from the bottom of the install text:
Quote:

Hint:
In banuser.php at line 10:
if ($bbuserinfo[userid]!=1 and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] and forumid=2")) {

This is the permcheck if the user who tries accessing this file is authorized. In this case if the user ist not the administrator who was createn by the vbulletin-installation and is not a moderator of forumid 2, the script will quit. Change it to whatever you want. In Example to allow all moderators access delete lines 10-13 from the script.

I know, this hack is not "the best way" to code something, but it works :)
Are you userid 1?

ladyfyre 06-10-2002 01:04 AM

ok...that was it...


i tried using the format above to change it to look up for the usergroup for Admins and SuperModerators, but the only way it works is if i set it to allow the userid or else delete the permissions completely :(

any idea why the usergroup solution is bombing?

Boofo 06-10-2002 01:17 AM

Post #14 in this thread has the code to allow usergroups. :) That's what I am using.

Quote:

Originally posted by ladyfyre
ok...that was it...


i tried using the format above to change it to look up for the usergroup for Admins and SuperModerators, but the only way it works is if i set it to allow the userid or else delete the permissions completely :(

any idea why the usergroup solution is bombing?


Smoothie 06-10-2002 01:41 AM

Yea, I can't allow mods/supermods to use this until someone can post an update to the code to disallow banning of admins. The way it works now is any mod/supermod that has permissions to temp ban, can also temp ban an admin.

ladyfyre 06-10-2002 01:45 AM

That is what i was using. I just get back:

Parse error: parse error in /banuser.php on line 13

Code used is:


PHP Code:

// HF-Mods perms
        
if_(    
        
____$bbuserinfo[usergroupid]!=
        
____and_$bbuserinfo
[usergroupid]!=5
        
____and_$bbuserinfo
[userid]!=44
        
____and_$bbuserinfo
[userid]!723
        
____and_$bbuserinfo
[userid]!=4267
        
{       
        
cpfooter();
        exit;



Line 13 is the one referring to usergroupid 6

Boofo 06-10-2002 02:16 AM

That doesn't seem to work here now. I went back to the original file and it works that way. I ran it from the admin directory though. I don't want any mods playing with it until I can get it working so no one can ban the admin. :)

Quote:

Originally posted by ladyfyre
That is what i was using. I just get back:

Parse error: parse error in /banuser.php on line 13

Code used is:


PHP Code:

// HF-Mods perms
        
if_(    
        
____$bbuserinfo[usergroupid]!=
        
____and_$bbuserinfo
[usergroupid]!=5
        
____and_$bbuserinfo
[userid]!=44
        
____and_$bbuserinfo
[userid]!723
        
____and_$bbuserinfo
[userid]!=4267
        
{       
        
cpfooter();
        exit;



Line 13 is the one referring to usergroupid 6


Smoothie 06-10-2002 02:25 AM

If you just insert your own userid, you can still run it from your mod/index.php This way it can be run from your forums options drop down box in the forum, bottom right. No one will be able to ban you, because it looks for that userid, and if its not the same one as the person trying to access the file, the script will not run.

Boofo 06-10-2002 02:58 AM

Ok, you lost me here. What do I need to do where to do what? :)

Quote:

Originally posted by Smoothie
If you just insert your own userid, you can still run it from your mod/index.php This way it can be run from your forums options drop down box in the forum, bottom right. No one will be able to ban you, because it looks for that userid, and if its not the same one as the person trying to access the file, the script will not run.


All times are GMT. The time now is 02:33 PM.

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.01117 seconds
  • Memory Usage 1,749KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete