News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

iCal in 2.x

Started by TuxDK, June 14, 2011, 12:43:11 PM

Previous topic - Next topic

TuxDK

Hey folks

Sorry if it's the wrong area to post, but I am trying to find out if smf 2.x supports iCal or not.
Several forum posts suggests it does and I even found a post that suggested "action=calendar;sa=ical" however that throws an error "You are not allowed to access this section"

Is iCal supported in 2.x and how do I enable it?
Can't seem to find anything in the support documents.

TuxDK

Shameless bumping, I still can't find anything about this.

Suki

Sources/Calendar.php says this:



void iCalDownload()
      - offers up a download of an event in iCal 2.0 format.

so it does offer some support for it, however, I'm not very familiar with iCal  to offer some assistance.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Illori

#3
looks like there is not directly a correct link for ical in the calendar, if you want to use this feature you need to use a url like this
index.php?action=calendar;sa=ical;eventid=1

where the event id matches the event id in the calendar, you can find it in the url if you edit the event.

[edit] http://dev.simplemachines.org/mantis/view.php?id=4758


demlak

i was playing around a little bit.. and started to integrate ical functionality..

to get a simple ical download link in calendar view you need an image called iCal.gif to be displayed.. it has to be placed in your theme folder under /images/icons/
then edit /Themes/default/Calendar.template.php
if ($event['can_edit'])
echo '
<a class="modify_event" href="', $event['modify_href'], '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a>';

echo '
', $event['link'], $event['is_last'] ? '' : ', ';
echo '</div>';

to:
if ($event['can_edit'])
echo '
<a class="modify_event" href="', $event['modify_href'], '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a>';
echo '
<a href="' . $scripturl . '?action=calendar;sa=ical;eventid=' . $event['id'] . '"><img src="' . $settings['images_url'] . '/icons/iCal.gif" alt="!" /></a>';

echo '
', $event['link'], $event['is_last'] ? '' : ', ';
echo '</div>';


this is just a start for ical integration.. maybe anyone of you want to help to enhance this.. and build a mod when finished..

Advertisement: