vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Mass Remove Visitor Messages AFTER You've Deleted Their Profile? (https://vborg.vbsupport.ru/showthread.php?t=293196)

toneloc 12-22-2012 10:01 AM

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."

kh99 12-22-2012 11:59 AM

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.

toneloc 12-22-2012 12:42 PM

Quote:

Originally Posted by kh99 (Post 2392211)
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?

kh99 12-22-2012 01:00 PM

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.

toneloc 12-22-2012 02:40 PM

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.

kh99 12-22-2012 02:50 PM

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.

toneloc 12-22-2012 03:22 PM

Quote:

Originally Posted by kh99 (Post 2392234)
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:


All times are GMT. The time now is 11:50 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.01106 seconds
  • Memory Usage 1,731KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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