Quote from: Chocoholic at Mar 08, 2010, 09:28 AM
There seems to be very little support for this now, and I’m guessing that’s because MODx are working on a standard calendar function to be included with the CMS. I could be wrong...
The date is set in the /assets/snippets/EasyEvents/easyEvents.config.php file, and also in the chunks you set up for start time and end time (presuming you haven’t set both to Unix time). Check that your config file has the date the right way around by looking for these two lines near the bottom:
$_misc[’dateFormat’] = ’m/d/Y’;
$_misc[’dittoDateformat’] = ’%m %d %Y’;
The above are set up the American way. Yours may look the same. Either way, they should match what you’ve got in your chunk.
I’ve got my end time (’Date Format’ field in my EasyEventsEnd chunk) set up as: %a %B %d, %Y while my start time is set to Unix time, so I don’t need to put the formatting in that field.
You can find out more about Unix date formatting here.
You are correct that support for this item is poor...many ModX extras have fallen by the wayside due to their creators’ losing interest. The ModX team is too invested in Revo to correct the issues with Evo extras or encourage extras developers to properly maintain/support their extras. Maintaining and supporting anything open source is not a trivial task, as many people come to find out.
The date format per se that you describe may not be where the problem lies...I double-double-checked this.
The EE_class.php file is reversing the month and day when it creates the clickable links for the calendar, and we need to know why and where this occurs. For example, if you create a date event of 3/10/2010 (March 10, 2010), it’s creating a clickable calendar link of 10/3/2010 (October 3, 2010).
Furthermore there is a line in the class.php file which is also reversing the month and day, I fixed this on my site, but not yet the clickable calendar links.
It is this:
function getDateFromTV($tvVal='')
{
//$date = substr($tvVal,6,4).'-'.substr($tvVal,3,2).'-'.substr($tvVal,0,2); // 3/8/10 original code
$date = substr($tvVal,6,4).'-'.substr($tvVal,0,2).'-'.substr($tvVal,3,2); // 3/8/10 now displays correctly in calendar page
return $date;
}
Finally, the end/start dates are template variables, not chunks, if I understand the documentation correctly.
Unfortunately I’m not a sufficiently skilled PHP programmer to understand where in the ee_class.php or ee_ajax.php file it is mis-reading the dates from the template variables values table.
And the inventor of this app stopped working on it over a year ago.
I did find in the class.php file where the URLs get created, more or less, but not why or where the day and month get reversed, such that the correct URL gets attached to the wrong month/day.
It is somehow related to mySQL date storage and string to date conversion etc. etc., I can find various ways to get the month and day more or less correctly represented, but then no events appear when I try out things etc. in the class.php file.
Thank you, Tom