i have been getting a number of comment spam in one of the wordpress-powered sites i manage. i say “wordpress-powered” because its not exactly used as a blog and its not entirely a cms either. well, not yet anyway.
the “blog posts” are actually the upcoming events of the organization. comments and trackbacks are open so that people can ask questions about the event and maybe refer the event to their friends by blogging about it. unfortunately, the spam comes in via the posts that were made several months or even years ago. i have askimet installed and it catches the spam 99% of the time (the rest is caught in the moderation queue) and i really shouldn’t be all worked up about it but it still nags me a bit. but that’s just me. i just like to close doors that are unnecessarily open.
i’d like to suggest a plug-in or a feature incorporated in one of the versions of wordpress in the coming decade is a way to turn comments and/or trackbacks (pings) off or on en masse — check or uncheck boxes and click on “apply”. it may also be possible to have an option to edit a comment then and there.
i was looking over the database structure and it seems that the wp_posts table is the one to be modified, changing the contents of at most two fields — comment_status and ping_status — from “open” to “closed” or vise versa. i am out of practice with my sql but it seems easy enough to change these fields 10 to 20 rows at a time using a single update statement. maybe i could write a plug-in but i’m not good at php. yet. 😉
– comment_status: open/closed: varchar(20)
– ping_status: open/closed: varchar(20)
– id: bigint(20)
– post_type: post/page/attachment: varchar(20)
– post_date: datetime