Exclusive eBooks, Software Solutions, Quality Guaranteed
 
Web NukeBiz
Welcome to NukeBiz · Members
Amazon
show cart or checkout0 items
Cart Value: 0.00

Forums » DragonflyCMS Projects » CPGNuCalendar » [solved] Date and Time in CPGNuCalendar-RSS-Feed ?
[solved] Date and Time in CPGNuCalendar-RSS-Feed ?
Created to cover the current vacuum.
Topic initiation via Bugger.

Post new topic    Reply to topic    Printer Friendly Page     Forum Index »  Community » CPGNuCalendar

View previous topic :: View next topic  
Author Message
gallowglas
Nice Poster
Nice Poster

Offline Offline
Joined: Jun 26, 2005
Posts: 10

PostPosted: Wed Sep 02, 2009 9:50 pm
Post subject: [solved] Date and Time in CPGNuCalendar-RSS-Feed ?

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 Crying or Very sad

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


gallowglas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.x/4.0.27/5.2.9/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Mon Sep 07, 2009 5:12 pm
Post subject: Re: Date and Time in CPGNuCalendar-RSS-Feed ?

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

nukebiz.com/CPGNuCalendar/

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
gallowglas
Nice Poster
Nice Poster

Offline Offline
Joined: Jun 26, 2005
Posts: 10

PostPosted: Tue Sep 08, 2009 12:00 am
Post subject: Re: Date and Time in CPGNuCalendar-RSS-Feed ?

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" ?


gallowglas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.x/4.0.27/5.2.9/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Tue Sep 08, 2009 6:16 am
Post subject: Re: Date and Time in CPGNuCalendar-RSS-Feed ?

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.

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
gallowglas
Nice Poster
Nice Poster

Offline Offline
Joined: Jun 26, 2005
Posts: 10

PostPosted: Fri Sep 11, 2009 10:34 am
Post subject: Re: Date and Time in CPGNuCalendar-RSS-Feed ?

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 ?


gallowglas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.x/4.0.27/5.2.9/9.2.1
Back to top
View user's profile Visit poster's website
gallowglas
Nice Poster
Nice Poster

Offline Offline
Joined: Jun 26, 2005
Posts: 10

PostPosted: Sun Oct 18, 2009 6:25 pm
Post subject: Re: Date and Time in CPGNuCalendar-RSS-Feed ?

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

Code::
		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
Code::
		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


gallowglas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.x/4.0.27/5.2.9/9.2.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index »  Community » CPGNuCalendar
Page 1 of 1
All times are GMT + 9.5 Hours



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum