News:

Wondering if this will always be free?  See why free is better.

Main Menu

Reset stats after removing bots

Started by LANDVOGT_, February 05, 2023, 08:56:54 AM

Previous topic - Next topic

LANDVOGT_

Hello

I misconfigured my antispam plugin and hsve several thousand Spam bots on a board. I deleted them and their posts in the database but the board stats still show the amount of users and posts from before.

How can i fix this?
Or do i hsve to delete the bots another way to have these stats fit the real content?

Thank you

Illori


LANDVOGT_

I emptied the tables gg_members and gg_messages with exception of a handvoll of genuine posts and users.

I have a Backup if this is the wrong way to do it.

Sir Osis of Liver

Manually editing the database is a really bad idea.  Many tables are linked, if you break the links bad things will happen.  You can try running "Recount all forum totals and statistics' in Forum Maintenance, but that could cause more damage.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

That was most definitely the wrong way to do it. By doing that you have broken interactions between data tables.

Users can be mass deleted in the admin interface
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

DO NOT pm me for support!

LANDVOGT_

I have around 40000 Spam bots in there. In  the admin interface i can only delete 50 at a time. That will tske weeks.

LANDVOGT_

Does anyone have another approach to this?

Sir Osis of Liver

I'm not finding a mod that helps you do bulk deletes, but I believe code's been posted that will increase the number of members per page. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

#9
Ok, you can increase number of members per page by changing value of defaultMaxMembers in _settings table.  Default is 30.  There may be an admin setting for that, but I can't find it.  Don't know how much help that will be, you'd still have to go through the list to not delete legit members.

If you actually have 40,000 bots and just a handful of members, you'd be better off dumping the forum and starting over.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

admin -> configuration -> features and layout -> layout
Members per page in member list

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

LANDVOGT_

Thank you for your help.
Quote from: Sir Osis of Liver on February 07, 2023, 05:45:48 PMIf you actually have 40,000 bots and just a handful of members, you'd be better off dumping the forum and starting over.


How would I do that? How do I keep the members and posts already there? and most importantly my current design?

I thought about this already for updating to the new 2.x versions
Thank you

a10

Could the "Remove Inactive Members" be tricked into doing the job ? See attach. from 2.0, am supposing 2.1 is similar.

Assign all members one want to keep to a new, specific membergroup. Feasibility fully depends on how many 'good' members needing to be reassigned, 200 ...or 20.000.

Then run the tool set to 'not logged in' 1 day (new group & admin\moderator unticked).

Backup 1st. btw, is this tool deleting posts as well as accounts?
2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Sir Osis of Liver

Quote from: LANDVOGT_ on February 08, 2023, 02:51:42 PMHow do I keep the members and posts already there? and most importantly my current design?

If you want to keep some members and their posts, then you'd have to manually delete the bot accounts and spam posts.  You can try what a10 suggested, but I don't believe it will remove the deleted members' posts, they'll just be marked as 'Guest', and don't think there's any way to bulk delete guest posts.  If you're using a custom theme, you can uninstall all mods and reinstall the theme on a clean install.  What I'm suggesting is if your forum content is mostly bots/spam, and you don't have a lot of real members and posts, just start over.  Inform your members that they'll have to re-register and current content will be lost.  It really depends on how many bot accounts and spam posts you have, and how many legit members and posts you'll lose.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

LANDVOGT_

Is there a way to keep my setting (mainly interested in Design) and Boards (i created a fair lot of Boards and sub-boards)

Kindred

Keeping bits in the database while deleting other bits is difficult because there is ALOT of interaction between tables for indexes
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

In Admin > Maintenance > Topics you can remove all topics not posted in for specified number of days.  That will allow you to retain forum structure, theme, any  customizations you've done.  Then you'd have to delete members in Admin > Maintenance > Members.  You should be able to bulk delete all members by setting Admin > Features and Options > Layout > Members per page in member list to a high value.  Don't know if there's a max, but if it will give you a 1000 or higher that would make the process doable.  Before you begin you can post an announcement in news fader explaining what's being done, and informing members they'll have to re-register.  That will remain before and after you clean up.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: