![]() |
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. |
I suggest you withdraw this file, and remove your license number before uploading it again.
|
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.
|
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. |
ach, i knew this looked too easy, as i said it was basically just cutting down options.php
|
right, i've totally re-written it. far smaller without useless things in the code. Works perfectly for me after a few teathing troubles.
|
Quote:
|
I install this hack today all work ok, very good job friend.
Thanks one more time |
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')) Code:
construct_nav_option('Ban IP/Mail', 'ipban.php', '<br />'); Code:
construct_nav_option($vbphrase['banIP'], 'ipban.php', '<br />'); |
Quote:
|
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|