DragonflyCMS Projects > CPGNuCalendar > [solved] Date and Time in CPGNuCalendar-RSS-Feed ? > Community Forums > Phoenix Netology
Forum Index > Community > CPGNuCalendar

[solved] Date and Time in CPGNuCalendar-RSS-Feed ? Reply to topic


I'm currently working on a network of DF sites for a germanwide organisation and I planned to use CPGNuCalendar (and DJSpAcEDeViLs "User-on-Events"-Mod) for coordinating events ...
The CPGNuCalendar is only installed at the mainpage, the local sites should get the events via RSS ...
problem is, the RSS does not contain date or time, only the title of the event 😢

Is there a way to get date and time into the RSS ?

Please enter your server specs in your user profile! 😢


The rss feed I provide, nucal.php, does provide event dates and times?

nukebiz.com/CPGNuCalendar/

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Well, I'm either blind or stupid, but your rss feed only provides times (ok, thats far more than mine does), but no dates.

(I'm using version 2.1.0 of CPGNuCal downloaded from here ... )

www.green-dragon.de/rss/nucal.php


edit :

Oh, I see, you were refering to your Flash Feed (had to switch to IE to see it) ...
But when you use nukebiz.com/rss/nucal.php in a Dragonfly block, it only provides times, no dates ...

Any idea for a "workaround" ?

Please enter your server specs in your user profile! 😢


The flash feed uses the full capabilities of the rss file whereas the DF rss reader doesn't.

View the source of nucal.php and you will see that it generates the <pubDate> field - my flash file reads and uses that field.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


To be honest, I don't want to use flash, because many people not using IE either have problems with that (like me) or have flash disabled ... Smile

As far as I see, it's an admin option to include the time into the eventtitle, maybe the same could be done with the date for the RSS ?

Please enter your server specs in your user profile! 😢


I did some testing and discovered that most RSS readers (i.e. Google) ignore the <pubDate> field, so i modified the functions.inc file to add the event date to the eventtitle instead of the time.
I simply replaced in the function rss_month_event

if ($cal_config['show_time'] == '1') { $timestr = ''; $addtime = ''; if ( $time >= 0 ) { $timestr = display_time($time); if ($duration == 0) { $addtime .= $timestr.': '; } else { $addtime .= $timestr; } if ( $duration > 0 ) { $h = (int) ( $time / 10000 ); $m = ( $time / 100 ) % 100; $m += $duration; $du = $duration; while ( $m >= 60 ) { $h++; $m -= 60; } $end_time = sprintf ( '%02d%02d00', $h, $m ); $addtime .= '-'.display_time($end_time).': '; } } $content .= ($addtime); }

with
if ($cal_config['show_time'] == '1') { $timestr = ''; $addtime = ''; if ( $time >= 0 ) { $timestr = display_time($time); if ($duration == 0) { $addtime .= date('D, d M Y', $days[$d]); $addtime .= ' : '; } else { $addtime .= date('D, d M Y', $days[$d]); $addtime .= ' : '; } if ( $duration > 0 ) { $h = (int) ( $time / 10000 ); $m = ( $time / 100 ) % 100; $m += $duration; $du = $duration; while ( $m >= 60 ) { $h++; $m -= 60; } $end_time = sprintf ( '%02d%02d00', $h, $m ); $addtime .= ' : '; } } $content .= ($addtime); }

ok, crude, but hey, it works fine for me Cool

Please enter your server specs in your user profile! 😢

All times are Australia/Adelaide


Jump to: