GK JomSocial Stat shows wrong time

GK User
Mon Aug 08, 2011 12:59 pm
GK JomSocial Stats is supposed to show how long ago it was since something happend in Jomsocial. But if I for example upload a new picture in Jomsocial then GK JomSocial Stats is supposed to say that something happend in Jomsocial 1 minute ago but instead it says 2 hours ago when it really happend 1 minute ago.

Here is my site (it is in swedish): http://www.fotoforalla.se/
User avatar
Platinum Boarder

teitbite
Thu Aug 11, 2011 3:12 pm
Hi

Please search the forum for an answer. I've spend a month trying to solve this problem. Unfortunately I do not remember how it was change to work and cannot find it right now :( maby You will have more luck.
User avatar
Moderator

GK User
Thu Aug 11, 2011 4:17 pm
I found the thread but there are so many entries and different solutions that I don´t really know how to fix the problem. Now when you have the thread can you describe for me how to fix the problem?

1-general-discussion/53064-always-error.html?limit=40&start=40
User avatar
Platinum Boarder

teitbite
Thu Aug 11, 2011 5:40 pm
Hi

The last idea seams to work:

I changed at line 160:

$d = $end - $start;


to

$d = $end - $start - 7200;



where 7200 are seconds (60*60*2).

I tested it now - at time 00:30, and it works perfect.

Maybe this will help someone.
User avatar
Moderator

GK User
Thu Aug 11, 2011 5:58 pm
Do you know which file he changed in?
User avatar
Platinum Boarder

teitbite
Fri Aug 12, 2011 2:23 pm
Hi

Please try here: tmpl/default.php
User avatar
Moderator

GK User
Sat Aug 13, 2011 5:10 pm
I didn´t find that code in tpl/default.php

i did find it in helper.php but on line 433 and when I changed that I got an error message when I tried to access my site.
User avatar
Platinum Boarder

teitbite
Mon Aug 15, 2011 4:14 pm
Hi

Please send me this file.
User avatar
Moderator

GK User
Mon Aug 15, 2011 5:03 pm
I guess you mean the tmpl/default.php file.

I couldn´t attach it so I email it to you.
User avatar
Platinum Boarder

teitbite
Mon Aug 15, 2011 7:24 pm
Hi

You are right. The code is in the last function of helper.php file. Anyway I'll show this to programmers to fix the code instead of making change to the showing hour.
User avatar
Moderator

GK User
Tue Aug 16, 2011 10:05 am
Please check what is result of PHP function time() in your server side, the module code is correct but you have 2 hours shift between real time and your server time.
User avatar
Platinum Boarder

GK User
Tue Aug 16, 2011 10:33 am
bkrztuk wrote:Please check what is result of PHP function time() in your server side, the module code is correct but you have 2 hours shift between real time and your server time.


How do I check that?
User avatar
Platinum Boarder

GK User
Sun Aug 21, 2011 8:57 am
Something strange has happend now. Over a night the module works as it should but I get this error message on the Jomsocial front page:

Warning: Slut datum/tid ät tidigare än start datum/tid in /home/web74570/domains/fotoforalla.se/public_html/components/com_community/helpers/time.php on line 75

Error message translated to english:

Warning: End date/time is earlier than start date/time in /home/web74570/domains/fotoforalla.se/public_html/components/com_community/helpers/time.php on line 75

The strange thing is that I haven´t done anything and no one else hasn´t either, it just happend over a night.

Does someone know what is wrong?
User avatar
Platinum Boarder

GK User
Tue Sep 20, 2011 5:07 pm
Have this problem been solved?
User avatar
Platinum Boarder

teitbite
Fri Sep 23, 2011 7:31 am
Hi

U think You should show this last issue to jomsocial developers. One of their functions is generating it.
User avatar
Moderator

GK User
Wed Sep 28, 2011 8:28 am
I have contacted Jomsocial and as am sure you know they won´t help with third party problems. So either you fix this problem or you contact Jomsocial.
User avatar
Platinum Boarder

teitbite
Thu Sep 29, 2011 12:53 pm
Hi

Now I do not know what is the problem.

If jomsocial developers doesn;t want's to look at a problem generated here: /components/com_community/helpers/time.php in their own file, than I have no idea who is to blame ;/

What problem are You reffering to ? The error or the time isue. Have You tried what bkrztuk suggested ?
User avatar
Moderator

GK User
Thu Sep 29, 2011 2:37 pm
They say that since the problem has someting to do with a third party module they won´t look at it.

Yes I have tried what bkrztuk suggests. Maybe if Gavick contacted Jomsocial they would listen.
User avatar
Platinum Boarder

teitbite
Sun Oct 02, 2011 4:03 pm
Hi

You better send me ftp access. I'll take a look into this.
User avatar
Moderator

teitbite
Wed Oct 05, 2011 10:25 am
Hi

Please replace this file in mod_gk_js_stats module. Let me know it it helped I might mistaken the gap and added hours instead of removing it.
User avatar
Moderator

GK User
Wed Oct 05, 2011 11:47 am
That just made it worse, now it shows "4 hours ago" instead of before when it showed "2 hours ago".
User avatar
Platinum Boarder

teitbite
Sat Oct 08, 2011 11:01 am
Hi

Try this
User avatar
Moderator

GK User
Sat Oct 08, 2011 12:15 pm
Yes that worked! But if the most recent activity was done under 1 minute ago it just says "Latest activity ". Maybe it should say "Latest activity 1 minute ago" even if the latest activity was done under 1 minute ago.
User avatar
Platinum Boarder

teitbite
Tue Oct 11, 2011 10:04 am
Hi

Ok. I'll pass this request to programmers.
User avatar
Moderator

GK User
Wed Nov 09, 2011 3:01 am
Actually, will Gavick Team put this update into official download link?

BTW, i cant find where is the official "GK JomSocial Stats" page? I am still using v1.0



Cox i dont think it is good idea to need us to search the post and update the module.
User avatar
Fresh Boarder

GK User
Wed Nov 09, 2011 10:23 am
The module is in the source file package.
User avatar
Platinum Boarder


cron