Jump to content
WebFlake
  • 0

Need urgent help.


Shnepsey

Question

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 Shnepsey
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

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

  • 0

 

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

  • 0

 

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...