PDA

View Full Version : 3.3.0 calendar and PHP/MySQL



Frohnix
16 Nov 2010, 4:10 AM
Hi,

did someone have a example to implement a remote json store(PHP/MySQL as target) in the ExtJS calendar app?

Greets, Frohnix

Frohnix
16 Nov 2010, 10:16 AM
???

No one here is using the calendar with PHP ?

Frohnix
16 Nov 2010, 10:59 AM
Ok, I'll try to say it in other words:
I don't know how to create a jsonStore witch can read and write/update the calendar events (e.g. target: calendar.php).
And, I don't know what JSON the calendar.php should answer.
If I try to "echo" the JSON-String from the calendar example, I'll get one error after a other.

Sorry, I really don't know how to start.... :(

Greets, Frohnix

senacle
29 Nov 2010, 12:27 AM
The event-list.js give you an example of datas.

wemerson.januario
14 Dec 2010, 3:35 AM
?Anyone have some demo using php? thanks

navvn
5 Jan 2011, 6:36 AM
All you need is to edit store to look more or less like:

this.eventStore = new Ext.data.JsonStore({
url: '/calendar/list',
baseParams:{cmd: 'makes'},
root: 'rows',
fields: [
{
name: 'EventId',
mapping: 'id',
type: 'int'
},
{
name: 'CalendarId',
mapping: 'cid',
type: 'int'
},
{
name: 'StartDate',
mapping: 'start',
type: 'date',
dateFormat: 'c'
},
{
name: 'EndDate',
mapping: 'end',
type: 'date',
dateFormat: 'c'
},
etc...



and json like:


'success' => 'true',
'rows' => array(
array(
'id' => 1001,
'cid' => 1,
'title' => 'title',
'start' => '2010-12-21 01:30:00',
'end' => '2010-12-21 11:30:00',
'ad' => true,
'notes' => 'more text',
'rem' => '2880',
'loc' => 'Krakow',
'url' => 'http://veranet.pl'
),