User Tools

Site Tools


res:plugins:icalfeed

iCalFeed Plugin

Author: Fraenkiman

Description

The iCalFeed plugin lets you display upcoming appointments or availability from one or more iCalendar (ICS) feeds on your FlatPress site.

It works without a database: FlatPress fetches the ICS feed(s), parses events (including basic recurring rules), caches the result, and renders it in a widget or via a tag on a page/post.

Screenshots

Widget static site preview

static site preview


Features

  • Display upcoming events from one or multiple ICS URLs
  • Privacy-friendly busy-only mode (recommended for public sites)
  • Widget + tag usage: [icalfeed]
  • Basic support for recurring events (RRULE / EXDATE / RECURRENCE-ID)
  • Caching (file cache, and optional APCu when available)
  • Multilingual UI strings (Czech/English/German/Italian provided; extendable)

Requirements

  • FlatPress 1.5 or higher (tested with FlatPress 1.5 RC2)
  • PHP 7.2 – 8.5
  • Smarty 5.7.0
  • Outgoing HTTP(S) access from your server to the ICS URL(s)

Installation

  1. Copy the plugin folder to: fp-plugins/icalfeed/
  2. In the FlatPress admin area, enable the plugin: Admin β†’ Plugins β†’ iCalFeed
  3. Configure the plugin: Admin β†’ Plugin β†’ iCalFeed

Getting an ICS URL (Google Calendar)

Google Calendar can provide an ICS feed URL.

  • Public calendar: best for simple public sharing.
  • Secret/private ICS URL: safer than "public", but anyone who has the URL can access it.

Important: The plugin does not use OAuth. It can only fetch calendar data via an accessible ICS URL.

For public websites, set Privacy = Busy only to avoid exposing details.


Configuration

Go to Admin β†’ Plugin β†’ iCalFeed and set:

  • Feed URLs: One URL per line.
  • Mode:
    • List: shows upcoming items (date/time + title or "Busy" depending on Privacy)
    • Busy: shows busy blocks (start–end)
  • Privacy:
    • Busy only (recommended): hides title/details
    • Show details: shows title (and optionally location)
  • Show location: adds event location in list mode (only if Privacy allows details)
  • Days ahead: how many days into the future to show
  • Limit: maximum number of results
  • Cache TTL: cache duration in seconds
  • Display timezone (optional): force rendering in a specific timezone (e.g. Europe/Berlin)
  • SSL verify (optional, advanced): keep enabled unless your host has broken CA bundles

Usage

1) Widget

  1. Go to Admin β†’ Widgets
  2. Add the iCalFeed widget to the desired sidebar

2) Tag in posts/pages

Insert the tag in a post or static page:

[icalfeed]

This will use the URLs and settings from the plugin configuration.


Tag Parameters

You can override settings per tag call.

Example:

[icalfeed days="14" limit="10" privacy="busy" mode="busy" tz="Europe/Berlin"]

Supported parameters (all optional):

Parameter Values Meaning
url http(s) URL Use a specific ICS URL (instead of the configured list).
days number Days into the future (e.g. 7 or 30).
limit number Maximum number of items shown.
mode list / busy List view or busy-block view.
privacy busy / details Hide details or show summary/title.
location 0 / 1 Show location (only with privacy="details").
tz / timezone IANA TZ (e.g. Europe/Berlin) Force display timezone.
ttl seconds Cache TTL override for this tag call.
title text Override the heading/title for this block.
class CSS class Add a custom CSS class to the wrapper.

Notes:

  • If you set url=, the plugin will fetch only that one feed for this tag instance.
  • If you do not set url=, the plugin will use the configured URL list.
  • privacy="busy" is the safe default for public sites.

Output / Styling

The plugin outputs semantic HTML lists with CSS classes:

  • Wrapper: div.icalfeed
  • List mode:
    • ul.icalfeed-list
    • li.icalfeed-item
    • span.icalfeed-when
    • span.icalfeed-summary
    • span.icalfeed-location (optional)
  • Busy mode:
    • ul.icalfeed-busy
    • li.icalfeed-busy-item
    • span.icalfeed-when
    • span.icalfeed-busy-label

You can override styles in your theme, for example by adding CSS rules to your theme stylesheet.


Caching

The plugin caches parsed/expanded results to reduce load:

  • File cache in FlatPress cache directory (always available)
  • APCu (optional) if enabled on the server

If you change settings and do not see updates, use the Clear cache button in the iCalFeed configuration panel.


Privacy and Security Notes

  • A private/secret ICS URL should be treated like a password: anyone with the link can read it.
  • For public blogs, use Privacy = Busy only.
  • Avoid exposing meeting titles, locations, or attendee information unless you fully understand the implications.

Troubleshooting

Output appears as code (HTML escaped)

If you see &lt;ul …&gt; or output wrapped in <pre><code>:

  • Ensure you are using the updated plugin templates (the output should not be indented as code).
  • Clear cache in Admin β†’ Plugin β†’ iCalFeed β†’ Clear cache.
  • Re-save the post/page once.

Nothing is shown

  • Check that your ICS URL is reachable from the server.
  • Try a simple public ICS URL first.
  • Verify the URL is entered one per line in the config.

SSL/TLS problems

If your server cannot verify certificates (common on misconfigured hosts):

  • Keep SSL verify enabled by default.
  • Disable it only as a last resort.

Examples

Busy-only availability for next 30 days

[icalfeed mode="busy" privacy="busy" days="30" limit="50"]

Show details (title + location) for the next 7 days

[icalfeed mode="list" privacy="details" location="1" days="7" limit="10"]

Single feed override

[icalfeed url="https://example.com/calendar.ics" mode="list" privacy="busy"]

License

  • The iCalFeed-Plugin code follows the FlatPress project license.

Download

Changelog

2026-01-25: Version 1.0.3
  • Fixed non-functioning time zone logic, TLS/SSL verify, tag overrides tz/timezone
  • Added Czech and Italian language files
2026-01-22: Version 1.0.2
  • The version upgrade via Clear-Cache now takes place in the APCu namespace.
  • Fixed deprecated $http_response_header under PHP8.5
2026-01-19: Version 1.0.1
  • Cache mechanisms stabilized
  • Language arrays corrected
2026-01-18: Version 1.0.0
  • Initial release: iCalFeed plugin

Support

Please ask for help on the FlatPress Forum

res/plugins/icalfeed.txt Β· Last modified: by fraenkiman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki