debruer
Newbie
Karma: 0
Offline
Posts: 1
|
 |
« on: June 01, 2010, 07:27:57 » |
|
Hello,
I just started using Joomla a few days ago and found your Jcomments solution and so far it has been working mostly great. However, after doing a fresh install of a new site with the Jcomments component and latest comments module, I found that the site doesn't display the latest comments right away. Looking further, I found that the sql that is used to retrieve the comments to display does a check against the publish_on value of the parent content object, comparing it to the current mysql server time. The problem is, I set the timezone of my site to be UTC -07:00 Mountain Time, so all of my publish_on values are 7 hours into the future. This causes none of the comments for any article to appear in the latest comment module until 7 hours after the article is published because it fails the publish check. I did a quick hack to get things working, modifying line 77 of mod_jcomments.php:
default:
. "\n AND (c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= now())"
modified:
. "\n AND (c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= date_add(now(), interval 7 hour))"
I was wondering if this is a known bug (couldn't find any other posts related to this) and if there is a better solution out there (i know this is just a temp hack).
Using Joomla! 1.5.17 Stable and Jcomments 2.2.0.0
Thanks
|