Mecha CMS

Mecha CMS blog and documentation.

Event Plugin

Updated: Sunday, 07 August 2016

Events manager.

Image

Download Latest Version

Page Types

  • event → for single event page
  • index-event → for event’s index page
  • tag-event → for event’s tag page
  • archive-event → for event’s archive page
  • search-event → for event’s search page
if($config->page_type === 'event') {
    echo 'You are in the event page.';
}

Constants

  • EVENT → map to lot\posts\event

Shields

You can make a copy of article.php as event.php to create special layout for single event page view, and index.php as index-event.php to create special layout for event pages view.

shield/
 ├── assets/
 │    └── …
 ├── 404.php
 ├── index.php
 ├── index-event.php ← this
 ├── article.php
 ├── event.php ← this
 ├── page.php
 ├── page-home.php
 ├── manager.php
 ├── comments.php
 ├── header.php
 ├── navigation.php
 ├── footer.php
 ├── sidebar.php
 ├── functions.php
 └── about.txt

Methods

Get Event Tags

Get::eventTags($order = 'ASC', $sorter = 'name');

Get Event Tag

Return specific event tag item filtered by its available data.

Get::eventTag($filter, $output = null, $fallback = false);

Get Event Path

Get::eventPath($detector);

Get Event Details

Get::eventExtract($input);

Get List of Events Path

Get::events($order = 'DESC', $filter = "", $e = 'txt');

Get List of Events Details

Get::eventsExtract($order = 'DESC', $sorter = 'time', $filter = "", $e = 'txt');

Get Minimum Data of an Event

Get::eventAnchor($path);

Get Event Headers Only

Get::eventHeader($path);

Extract Event File into List of Event Data

Get::event($reference, $excludes = array());

Widgets

Event Archive

echo Widget::eventArchive();
echo Shield::chunk('block.widget', array(
    'title' => $speak->widget->archive_event,
    'content' => Widget::eventArchive()
));

Event Tags

echo Widget::eventTag();
echo Shield::chunk('block.widget', array(
    'title' => $speak->widget->tags_event,
    'content' => Widget::eventTag()
));

Recent Event

echo Widget::recentEvent();
echo Shield::chunk('block.widget', array(
    'title' => $speak->widget->recent_events,
    'content' => Widget::recentEvent()
));

Random Event

echo Widget::randomEvent();
echo Shield::chunk('block.widget', array(
    'title' => $speak->widget->random_events,
    'content' => Widget::randomEvent()
));

Related Event

echo Widget::relatedEvent();
echo Shield::chunk('block.widget', array(
    'title' => $speak->widget->related_events,
    'content' => Widget::relatedEvent()
));

Event Calendar

Requires calendar plugin.

echo Widget::calendar('event');
echo Shield::chunk('block.widget', array(
    'title' => $speak->widget->calendar_events,
    'content' => Widget::calendar('event')
));

Get more information about widgets parameter in the widget reference.

Donation and Email Subscription