PDA

View Full Version : How to give modcp IP ban rights?


RNGDE
09-22-2011, 10:52 PM
Anyone know of such a modification or can assist in doing such? Id like to give the modcp ability to ban IPs.

Thanks

RNGDE
10-15-2011, 08:44 PM
BUMP: Any update on this?

ReFuZe
10-15-2011, 10:05 PM
Yeah but i can get it for you and get the mod tools for you like in the navbar but it will cost you and get alot of other stuff

Videx
10-16-2011, 12:18 AM
I am unaware of such a mod. But then, banning IPs from within vbulletin doesn't accomplish much anyway. Don't waste the effort.

matty389
10-16-2011, 03:42 PM
I agree there they just keep comming back with a proxy

kh99
10-16-2011, 04:19 PM
I don't disagree with the above, but in case you want to do it anyway: You could create a plugin at hook location mod_index_navigation and create a "ban ip" option for the modcp nav menu (to see how to do that, look at modcp/index.php, the code before the mod_index_navigation hook). Then you could take the ip banning code from admincp/options.php and copy it to a new php file in modcp. The admincp has the option info in the database, but in the modcp you'll have to use the print_form_header(), print_table_header(), etc functions to create your form. I think including global.php from modcp instead of admincp (which will happen just by puitting the file in modcp) will take care of checking for moderating permission instead of admin permission, but I'm not sure - you might have to add some permission checking if you don't want all mods to be able to ban ips.

I know that's all pretty general, but if you want to get this done I don't think there's any choice other than to spend some time to understand how the modcp code works.