Posts this month (Viewprofile)

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
1
50%
Very Good
1
50%
Good
0
No votes
Fair
0
No votes
Poor
0
No votes
 
Total votes: 2

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 27359
Joined: Sat Aug 16, 2003 7:36 am

Posts this month (Viewprofile)

Post by Extensions Robot » Thu Sep 07, 2006 1:40 pm

MOD Name: Posts this month (Viewprofile)
Author: kkroo
MOD Description: This modification will add a new section to viewprofile showing how many posts you have done in the current month.

MOD Version: 1.0.1
Tested on phpBB Version: 2.0.21

Download File: posts_this_month_101_3p1r.mod
mods overview page: View
File Size: 5009 Bytes



Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version listed in the topic. It may not work in any other versions of phpBB.
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

User avatar
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Wed Oct 04, 2006 12:49 pm

MOD Validated/Released

Notes:
A way of showing posting stats for your users.

User avatar
raipe
Registered User
Posts: 96
Joined: Sun May 28, 2006 1:14 pm

Post by raipe » Fri Nov 03, 2006 5:33 pm

Just installed this, great mod!

One add-on would be cool, showing info in memberlist and allowing to order by "Posts this month"

kulinar
Registered User
Posts: 651
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar » Fri Nov 03, 2006 5:42 pm

Can we see a screenshot, plz?

User avatar
raipe
Registered User
Posts: 96
Joined: Sun May 28, 2006 1:14 pm

Post by raipe » Fri Nov 03, 2006 5:45 pm


User avatar
$unny
Registered User
Posts: 60
Joined: Sun Jan 08, 2006 8:42 am

Post by $unny » Sat Nov 11, 2006 3:56 am

BEST ONE

NO ERROR at all :D

User avatar
WarriorPrincess
Registered User
Posts: 163
Joined: Wed Feb 08, 2006 10:09 am
Location: Australia

Post by WarriorPrincess » Thu Mar 01, 2007 4:58 am

I installed this simply little mod a few weeks back...

however... today is the 1st March... and it is still carrying posts over.

just wondering is the change set to the member forum date and time or something else?

terminatoronly
Registered User
Posts: 93
Joined: Wed Jun 13, 2007 7:55 pm

Re: Posts this month (Viewprofile)

Post by terminatoronly » Sat Jun 16, 2007 10:28 pm

I Appreciate your work keep it up :)

User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Re: Posts this month (Viewprofile)

Post by beggers » Fri Jun 22, 2007 3:13 am

Thanks, this looks like a useful mod.

User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Re: Posts this month (Viewprofile)

Post by beggers » Fri Jun 22, 2007 3:14 am

:: edit :: sorry for the double post. I'm getting an error message from phpBB about a "search backend".

User avatar
quahappy
Former Team Member
Posts: 1416
Joined: Tue Dec 12, 2006 8:19 pm
Location: South Yorkshire
Name: Andy Green

Re: Posts this month (Viewprofile)

Post by quahappy » Mon Apr 14, 2008 8:55 pm

Hi,

Not sure if support for this great MOD is still ongoing given the above post being last year.

This MOD is great but I have been tweaking it to get it to display "Posts this month" within a new column when a Usergroup is viewed (or Memberlist) but not having much success. Afraid I only know the basics of php and still learning all the time. btw, I do all installation of MOD's / tweaking and alterations on my Test Forum first.... ;)

Basically, on my forum, Members have to contribute (post) x times a month otherwise access to "specials" like the Arcade, Hangman, Chat Room, etc, etc are denied (those that have access are within a Usergroup). I'm trying to make things easier for my Moderators to check if Members have made the required minimum number of posts per calendar month. Obviously, clicking on each Members Profile in turn is fine but can be a slow process.

So, as above, I'm wishing to be able to display an extra column in Memberlist, that shows each Members Posts for the month.

Anyone who can help please? :D
If you don't ask.....

User avatar
quahappy
Former Team Member
Posts: 1416
Joined: Tue Dec 12, 2006 8:19 pm
Location: South Yorkshire
Name: Andy Green

Re: Posts this month (Viewprofile)

Post by quahappy » Tue Apr 15, 2008 5:49 pm

Further to above, does anyone know how to modify:

Code: Select all

$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'];
So that it returns the query: previous month + current month = total posts

Unsure what coding to use to calculate this. If anyone can help me with this I would be VERY grateful! It would save a lot of hassle checking all Members profiles to see if they can access Arcade, Hangman, etc. (exclude / include from a Usergroup - if what I require can be done, no Usergroup / moderating would be required)

Thanks in advance. :D
If you don't ask.....

User avatar
quahappy
Former Team Member
Posts: 1416
Joined: Tue Dec 12, 2006 8:19 pm
Location: South Yorkshire
Name: Andy Green

Re: Posts this month (Viewprofile)

Post by quahappy » Tue Apr 15, 2008 9:30 pm

It appears that if I alter:

Code: Select all

$arr_num = ( date('n')-1 );
to:

Code: Select all

$arr_num = ( date('n')-1 );
It shows me the total post count for the present and previous month. So far so good.

The problem I've got is that I'm unsure how to make $this_months_posts value recognise throughout all files. ie activity.php, hangman.php, chat.php

I've tried inserting all the code into the above mentioned files but get errors:

Could not obtain last months postcount.

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND post_time > '1204329600'' at line 4

SELECT count(post_id) as monthly_posts FROM phpbb_posts WHERE poster_id = AND post_time > '1204329600'

Line : 46
File : hangman.php


Sure it's something not so hard I'm doing wrong. Anyone got any ideas?

Basically, after, my code will check that monthly post value (current and previous month) is greater than a certain value before is access is accepted.
If you don't ask.....

User avatar
quahappy
Former Team Member
Posts: 1416
Joined: Tue Dec 12, 2006 8:19 pm
Location: South Yorkshire
Name: Andy Green

Re: Posts this month (Viewprofile)

Post by quahappy » Sun May 04, 2008 8:05 pm

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!
If you don't ask.....

wittykitty
Registered User
Posts: 74
Joined: Sat Feb 16, 2008 11:09 am

Re: Posts this month (Viewprofile)

Post by wittykitty » Sun Jul 20, 2008 1:37 pm

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

Forum:
http://www.fordescortmk2ownersclub.co.uk/phpBB2T

Post Reply

Return to “[2.0.x] MOD Database Releases”

Who is online

Users browsing this forum: No registered users and 9 guests