Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 12-22-2012, 10:01 AM
toneloc toneloc is offline
 
Join Date: Jan 2007
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Mass Remove Visitor Messages AFTER You've Deleted Their Profile?

I have vbulletin 3.8.7.

After I deleted a user/spammer, I realized later that he left tons of spam visitor messages on other members profiles.

I've removed tons of them manually, one by one, but it's a long painful process.

Is there any way to mass delete any users "visitor messages" AFTER I've deleted them?

Anyone know of a mod to do this?

Thanks!

P.S. Now, before I delete a spam user I "Delete all visitor messages."
Reply With Quote
  #2  
Old 12-22-2012, 11:59 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think what you can do is a query like:
Code:
DELETE FROM visitormessage WHERE postusername = 'username'

where you'd replace username with the actual name. Of course you should be careful to get it right so you don't accidentally remove anyone else's messages. You could first change "DELETE" to "SELECT *" and check to see if the results look like what you want to remove.
Reply With Quote
  #3  
Old 12-22-2012, 12:42 PM
toneloc toneloc is offline
 
Join Date: Jan 2007
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I think what you can do is a query like:
Code:
DELETE FROM visitormessage WHERE postusername = 'username'

where you'd replace username with the actual name. Of course you should be careful to get it right so you don't accidentally remove anyone else's messages. You could first change "DELETE" to "SELECT *" and check to see if the results look like what you want to remove.


THanks for your response. Can you tell me where I can do that query inside the admin control panel?
Reply With Quote
  #4  
Old 12-22-2012, 01:00 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can only do it from the admin cp if your userid is listed in the includes/config.php file 'canrunqueries' variable, that looks like this:

Code:
$config['SpecialUsers']['canrunqueries'] = '';

if your id is there, then "Execute SQL Query" will appear under the Maintenance menu. You might also be able to do it from outside vb using phpadmin, for example, depending on what kind of hosting setup you have.

Edit: obviously they make it a little difficult because it's dangerous. If you have any doubt about it you should make a backup before doing anything.
Reply With Quote
  #5  
Old 12-22-2012, 02:40 PM
toneloc toneloc is offline
 
Join Date: Jan 2007
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Thanks for walking me through that.

I ran a query from the vbulletin admin cp and got this:

Message
Affected Rows: 6,359 (0.5059s)

That's all that came up. I didn't see any messages that I was able to delete.
Reply With Quote
  #6  
Old 12-22-2012, 02:50 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, that's all it does is tell you how many rows were affected, but they should be gone now. Hopefully those were the correct messages, but unfortunately there's no way to know without looking where they used to be. I guess you could look around and make sure everyone's vistor messages look OK.

You could do this:
Code:
SELECT * FROM visitormessage WHERE postusername = 'username'

and if you get no results, then you've succeeded.
Reply With Quote
  #7  
Old 12-22-2012, 03:22 PM
toneloc toneloc is offline
 
Join Date: Jan 2007
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Yeah, that's all it does is tell you how many rows were affected, but they should be gone now. Hopefully those were the correct messages, but unfortunately there's no way to know without looking where they used to be. I guess you could look around and make sure everyone's vistor messages look OK.

You could do this:
Code:
SELECT * FROM visitormessage WHERE postusername = 'username'

and if you get no results, then you've succeeded.

You know... I think they're all gone! I put one profile up for an example to my Mods on what to look out for and that profile is clean as a whistle now without the spam message from that user that was deleted.

You saved me hours and hours of work! You are my hero, man! Thanks a bazillion!:up:
Reply With Quote
Reply

Thread Tools
Display Modes

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 09:36 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.03780 seconds
  • Memory Usage 2,208KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete