Skip to content

Instantly share code, notes, and snippets.

View KorvinSzanto's full-sized avatar

Korvin Szanto KorvinSzanto

  • PortlandLabs
  • Portland Oregon
View GitHub Profile
public function display() {
$page = Page::getCurrentPage();
if(!$page->cID) {
$page = Page::getByPath("/page_not_found");
if(!$page->cID) {
$page = Page::getByID("/some_new_page");
}
}
parent::getOrCreate($page, $this->arHandle, 1);
parent::display($page);
<?php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)
//