Page 1 of 1

Periodic stats will not let me change months

Posted: Wed 5. Jan 2011, 21:00
by zhumar
I have the stats mod installed on my client's phpbb forum. When we go to the Periodic Statistics tab, it shows the daily stats for the current month. However, if I try to go to a different month and click Go, I get redirected to the Board Index instead of the stats for the previous month. It's very important that we get this fixed asap. I can give you site access if you need to see it for yourself. (everything is private)

Re: Periodic stats will not let me change months

Posted: Wed 5. Jan 2011, 21:39
by Marc
Do you maybe use a static URL, i.e. you are on the statistics page but you still see example.com/ in your browser?
If not, do you maybe include the forum using an iframe?

Re: Periodic stats will not let me change months

Posted: Wed 5. Jan 2011, 21:53
by zhumar
This is the URL to the Periodic Statistics page:
http://community.connectwise.com/index. ... .php&i=221

We actually use phpbb on a Joomla site and a component called JFusion makes it appear in the Joomla wrapper so the styling remains inside the template. You need to log in to view that link. You may use these credentials

user: stats
pass: wn99tYjrIG

Re: Periodic stats will not let me change months

Posted: Wed 5. Jan 2011, 22:11
by Marc
You didn't set the permissions for me, so I can't view the statistics.

Re: Periodic stats will not let me change months

Posted: Wed 5. Jan 2011, 22:29
by zhumar
Oops, I totally forgot about that. You should be able to view them now.

Re: Periodic stats will not let me change months

Posted: Thu 6. Jan 2011, 13:21
by Marc
Try if this helps:
Open includes/stats/stats_periodic.php
Find:

Code: Select all

		$template->assign_vars(array(
			'L_TITLE'	=> $user->lang['STATS_PERIODIC_' . strtoupper($mode)],			
			'S_FS_ACTION'		=> $this->u_action,
			'AS_ON'				=> sprintf($user->lang['AS_ON'], $user->format_date(time())),
		));
Replace with:

Code: Select all

		$template->assign_vars(array(
			'L_TITLE'	=> $user->lang['STATS_PERIODIC_' . strtoupper($mode)],			
			'S_STATS_ACTION'		=> $this->u_action,
			'AS_ON'				=> sprintf($user->lang['AS_ON'], $user->format_date(time())),
		));
If that doesn't help, please add this line after the mentioned code for debug purposes:

Code: Select all

echo $this->u_action;
Your font-size will increase and you will see an error message on the top of your board. Please post the exact error message.

Also, you might want to refresh your theme & template cache.

Re: Periodic stats will not let me change months

Posted: Thu 6. Jan 2011, 20:40
by zhumar
Looks like the first replace worked! Thanks a lot!