Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the project I'm working on currently, we've had a similar challenge. We also wanted to show events that aren't perse calendar items, but items that came out of action plans.</p> <p>We've used <a href="http://arshaw.com/fullcalendar/" rel="nofollow">Full Calander</a>, combined with PHP programming that supplies the JSON feed. Full Calendar also supplies many event hooks, which in our case triggers a Ajax post to PHP Programming which edits the database.</p> <p>A little more detailed:</p> <p>We call Full Calendar with:</p> <pre><code>$('#calendar').fullCalendar({ events: '/pl_feed.php' }); </code></pre> <p>Full Calendar then visits, for instance:</p> <pre><code>/pl_feed.php?start=1262332800&amp;end=1265011200&amp;_=1263178646 </code></pre> <p>(the extra parameter is used to prevent caching)</p> <p>pl_feed.php generates the events that are displayed in the Calendar. </p> <p>By the way: I found that the David Powers Date Class (read his book: it's good) is a joy to work with. You can download it at the site of the publisher: <a href="http://www.apress.com/9781430210115" rel="nofollow">http://www.apress.com/9781430210115</a></p> <p>When it's done generating the requested events, pl_feed.php puts them in a multi-dimensional array and echoes the array with json_encode:</p> <pre><code> foreach ($array_events as $array_event) { $array_feed_item['id'] = $array_event['id']; $array_feed_item['title'] = //Whatever you like to be the title; $array_feed_item['start'] = $array_event['start']; //Y-m-d H:i:s format $array_feed_item['end'] = $array_event['end']; //Y-m-d H:i:s format $array_feed_item['allDay'] = 0; $array_feed_item['color'] = 'blue'; //Whatever you like, of course $array_feed_item['borderColor'] = 'blue'; //You can also a CSS class: $array_feed_item['className'] = 'pl_act_rood'; //Add this event to the full list of events: $array_feed_items[] = $array_feed_item; } echo json_encode($array_feed_items); </code></pre> <p>Full Calendar will then show you the events generated by /pl_feed.php.</p> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload