Simple Sidebar Sample?
Posted: Wed Jul 18, 2012 6:24 pm
I want to create a simple sidebar plugin which displays the number of blocked spam within the last 24 hours / 7 days.
So that's just 8 Numbers and I don't want to dive too deep into S9y for this. Is there a simple Sample/Framework I can modify for this?(had some strange wrong results with INTERVAL so this was faster)
So that's just 8 Numbers and I don't want to dive too deep into S9y for this. Is there a simple Sample/Framework I can modify for this?
Code: Select all
// Bee Honeypot
SELECT count(*) FROM `serendipity_spamblocklog` WHERE reason like 'BEE Ho%' AND timestamp > (UNIX_TIMESTAMP(NOW()) - (7 * 24*60*60) ) ;
// Bee Hidden CAPTCHA
SELECT count(*) FROM `serendipity_spamblocklog` WHERE reason like 'BEE Hi%' AND timestamp > (UNIX_TIMESTAMP(NOW()) - (7 * 24*60*60) ) ;
// caught by Bayes
SELECT count(*) FROM `serendipity_spamblocklog` WHERE reason like '%Bayes%' AND timestamp > (UNIX_TIMESTAMP(NOW()) - (7 * 24*60*60) ) ;
// Blocked IPs via htaccess
SELECT count(*) FROM `serendipity_spamblock_htaccess` WHERE timestamp > (UNIX_TIMESTAMP(NOW()) - (7 * 24*60*60) ) ;