vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   banning options for smods (https://vborg.vbsupport.ru/showthread.php?t=75007)

Carnage 01-23-2005 10:00 PM

banning options for smods
 
this has been requested, and i've throw something together by editing options.php and making a new file with it, it only allows access to the banning options. It will also give admins access to the banning options even if they don't have vboptions access permissions so this may be useful for meny people.

i'd recormend applying this hack: https://vborg.vbsupport.ru/showthread.php?t=64034 as well to prevent smods ip banning superadmins and other privilaged users.

to check if a user id an smod, i used the can_moderate function to check the permission 'issmod' as this dosn't exist as a permission it will only return true if the user is a smod or admin if you want to allow mods to ipban you can add this permission and give it to them.

Instalation, copy ipban.php to your modcp directory.

As this is a beta i've not yet added it to any menus within the mod or admin cp if you want to do this you'll have to do it yourself until i get arround to doing more work on this.

Totally re-written addressing first few posts... lesson learn: a 'quick solution' isn't the best solution....

As always backup database and forum files before installing.

Marco van Herwaarden 01-24-2005 02:53 PM

I suggest you withdraw this file, and remove your license number before uploading it again.

Zachery 01-24-2005 02:55 PM

I have removed the attachment as it looks like it is a significat chunk of vBulletins own code, not to mention it has the CVS info and your license number still in it.

Marco van Herwaarden 01-24-2005 03:10 PM

A few more suggestions:
- remove the cvs entry in the top.
- the whole part in the top "if ($_REQUEST['do'] == 'options' && !empty($_REQUEST['varname']))"....etc.. is probably not needed in your script.
- I would change the 'canadminsettings' by a 'canadminusers'
- Sorry stopped reading, please cleanup your code and remove all things that are not needed. There are still update queries to 'styles' etc inside. What this got to do with an ip-ban?

Edit, didn't see Zachery's reply yet.

Carnage 01-24-2005 03:18 PM

ach, i knew this looked too easy, as i said it was basically just cutting down options.php

Carnage 01-24-2005 05:51 PM

right, i've totally re-written it. far smaller without useless things in the code. Works perfectly for me after a few teathing troubles.

Eagle Creek 01-25-2005 09:34 AM

Quote:

Originally Posted by Carnage-
right, i've totally re-written it. far smaller without useless things in the code. Works perfectly for me after a few teathing troubles.

Thanks!

dbembibre 01-25-2005 10:26 AM

I install this hack today all work ok, very good job friend.

Thanks one more time

dbembibre 01-25-2005 10:50 AM

If you want make a link in you mod control panel only need make this.

Open modcp/index.php

Search:
Code:

if (can_moderate(0, 'canbanusers'))
        {
                $canuser = true;
                construct_nav_option($vbphrase['ban_user'], 'banning.php?do=banuser', '<br />');

Add:
Code:

construct_nav_option('Ban IP/Mail', 'ipban.php', '<br />');
Or create a new vbphrase and replace with this

Code:

construct_nav_option($vbphrase['banIP'], 'ipban.php', '<br />');
Excuse my broken English

Eagle Creek 01-25-2005 01:52 PM

Quote:

Originally Posted by dbembibre
Or create a new vbphrase and replace with this

How can you REPLACE a thing that's NEW and therefore has no text?


All times are GMT. The time now is 08:36 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.01084 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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