I thought would be easier to create a new topic as this is stuck on integrating couchcms into fullcalendar post
I have a file called calendar.php with the following code
That shows the calendar all fine at https://www.beechwoodsolutions.co.uk/si ... lendar.php
I then have a events.php file with the following code, this is where I am not sure what I doing to be honest as trying to go by viewtopic.php?f=4&t=11117 but I'm not really understanding it
I have a file called calendar.php with the following code
- Code: Select all
<?php require_once( 'cms/cms.php' ); ?>
<script src='<cms:add_querystring "<cms:link masterpage='events.php' />" "js=1" />'></script>
<div id='calendar'></div>
<?php COUCH::invoke(); ?>
That shows the calendar all fine at https://www.beechwoodsolutions.co.uk/si ... lendar.php
I then have a events.php file with the following code, this is where I am not sure what I doing to be honest as trying to go by viewtopic.php?f=4&t=11117 but I'm not really understanding it
- Code: Select all
<?php require_once( 'cms/cms.php' ); ?>
<cms:template title='Calendar' order='9' clonable='1'>
<cms:editable name='desc' label='Description' type='textarea' />
<cms:editable name='location' label='Location' type='text' />
<cms:editable name="start_time" label="Time From (24 Hrs)"
opt_values=' Unspecified |
00:00 | 00:30 | 01:00 | 01:30 | 02:00 | 02:30 | 03:00 | 03:30 |
04:00 | 04:30 | 05:00 | 05:30 | 06:00 | 06:30 | 07:00 | 07:30 |
08:00 | 08:30 | 09:00 | 09:30 | 10:00 | 10:30 | 11:00 | 11:30 |
12:00 | 12:30 | 13:00 | 13:30 | 14:00 | 14:30 | 15:00 | 15:30 |
16:00 | 16:30 | 17:00 | 17:30 | 18:00 | 18:30 | 19:00 | 19:30 |
20:00 | 20:30 | 21:00 | 21:30 | 22:00 | 22:30 | 23:00 | 23:30 |'
type='dropdown'
/>
<cms:editable name="end_time" label="Time Until (24 Hrs)"
opt_values=' Unspecified |
00:00 | 00:30 | 01:00 | 01:30 | 02:00 | 02:30 | 03:00 | 03:30 |
04:00 | 04:30 | 05:00 | 05:30 | 06:00 | 06:30 | 07:00 | 07:30 |
08:00 | 08:30 | 09:00 | 09:30 | 10:00 | 10:30 | 11:00 | 11:30 |
12:00 | 12:30 | 13:00 | 13:30 | 14:00 | 14:30 | 15:00 | 15:30 |
16:00 | 16:30 | 17:00 | 17:30 | 18:00 | 18:30 | 19:00 | 19:30 |
20:00 | 20:30 | 21:00 | 21:30 | 22:00 | 22:30 | 23:00 | 23:30 |'
type='dropdown'
/>
<cms:editable
name='start_date'
label='Start Date'
type='datetime'
format='dmy'
fields_separator=','
default_time='@current'
required='1'
validator='MyEvent::start_date'
validator_msg='myevent::start_date=Incorrect date format'
/>
<cms:editable
name='end_date'
label='End Date'
type='datetime'
format='dmy'
fields_separator=','
default_time='@current'
required='1'
validator='MyEvent::end_date'
validator_msg='myevent::end_date=Incorrect date format'
/>
</cms:template>
<cms:if "<cms:gpc 'js' />" >
<cms:content_type 'application/javascript' />
<cms:capture into='msg' >
<cms:pages show_future_entries='1' >
<cms:if k_paginated_top>
[
{
"title": "All Day Event",
"start": "2019-04-01"
},
{
"title": "Long Event",
"start": "2019-04-07",
"end": "2019-04-10"
},
{
"id": "999",
"title": "Repeating Event",
"start": "2019-04-09T16:00:00-05:00"
},
{
"id": "999",
"title": "Repeating Event",
"start": "2019-04-16T16:00:00-05:00"
},
{
"title": "Conference",
"start": "2019-04-11",
"end": "2019-04-13"
},
{
"title": "Meeting",
"start": "2019-04-12T10:30:00-05:00",
"end": "2019-04-12T12:30:00-05:00"
},
{
"title": "Lunch",
"start": "2019-04-12T12:00:00-05:00"
},
{
"title": "Meeting",
"start": "2019-04-12T14:30:00-05:00"
},
{
"title": "Happy Hour",
"start": "2019-04-12T17:30:00-05:00"
},
{
"title": "Dinner",
"start": "2019-04-12T20:00:00"
},
{
"title": "Birthday Party",
"start": "2019-04-13T07:00:00-05:00"
},
{
"title": "Click for Google",
"url": "http://google.com/",
"start": "2019-04-28"
}
]
</cms:if>
<cms:if k_paginated_bottom>
$(document).ready(function() {
var calendar = $('#calendar').fullCalendar({
editable: true,
header: {
left: 'prev',
center: 'title',
right: 'next,today'
},
firstDay: 1,
navLinks: false,
eventLimit: true
});
});
</cms:if>
</cms:pages>
</cms:capture>
<cms:abort is_404='0' msg=msg />
</cms:if>
<?php COUCH::invoke(); ?>