I'm currently looking at the Statistics MOD which I believe will show me the top X monthly posters AND the actual number of posts done for the month...quahappy wrote:I really appreciate that most are busy with phpBB3 but I would be grateful if anyone knows how I could display the "posts this month" in a column either the memberlist or, preferably, list of members in a User Group.
Many thanks!
Have you double-checked all your edits and additional code required by the MOD? Is the BEFORE, ADD code section below in the right place? It's common (done it myself!) to AFTER, ADD instead as so many MOD's use this frequently.wittykitty wrote:]Hi, I've run this, says it went through fine, but when I click on "profile" at the bottom of a topic, I get an error!
Fatal error: Call to undefined function display_online_offline() in /home/fordesco/public_html/phpBB2T/includes/usercp_viewprofile.php on line 184
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $profiledata['user_id']);
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$current_time = time();
$this_months_posts = 0;
$year = date('Y', $current_time);
$month [0] = mktime (0,0,0,1,1, $year);
$month [1] = $month [0] + 2678400;
$month [2] = mktime (0,0,0,3,1, $year);
$month [3] = $month [2] + 2678400;
$month [4] = $month [3] + 2592000;
$month [5] = $month [4] + 2678400;
$month [6] = $month [5] + 2592000;
$month [7] = $month [6] + 2678400;
$month [8] = $month [7] + 2678400;
$month [9] = $month [8] + 2592000;
$month [10] = $month [9] + 2678400;
$month [11] = $month [10] + 2592000;
$month [12] = $month [11] + 2592000;
$arr_num = ( date('n')-1 );
$time_thismonth = $month[$arr_num];
$sql = "SELECT count(post_id) as monthly_posts
FROM " . POSTS_TABLE . "
WHERE poster_id = {$profiledata['user_id']}
AND post_time > '" . intval($time_thismonth) . "'";
if(! $result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain last months postcount.', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$this_months_posts = $row['monthly_posts'];
$db->sql_freeresult($result);