Upcoming Events - Improved layout

  • Mark Matheson
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Working with you for the link run
More
9 years 6 months ago #86646 by Mark Matheson
Upcoming Events - Improved layout was created by Mark Matheson
I have used the Upcoming Events module to display the upcoming events on my front page. If I use the Default layout, everything is displayed correctly. However, if I use the Improved layout, the date of the events are displayed incorrectly..

It gets the day right, but the month is completely wrong! As an example, an event that is set down for the 7th Sept, shows as 7th Mar, while an event set down for the 3rd Nov shows as 3rd Apr. Another event on the 6th Dec shows as the 6th Feb.

There is no pattern and I am struggling to identify why that layout is different to the Component Timeline layout or the module's default layout. both of which display correctly.

It is currently a protected site, so I can't give you public access at this stage.

Events Booking (2.10.1) and Membership Pro (2.6.2) user

Please Log in or Create an account to join the conversation.

  • Mark Matheson
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Working with you for the link run
More
9 years 6 months ago #86647 by Mark Matheson
Replied by Mark Matheson on topic Upcoming Events - Improved layout
UPDATE

I have fixed it by editing line 123 in the improved.php template, and adding an additional line as follows: -
Code:
$month = JHtml::_('date', $row->event_date, 'm', null); $month *= 1;

Events Booking (2.10.1) and Membership Pro (2.6.2) user

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #86667 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Upcoming Events - Improved layout
Hi Mark

Not sure what version of the extension you are using but we could not found that line in the latest version

The correct code (in the latest version, but in a different line number) is
Code:
$month = JHtml::_('date', $row->event_date, 'n', null);

Maybe the issue happens because you are using quite old version of the extension?

Tuan

Please Log in or Create an account to join the conversation.

  • Mark Matheson
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Working with you for the link run
More
9 years 6 months ago #86682 by Mark Matheson
Replied by Mark Matheson on topic Upcoming Events - Improved layout
I purchased and downloaded the extension on Saturday so I would expect that it is the latest version.

I have reinstalled the extension to be sure and get exactly the same result. I need to add the additional line under the line you mentioned to get it to display correctly.

Very odd.

Events Booking (2.10.1) and Membership Pro (2.6.2) user

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc