Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Quick User Delete In PostBit Details »»
Quick User Delete In PostBit
Version: 1.00, by cerjam cerjam is offline
Developer Last Online: Oct 2007 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.4 Rating:
Released: 03-20-2007 Last Update: Never Installs: 3
 
No support by the author.

My site gets spam bots alot and i'm always too lazy to go into the admincp and find the username and delete it. so i wrote this.

It injects a image into the postbit around the online/infraction images.

Find this in "POSTBIT/postbit legacy" whichever you use.
Code:
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a></if>
Add this under that part

Code:
<if condition="$bbuserinfo[userid] == YOURUSERID">
<a href="admincp/user.php?do=remove&amp;u=$post[userid]" rel="nofollow"><img class="inlineimg" src="YOURDELETEUSERIMAGEURL" alt="<phrase 1="$post[username]">delete user</phrase>" border="0" /></a>
</if>

Only problem is it doesnt redirect you back to the thread, If anyone would like to tell me how to do that itd be great.

Show Your Support

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

Comments
  #12  
Old 03-23-2007, 01:12 AM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But then there's all user attachments, etc, etc info
Reply With Quote
  #13  
Old 03-23-2007, 03:31 AM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well if you don't know which tables have `userid` in them, you'll be running a lot of queries depending on your forum, but you can do this (I recommend testing on a backup database first):

PHP Code:
$db->hide_errors();
$all_tables $db->query_read("SHOW TABLES");

$getall $db->fetch_array($all_tables);
$db->free_result($all_tables);

foreach (
$getall AS $get_all)
{
    
$create_query "DELETE FROM $get_all WHERE `userid` = " $vbulletin->GPC['userid'];
    
$getro $db->query_write($create_query);
    echo 
"Deleted User #" $getro['userid'] . " from $get_all.<br />";
    
$db->free_result($getro);
}
unset(
$get_all$getall$create_query);

$db->show_errors(); 
That should delete every database entry associated with a particular userid. (You will end up with orphaned posts if they started any threads).

You could technically do it in ONE query, but I think the whole query might fail and stop if the `userid` field doesn't exist in one of the tables.
Reply With Quote
  #14  
Old 03-23-2007, 03:33 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cerjam View Post
why waste the space in the memberlist for 300 banned spam bots? this is so much cleaner. and if nothing else, someone can learn to make a postbit hack from this
I already did

User Management
Reply With Quote
  #15  
Old 03-23-2007, 06:29 AM
cerjam cerjam is offline
 
Join Date: Sep 2005
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack redline, my thread and im marking out to you..lol. Nice though.
Reply With Quote
  #16  
Old 03-25-2007, 05:48 PM
Atakan KOC's Avatar
Atakan KOC Atakan KOC is offline
 
Join Date: Feb 2006
Location: Istanbul
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks....
Reply With Quote
Reply


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 04:22 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.05410 seconds
  • Memory Usage 2,259KB
  • Queries Executed 22 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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