Download the PHP package fredbradley/socs-calendar-ics-parser without Composer
On this page you can find all versions of the php package fredbradley/socs-calendar-ics-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fredbradley/socs-calendar-ics-parser
More information about fredbradley/socs-calendar-ics-parser
Files in fredbradley/socs-calendar-ics-parser
Package socs-calendar-ics-parser
Short Description A PHP Script that parses an ICS file from SOCS, in a readable format to display elsewhere.
License AGPL-3.0-or-later
Informations about the package socs-calendar-ics-parser
SOCS .ics Calendar Parser
A PHP Script that parses an ICS file from SOCS, in a readable format to display elsewhere.
Features
- Super easy to use.
- Once you've included it in your composer package, just one line of code will get you a PHP array of Event Objects.
- Compatible with Wordpress transients, if you use Wordpress.
- Compatible with Laravel Caching, if you use Laravel.
- Actively managed - if you have a feature or idea request, please let me know, or even better - submit a pull request.
Requirements
This project requires PHP 7. I'm too lazy to write for PHP5.6 these days. Get with the program!
How to install
Examples
Wordpress Widget Example
This is written to work with Wordpress and even has Wordpress Caching (set_transient
) functionality built in, to speed up page load times.
If you want to see an example of a widget that uses this code, please see this piece of code in my 'cranleigh-socs' plugin. If you like you can install the entire Cranleigh SOCS Plugin, but be aware it's written in Bootstrap 3 with HTML markup specifically for our sites.
If you want some help customising it, I'd be happy to help.
Usage
Options
minNumEvents
(default: 5)ignoreCache
(default: false) Set totrue
if you don't want get the object from the cache.cacheName
(default: 'calendar-cache') if you have more than one instance of this, you should probably give each instance a unique cache name, so they don't overwrite each other-
weeksAhead
(default: 15) how many weeks ahead to you want to get the events forBasic Example with Default Options
Example with custom options