My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 347: import events
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Feb 2010


Sign in to add a comment
 
Reported by ptise...@gmail.com, Feb 16, 2010
I have some problem to import events from a php script.

If I use directly 
events:
[{"id":111,"title":"Event1","start":"2010-02-10T13:15:00.00","url":"http:\/\/yahoo.com\/","allDay":false},{"id":222,"title":"Event2","start":"2010-02-20T13:15:00.00","url":"http:\/\/yahoo.com\/","allDay":false}],

all is fine ; events appear in calendar

but If events array come from a php script, json.php, like this :
<?php
$year = date('Y');
$month = date('m');

echo json_encode(array(
	array('id' => 111,'title' => "Event1",'start' =>
"$year-$month-10T13:15:00.00",'url' => "http://yahoo.com/",'allDay'=>false),		
	array('id' => 222,'title' => "Event2",'start' =>
"$year-$month-20T13:15:00.00",'url' => "http://yahoo.com/",'allDay'=>false
	)	
));
?>

and the events source is modified :

  events: "http://.../json.php

Nothing appear in calendar ...Where am I wrong ?

Thanks
Feb 18, 2010
#1 ymaire...@gmail.com
Hello ptiseb54
Your JSON code works just perfectly
The problem must be elsewhere.

btw, thanks for your code: mine didn't work
Feb 26, 2010
Project Member #2 adamrs...@gmail.com
i really don't know. works fine for me as well.
Status: Done
Sign in to add a comment

Powered by Google Project Hosting