When setting up PHPNuke,you really have to remember to turn on captcha checking for registrations first thing in config.php (gfx_chk). If you don’t,you’ll get pummeled with comment spam in a matter of hours.
If,like me,you messed up and forgot to,you’ll have to delete those bogus accounts,and delete the comments. Deleting the comments can be tedious. So instead,run a command from a unix shell to generate some html content that will make your life easier…
mysql -u dbusername -pdbpassword dbname -e ‘SELECT tid,sid FROM nuke_comments;’| grep -v tid | awk ‘{print "<a href=\"http://yourdomain.com/admin.php?op=RemoveComment&tid="$1 "&sid="$2 "&ok=1\">http://yourdomain.com/admin.php?op=RemoveComment&tid="$1 "&sid="$2 "&ok=1</a>"}’
This will output a bunch of HTML that you can insert into a page. Click on each of those links to delete a comment. Much quicker than searching for them all.
Now,I suppose someone could write a PHP module for Nuke that would automate this. I’m just too lazy to ;-)
