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)

Erwin 10-20-2002 10:42 PM

Quote:

Originally posted by Tha Rock
Erwin: I see you have modified this hack, please could you post up an updated super cool version? :D
I got your PM. :) My mods are customized specifically for my site, and won't make sense to anyone else's site. I don't have time to package it and release it as an add-on - the code is buried under a ton of modified hack, especially after several vB upgrades. :)

wolfman 11-07-2002 02:24 AM

I like it but how does a mod get access to the users ID to do the ban?

Erwin 11-07-2002 09:09 AM

I modified this hack to integrate it into the search feature in the Mod CP, using the username instead of the userid. It's not that hard to do. I can't post on how I did it, since it's all integrated with the rest of my banning system. But it can be done. :)

themonarch 11-13-2002 03:53 AM

This is a great little hack! My only wish is to ban by username instead of the id...

CRego3D 11-13-2002 03:54 AM

Erwin

Any way you can share this info ?, I am lookign for the same feature

Erwin 11-13-2002 04:26 AM

Okay, this is what you do.

1) Upload banuser.php into your mod subdirectory

2) Edit your mod/user.php

Find:

PHP Code:

      echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1"<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\"><p>[ban]</p></a></td>""").iif($perms[ismoderator] or $ismod['canviewprofile']==1"<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\"><p>[view user]</p></a></td>""")."</tr>\n";
    } 

Replace with:

PHP Code:

      echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1"<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\">[ban]</a><br><a href=\"banuser.php?action=adminadd&userid=$user[userid]\">[Temp Ban]</a></td>""").iif($perms[ismoderator] or $ismod['canviewprofile']==1"<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\">[view user]</a><br><a href=\"banuser.php?action=remove&userid=$user[userid]\">[Remove Temp Ban]</a></td>""")."</tr>\n";
    } 

That's it!

Then what your mods can do is Search for a User using the normal search function in their Mod CP, and when they find the username, click on the "Temp Ban" or "Remove Temp Ban" links next to the username. And go from there!

My system is very different - so I can't test this, but it should work.

CRego3D 11-14-2002 12:43 PM

Quote:

Originally posted by Erwin
Okay, this is what you do.

[...]

That's it!

Then what your mods can do is Search for a User using the normal search function in their Mod CP, and when they find the username, click on the "Temp Ban" or "Remove Temp Ban" links next to the username. And go from there!

My system is very different - so I can't test this, but it should work.

Thank you .. now, when I click on "temp ban" it leads me to the page to temp ban it, but still askign for the iser id :( (just leads me to the ban link in banuser.php) .. did I missed something ?

Zelda-King 11-28-2002 11:16 PM

When I perform a temp ban I get;

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site62/fst/var/www/html/bb/admin/adminfunctions.php:19) in /home/virtual/site62/fst/var/www/html/bb/mod/banuser.php on line 30

When I try to edit a ban I get;

Not Found
The requested URL /bb/mod/banuser.php.php was not found on this server.


--------------------------------------------------------------------------------

Apache/1.3.22 Server at www.domainname.net Port 80


Just why am I transfered to an URL ending with php.php?

(Other than this, it does initially work).

For the record, I'm using vBulletin ver 2.2.9.

nimzie 12-03-2002 12:40 AM

I'm new to this php stuff.

The instructions say to add error_nopermission_tempban template. Is that to say error_nopermission_tempban.php? In what directory?
I'm not sure what a template is..

Will this allow admins to be banned - or can I just not give the link to mods - and not put it in index.php?

Zelda-King 12-21-2002 12:09 AM

You don't put that template in the directory. Go to your admin cp and look down the left hand column near the bottom for 'templates'. .php files are put in the directory (FTP, whatever), but not templates.


All times are GMT. The time now is 12:38 AM.

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.01128 seconds
  • Memory Usage 1,753KB
  • 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
  • (2)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