1. angelodelia
  2. JEvents 1.5 (No longer actively supported)
  3. Friday, 26 August 2011
Hi all, i didn't found any other related topic.

I'm using JEvents 1.5.5f, in conjunction with Joomla 1.5.23.

I would like to introduce in the RSS Item title the end date of an event, because I would like to reparse it from an android app, later.

I found that the "item title" does not follow any configuration, so I looked up into the code.

I'm a Java experienced programmer, but a newbie in PHP. So after some trip in the code i found in the /components/com_jevents/views/modlatest/tmpl/rss.php
the following code:

    if ($row->alldayevent()) {
$temptime = new JDate($eventDate);
$item->set('title', $temptime->toFormat(JText::_('JEV_RSS_DATE')) ." : " .$item_title);
} else {
$temptime = new JDate($eventDate);
$item->set('title', $temptime->toFormat(JText::_('JEV_RSS_DATETIME')) ." : " .$item_title);
}


As I mentioned i'm not a PHP expert; but using the proven methodology of "Cut, Paste & Patch" I changed that code in


$temptime = new JDate($eventDate);
$eventEndDate = strtotime($row->publish_down());
$tempEndDate = new JDate($eventEndDate);
if ($row->alldayevent()) {
$format = JText::_('JEV_RSS_DATE');
} else {
$format = JText::_('JEV_RSS_DATETIME');
}
$item->set('title', $temptime->toFormat($format) . " - " . $tempEndDate->toFormat($format) . " : " . $item_title);



And it does the work for me. I noticed no side effect, but I would like to submit my patch to the community to get advice of possible damages I could have created.

Thank you.

Angelo


There are no replies made for this post yet.
Be one of the first to reply to this post!

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.