<div id="txp_mka">

<h1>mka_ical - Help</h1>

<p style="color:red;"><strong>
The help section is not complete so if you have any questions please write a comment.<br/>
<a href="http://kozianka-online.de/mka_ical">http://kozianka-online.de/mka_ical</a>
</strong></p>


<p>With the mka_ical plugin it is possible to display Events from iCal URL or File (e.g. Google Calendar).<br/>
The plugin makes use of SG-iCalendar by Morten Fangel (http://github.com/fangel/SG-iCalendar)</p>
<h2>How to use</h2>

<h3>Example 1 (Using a public Google Calendar)</h3>
<pre><code class="block">&lt;txp:mka_ical googlemail=&quot;YOURADDRESSNAME@googlemail.com&quot; /&gt;</code></pre>
<ul>
	<li><strong>googlemail</strong>: Your GoogleMail address.</li>
</ul>
<br/>


<h3>Example 2 (Using some options)</h3>
<pre><code class="block">&lt;txp:mka_ical url=&quot;http://url.of.ics.file/calendar.ics&quot;
	pastevents=&quot;1&quot;  limit=&quot;0&quot;
	imgfolder=&quot;images/termine/&quot; defaultimage=&quot;images/termine/none.gif&quot; /&gt;</code></pre>
<ul>
	<li><strong>url</strong>: URL of a Calendar File</li>
	<li><strong>pastevents</strong>: [0,1] Show past events?</li>
	<li><strong>limit</strong>: [0,1,2,3,4,..] Show only X events</li>
	<li><strong>imgfolder</strong>: Where are the images?</li>
	<li><strong>defaultimage</strong>: Path to the default image</li>
</ul>
<br/>

<h2>Default template</h2>
<pre><code class="block">&lt;span class="date"&gt;{date}&lt;/span&gt;
&lt;span class="title"&gt;{title}&lt;/span&gt;
&lt;span class="description"&gt;{description}&lt;/span&gt;
</code></pre>
<br/>

<h2>Defining own template</h2>

<h4>Embed template</h4>
<pre><code class="block">&lt;txp:mka_ical wraptag="" break="" googlemail=&quot;YOURADDRESSNAME@googlemail.com&quot;&gt;
&lt;p&gt;
  &lt;h4&gt;{date} - {title}&lt;/h4&gt;
  &lt;img src="{imagesrc}" border="0" align="left"/&gt;
  &lt;p&gt;{description}&lt;/p&gt;
&lt;/p&gt;
&lt;/txp:mka_ical&gt;</code></pre>

<h4>Using form attribute</h4>
<pre><code class="block">&lt;txp:mka_ical form="mka_ical_template" googlemail=&quot;YOURADDRESSNAME@googlemail.com&quot;/&gt;</code></pre>
<br/>

<h2>Available variables</h2>
<pre><code class="block"><code>{date} - Date
{title} - Title
{description} - Description
{imagesrc} - image link
{imageid} - image id (only for images from txp categories)</code></pre>
<br/>


<h2>CSS Template</h2>
<pre><code class="block">ul#icalevents {
}

ul#icalevents li {
}

ul#icalevents li img {
}

ul#icalevents li span.date {
}

ul#icalevents li span.title {
}

ul#icalevents li p.description {
}
</code></pre>

<h2>Attributes</h2>

<pre><code class="block">
url (string, default: "", url or googlemail required)
Link to the ICS-File

googlemail
GoogleMail address (calendar must be public, url or googlemail required))

limit (int, default:0, optional)
Defines how many events are shown. Defaults to 0 (means all)

pastevents (boolean, default: FALSE, optional)
Display past events

cssid (string, default: "icalevents", optional)
Sets the id for the event list

class
Sets the CSS-Class for the event list

cachingtime (int, default: 5 (minutes), optional)
local caching

fmtTime (string, default: "H:i", optional)
Format String for the Time

fmtDate (string, default: "d.m.Y", optional)
Format String for the date

imgfolder (string, default: "images", optional)
image folder

imgcat (string, default: "", optional)
image category

defaultimage (string, default: "images/none.gif", optional)
path to or id of the default image

wraptag (string, default: "ul", optional)
Wraptag-Tag

break (string, default: "li", optional)
Break-Tag

class (string, default: "mka_ical", optional)
CSS-Class for wraptag-Tag

cssid (string, default: "icalevents", optional)
CSS-Id for wraptag-Tag
</code></pre>

</div>
<!-- *** BEGIN PLUGIN CSS *** -->
<style type="text/css">
		#txp_mka code {
			font-weight:bold;
			font: 105%/130% "Courier New", courier, monospace;
			background-color: #FFFFCC;
		}
		#txp_mka code.block {
			font-weight:normal;
			border:1px dotted #999;
			background-color: #FFFFCC;
			display:block;
			margin:10px 10px 20px;
			padding:10px;
		}
</style>
<!-- *** END PLUGIN CSS *** -->
