phpScheduleIt
May 19, 2013, 05:07:18 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: RSS feed in 2.x  (Read 1004 times)
snoever
Newbie
*

Karma: 0
Posts: 1


« on: April 25, 2012, 06:58:07 AM »

Is it possible to display all upcoming reservation activity for a user as an RSS feed in 2.x?
We use this feature in 1.2  successfully.

Thanks,
Kasper

Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #1 on: April 30, 2012, 03:12:01 PM »

Not yet. This feature will be added to 2.x in a future release, though.
Logged
jorolok87654
Newbie
*

Karma: 0
Posts: 2


WWW
« Reply #2 on: June 15, 2012, 06:42:18 AM »

Looking forward to the update also.
Logged
wouterheer
Newbie
*

Karma: 0
Posts: 9


« Reply #3 on: January 14, 2013, 04:09:53 AM »

Did anyone manage to get this working yet, I would like to present todays events on a digital signage screen, rss feeds would be great.
Logged
wouterheer
Newbie
*

Karma: 0
Posts: 9


« Reply #4 on: January 17, 2013, 05:56:21 AM »

I've got it working, just one small item..

Code:
<?php

include('class.rss.php');
 
define('ROOT_DIR''/home/somerenh/public_html/buntplanner/');
require_once(
'/home/somerenh/public_html/buntplanner/Domain/Access/namespace.php');
require_once(
'/home/somerenh/public_html/buntplanner/Domain/Access/ResourceRepository.php');
require_once(
'/home/somerenh/public_html/buntplanner/Domain/Access/ReservationViewRepository.php');
$rss = new rssFeed;


 
$itemsarray = array();
  
$resRepo = new ReservationViewRepository();
  
$reservations $resRepo->GetReservationList(Date::Now(), Date::Now()->AddDays(30));
   
  foreach(
$reservations as $reservation) {
 
$itemsarray[] = array("title"=> $reservation->Title"resource"=> $reservation->ResourceName"starttime"=> $reservation->StartDate->Format('(d-m) G:i'), "endtime"=> $reservation->EndDate->Format('G:i'));
}

$rss_array = array(
"encoding"=>"UTF-8",
"language"=>"en-us",
"title"=>"Buntplanner"// This field is mandatory
"description"=>"Bezetting voor de komende dag in de Bunt"// This field is mandatory
"link"=>"http://planner.mysite.nl"// This field is mandatory
"items"=>$itemsarray
);

header("Content-type: application/xml");
echo 
$rss->rss($rss_array"rss.xsl"); // Second parameter is not required

?>

Now all resources are being showed, is is possible to show only a set of resources, for example only resource id's 1,4 en 6?

Thanks,

Wouter.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #5 on: January 28, 2013, 03:29:16 PM »

The easiest thing would be to just not add them to the $itemsarray if the resource id isn't in your list.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!