PDA

View Full Version : Posts per day hack?


10-29-2000, 06:43 PM
Is there any way that someone could hack into the control panel and create a way for me to view something like the "Top 25 Posters for Today"? I've had some terrible spam problems lately (members with 300+ posts a day) and this could be helpful for determining if it's a problem.

11-25-2000, 12:11 PM
i'd like to see this

[Edited by Mental Stamina on 11-29-2000 at 05:31 AM]

11-26-2000, 12:20 AM
Part of a hack I whipped up a few weeks ago...
<?
require("global.php");
print "Today's Most Active Posters:\n<ol>\n";
$posters = $DB_site->query("SELECT user.username, COUNT(post.postid) AS cnt FROM user, post WHERE post.userid = user.userid AND post.dateline > '".(time()-3600*24)."' GROUP BY user.userid ORDER BY cnt DESC LIMIT 10");
while ($poster = $DB_site->fetch_array($posters)) {
print "<li>$poster[0] w/$poster[1] posts</li>\n";
}
print "</ol>\n";
?>
Enjoy!

12-01-2000, 08:28 PM
That was pretty helpful! I've been able to make up a "Posts by users during the last xxx seconds" page from this, where xxx can be any value you can set from the URL.

12-01-2000, 11:15 PM
care posting that hack?

12-02-2000, 06:44 AM
Just change around the "time()-3600*24" section of the query statement. For example:

$seconds = time() - intval($seconds);
...query("SELECT...WHERE...dateline > '$seconds'...");

and call the page with ?seconds=3600