Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
banning options for smods Details »»
banning options for smods
Version: 1.01, by Carnage Carnage is offline
Developer Last Online: Sep 2014 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 01-23-2005 Last Update: 01-23-2005 Installs: 5
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-24-2005, 02:53 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I suggest you withdraw this file, and remove your license number before uploading it again.
Reply With Quote
  #3  
Old 01-24-2005, 02:55 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-24-2005, 03:10 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 01-24-2005, 03:18 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ach, i knew this looked too easy, as i said it was basically just cutting down options.php
Reply With Quote
  #6  
Old 01-24-2005, 05:51 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

right, i've totally re-written it. far smaller without useless things in the code. Works perfectly for me after a few teathing troubles.
Reply With Quote
  #7  
Old 01-25-2005, 09:34 AM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #8  
Old 01-25-2005, 10:26 AM
dbembibre's Avatar
dbembibre dbembibre is offline
 
Join Date: Sep 2004
Location: Madrid (Spain)
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thanks one more time
Reply With Quote
  #9  
Old 01-25-2005, 10:50 AM
dbembibre's Avatar
dbembibre dbembibre is offline
 
Join Date: Sep 2004
Location: Madrid (Spain)
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 01-25-2005, 01:52 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:44 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05247 seconds
  • Memory Usage 2,286KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete