Shnepsey Posted August 1, 2014 Share Posted August 1, 2014 (edited) Hi all. so i have a little issue with the "top posters" hook I have installed recently in my forum. i have noticed that it doesn't really show the last month/week.. it shows longer than that.. how can i fix it? For example, i want it to show only "this month" post count (01/08) and it shows previous month posts(or maybe even longer lol) I'm talking about this hook : how can I fix it so it shows current month ? or at least how can I setup it to show only from date X to date Y This is important, thanks for helpers. Edited August 1, 2014 by Shnepsey Link to comment Share on other sites More sharing options...
0 Lock Down Posted August 1, 2014 Share Posted August 1, 2014 You can't set it since goes by number of days. you will have to find the file using ftp in the hooks folder starting with topPosters_ and edit it. Then it will be from the beginning of the week or beginning of the month. find $posts_date = time() - (86400 * 7); change to //$posts_date = time() - (86400 * 7); $posts_date = strtotime("last Sunday"); find $posts_date = time() - (86400 * $days); change to // $posts_date = time() - (86400 * $days); $posts_date = strtotime(date('Y-m-01')); Link to comment Share on other sites More sharing options...
0 Lock Down Posted August 1, 2014 Share Posted August 1, 2014 I am not sure what you are asking because the hook has this setting. where you choose today, this week , this month or forever.. Make sure you choose something besides overall. List Display Display top topic starters overall , day , week or month. Link to comment Share on other sites More sharing options...
0 Shnepsey Posted August 1, 2014 Author Share Posted August 1, 2014 I am not sure what you are asking because the hook has this setting. where you choose today, this week , this month or forever.. Make sure you choose something besides overall. List Display Display top topic starters overall , day , week or month. No.. that's not what I ment. Let me explain it again. Let's say I choose it to show this month's top posters right? then when I choose it, it shows last month's top posters as well. For example, there is someone with 150 posts and he is ranked 3.. while he made only 15 posts since the begining of the month.. How do I setup it so it shows only from the begining of the month to the end? thats what I mean.. Link to comment Share on other sites More sharing options...
0 Shnepsey Posted August 1, 2014 Author Share Posted August 1, 2014 You can't set it since goes by number of days. you will have to find the file using ftp in the hooks folder starting with topPosters_ and edit it. Then it will be from the beginning of the week or beginning of the month. find $posts_date = time() - (86400 * 7); change to //$posts_date = time() - (86400 * 7); $posts_date = strtotime("last Sunday"); find $posts_date = time() - (86400 * $days); change to // $posts_date = time() - (86400 * $days); $posts_date = strtotime(date('Y-m-01')); Worked! Thanks. Now, one more question if you don't mind. There's any way to setup this hook to work only on few forums? or don't work on a specific forum? For example, lets say I got a forum named BlaBla2 , I don't want people to earn post count on the sidebar for posting in that forum.. Any idea? Link to comment Share on other sites More sharing options...
0 Lock Down Posted August 1, 2014 Share Posted August 1, 2014 You are welcome. The answer is yes. But it is too difficult to try and explain all the changes needed. When I get time I will add the changes I made to the hook and and forum selection and post it in downloads. So close this one and watch downloads section. Link to comment Share on other sites More sharing options...
0 Shnepsey Posted August 1, 2014 Author Share Posted August 1, 2014 You are welcome. The answer is yes. But it is too difficult to try and explain all the changes needed. When I get time I will add the changes I made to the hook and and forum selection and post it in downloads. So close this one and watch downloads section. check your pm. Link to comment Share on other sites More sharing options...
0 Skreamzja Posted August 2, 2014 Share Posted August 2, 2014 The question(s) in this support topic have been answered and the owner has been able to solve the problem. Because of this, the support topic has been closed and moved. If you have other questions, please open a new topic. Link to comment Share on other sites More sharing options...
Question
Shnepsey
Hi all.
so i have a little issue with the "top posters" hook I have installed recently in my forum.
i have noticed that it doesn't really show the last month/week..
it shows longer than that.. how can i fix it?
For example, i want it to show only "this month" post count (01/08) and it shows previous month posts(or maybe even longer lol)
I'm talking about this hook :
how can I fix it so it shows current month ? or at least how can I setup it to show only from date X to date Y
This is important,
thanks for helpers.
Edited by ShnepseyLink to comment
Share on other sites
7 answers to this question
Recommended Posts