Skip to content

How to move all posts by a user into a specific board in SMF

I kind of abandoned the Wiki4Games BBS lately, and when I got back to it I noticed that, as you can guess, it had been invaded by spammers (here are some of their IPs:,, – don’t worry, the full list is at StopForumSpam). One of them, a subtle ass from China, had literally flooded the board with about 340 topics, so moving them all into my hidden trash board one by one seemed a bit of a long option.

I didn’t find a ready-made function in SMF to move all those topics manually, and I didn’t want to install a plugin for that (not sure if there is one, though), so I ended up messing with the database manually. This is fairly easy indeed: topics are listed in the smf_topics table. Their board and author is specified there. So, for moving all topics by a user into a specific board, all you need to do is find the ID of the member (that’s easy, it’s in the URL of their profile, for instance my spammer is member #155:;area=summary;u=155) and the ID of the board where you want to move their messages (again, that’s in the URL when you view the aforementioned board).

And then, to move all topics, the query is simply:
UPDATE smf_topics SET id_board=6 WHERE id_member_started=155
(replace 6 and 155 by the IDs of the target board and member, of course)

Note that in order to update the board listing page with the proper last post of the board, you’ll need to move a topic back and forth into the said board (or make a post and then delete it), if one of the topics you moved via MySQL was the last post of said board.

That’s it, some time saved again, you’re welcome 😉

Posted in MySQL, SMF.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

Sorry about the CAPTCHA that requires JS. If you really don't want to enable JS and still want to comment, you can send me your comment via e-mail and I'll post it for you.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA