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)
-   -   Quick Ban (https://vborg.vbsupport.ru/showthread.php?t=56633)

Gary King 08-30-2003 10:00 PM

Quick Ban
 
<font size="3">What does this hack do?</font>

This hack changes the Report this post to a moderator button to a link to quickly ban the user, if the user clicking the link is either an administrator, supermoderator, or moderator, and has the right permissions to ban the user. But, if the user is either an admin, supermod, or mod, then the link will be a regular report link again.

The advantage about this hack is that you don't have to go all the way to the mod cp to ban a user, if you have the right permissions to, because you don't need to report the post then, anyways.

Blizzb 08-31-2003 02:06 AM

This is convenient. Thank you!

jdmuniverse 08-31-2003 02:12 AM

I get this error...

Fatal error: Call to a member function on a non-object in /public_html/forums/admin/functions.php on line 324

EDIT: I am using 2.2.9. I just noticed this is for 2.3.2 maybe that's why?

Remi 08-31-2003 02:14 AM

Thank you very much Gary, great hack. https://vborg.vbsupport.ru/external/2011/01/19.gif

lasto 08-31-2003 06:48 AM

does this work on 2.3 ?

assassingod 08-31-2003 07:34 AM

Nice, but i've seen in done im template edits.

N9ne 08-31-2003 08:15 AM

And also, this will add at least 3 queries per post on showthread, so if you have 10 posts displayed on showthread on each page, you can expect an additional 30 queries on your page.

assassingod 08-31-2003 08:18 AM

Quote:

Today at 10:15 AM N9ne said this in Post #7
And also, this will add at least 3 queries per post on showthread, so if you have 10 posts displayed on showthread on each page, you can expect an additional 30 queries on your page.
Ouch...

Gary King 08-31-2003 11:52 AM

Quote:

Today at 05:15 AM N9ne said this in Post #7
And also, this will add at least 3 queries per post on showthread, so if you have 10 posts displayed on showthread on each page, you can expect an additional 30 queries on your page.
Let me release version 1.1, this was a quick release and it was almost midnight.

Gary King 08-31-2003 12:27 PM

There we go, no more extra queries ;)

lasto 08-31-2003 01:53 PM

no more extra LOL so is it 30 or is it less

need to know cause on a shared server and dont want to big of a server load

Remi 08-31-2003 02:33 PM

One last thing Gary please

Can I move the "Baned User" to the group of my choice instead of using the default group (1).

Thanks

Gary King 08-31-2003 02:34 PM

Quote:

Today at 10:53 AM lasto said this in Post #11
no more extra LOL so is it 30 or is it less

need to know cause on a shared server and dont want to big of a server load

It's less than 30, usually 20 or so (it doesn't add any extra queries ;))

Gary King 08-31-2003 02:35 PM

Quote:

Today at 11:33 AM Remi said this in Post #12
One last thing Gary please

Can I move the "Baned User" to the group of my choice instead of using the default group (1).

Thanks

Only for this hack, or for all banned users?

lasto 08-31-2003 03:00 PM

so using this in any thread will add 20 more queries am i following this right or does it not add at all

/me is confused

assassingod 08-31-2003 03:06 PM

Quote:

Today at 05:00 PM lasto said this in Post #15
so using this in any thread will add 20 more queries am i following this right or does it not add at all

* lasto is confused

The updated version doesnt.

Remi 08-31-2003 04:03 PM

Quote:

Today at 04:35 PM Gary W said this in Post #14
Only for this hack, or for all banned users?
Yes Gary, Only for this hack :)

My temporary ban group is ( 13 )

Thanks

Gary King 08-31-2003 04:54 PM

Quote:

Today at 01:03 PM Remi said this in Post #17
Yes Gary, Only for this hack :)

My temporary ban group is ( 13 )

Thanks

Download the installation file again, and follow the instructions within.
Let me know if you run into any problems :)

Logician 08-31-2003 05:39 PM

nice idea :)

MaDCaT75 08-31-2003 05:52 PM

Personally I think banning someone is useless. They just come back and cause more trouble. I just put the miserable user hack on em.

Gary King 08-31-2003 06:10 PM

Quote:

Today at 02:52 PM MaDCaT75 said this in Post #20
Personally I think banning someone is useless. They just come back and cause more trouble. I just put the miserable user hack on em.
Well, everyone's got their own opinions :)

Remi 08-31-2003 07:32 PM

Quote:

Today at 07:52 PM MaDCaT75 said this in Post #20
Personally I think banning someone is useless. They just come back and cause more trouble. I just put the miserable user hack on em.

you still can use this to quickly add a user to your miserable group :D


===================

Thank you very much Gary, I will install the new addition shortly :smoke:

Gary King 08-31-2003 08:01 PM

Quote:

Today at 04:32 PM Remi said this in Post #22
you still can use this to quickly add a user to your miserable group :D


===================

Thank you very much Gary, I will install the new addition shortly :smoke:

Yep, just add the miserable usergroup id to the hack, then the "banned" users will be moved to the miserable group instead ;)

MaDCaT75 08-31-2003 08:39 PM

Wow I didnt know that.... thanks!

By the way how do I find out the user group ID of miserable users? I cant see it anywhre in the user groups list :rolleyes:

assassingod 08-31-2003 09:23 PM

Quote:

Today at 10:39 PM MaDCaT75 said this in Post #24
Wow I didnt know that.... thanks!

By the way how do I find out the user group ID of miserable users? I cant see it anywhre in the user groups list :rolleyes:

There is a hack by N9ne (or me) that tells you the ID of each usergroup, try that.

N9ne 08-31-2003 09:25 PM

Quote:

Today at 11:23 PM assassingod said this in Post #25
There is a hack by N9ne (or me) that tells you the ID of each usergroup, try that.

That hack I made was for convenience, it's a tiny hack but I thought i'd make it because I was bored.

Just hover over the usergroup's title or edit button or whatever in the AdminCP usergroup listings and it will show you the id in the status bar.

MaDCaT75 08-31-2003 09:29 PM

I know thats the problem there is no miserable usergroup in the list of usergroups. Thats why I asked how to find it out.

Gary King 08-31-2003 10:16 PM

For the miserable users hack, if the miserable users don't change usergroups (if they stay in Registered usergroup, etc.) then you can move them to their own usergroup, then apply this hack as well.

MaDCaT75 08-31-2003 10:28 PM

Bah too much work lol

Gary King 08-31-2003 11:36 PM

So lazy :p

Kriek 09-02-2003 01:04 PM

Got this working via 2.3.0 w/ few minor modifications. I also amended the script to display the entire link in the $reportpost variable, so non-staff would see Report to Mod and staff would see Ban User as a text link.

[high]* Kriek licks install[/high]

NexVision 02-29-2004 12:12 PM

wuts the chance gettion this to work for vb3 rc4

assassingod 02-29-2004 12:13 PM

Quote:

Originally Posted by NexVision
wuts the chance gettion this to work for vb3 rc4

Zero. vB2 hacks don't work on vBulletin 3.

NexVision 02-29-2004 12:18 PM

Quote:

Originally Posted by assassingod
Zero. vB2 hacks don't work on vBulletin 3.

i guess i shoulda been more direct i was really fishing for someone to take on the project

PMantis24 03-27-2004 02:43 AM

I get this error message in 2.3.0

Fatal error: Call to a member function on a non-object in /home/v6p/public_html/forums/admin/functions.php on line 391

Line 390 to 401:
PHP Code:

    if ($post['usergroupid']!=2) {
    
$reportpost="report.php?s=$session[sessionhash]&postid=$post[postid]";
      }
      elseif ((!
$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canbanusers=1")) AND !$reportpost) {
        
$reportpost="report.php?s=$session[sessionhash]&postid=$post[postid]";
      }
    elseif ((
$bbuserinfo['usergroupid']==or $bbuserinfo['usergroupid']==or $bbuserinfo['usergroupid']==7) AND ($post['usergroupid'] != and $post['usergroupid'] != and $post['usergroupid'] != 7) AND !$reportpost) {
        
$reportpost="mod/user.php?action=ban&userid=".$post['userid'].$qbgroup;
    }
    else {
        
$reportpost="report.php?s=$session[sessionhash]&postid=$post[postid]";
    } 

Any ideas?

Gary King 03-27-2004 01:06 PM

Try putting global $DB_site; before all that code.

KanyeWest 03-25-2005 06:55 PM

can someone make a 3.0 version of this pelase

Destroyed Soul 05-03-2005 05:42 PM

When I click it it just takes me to forum home...


All times are GMT. The time now is 04:43 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.01396 seconds
  • Memory Usage 1,820KB
  • 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
  • (1)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete