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