6.0.0-git
2024-03-19
Last Modified 2015-02-03 by Guest

Embedding Calendars in Kronolith Version 4.1.4

It is possible to embed small views of your calendars in external websites. You can embed the same views that you can place on Horde's portal page. The following are examples of code to use to embed each view on an external blog or website. You should obviously edit the code with the correct server address and calendar name. The 'container' parameter is arbitrary, but must both match the DOM id of the the div element and be unique across the whole page you are embedding in.

The following will embed the month view of the calendar indicated by the calendar parameter:
<div id="kronolithCal"></div>
<script src="http://hostname.example.com/horde/services/ajax.php/kronolith/embed?calendar=internal_qAJrkfuHbKlcFSBcadUkOg1&container=kronolithCal&view=Month" type="text/javascript"></script>

The following will embed the "summary" view:
<div id="kronolithCal"></div>
<script src="http://localhost/horde/services/ajax.php/kronolith/embed?container=kronolithCal&view=Summary" type="text/javascript"></script>

You may add the following parameters to the summary view:
calendar=x Limit to events in the specified calendar.
days=x - limits the number of days shown in the summary view to x.
maxevents=x limits the number of events shown to x.

The following embeds the "monthlist" view:
<div id="kronolithCal"></div>
<script src="http://localhost/horde/services/ajax.php/kronolith/embed?container=kronolithCal&view=Monthlist" type="text/javascript"></script>

You may add the following parameters:
calendar
months
maxevents

For most of the blocks, if you leave out the "calendar" parameter then all currently viewable (I believe only local) calendars would be shown. Otherwise, only the calendar specified in the calendar parameter is used.

If times are off you may need to set "date.timezone = MyTimeZone" in my php.ini.

There are a number of examples on the web using the file imple.php which do not work with the newer versions of Kronolith.
Note that the value of "view=" needs to be uppercase (this is wrong in some examples/paste code)