forked from nikrou/eventHandler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_public.php
95 lines (87 loc) · 6.16 KB
/
_public.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/*
* -- BEGIN LICENSE BLOCK ----------------------------------
*
* This file is part of eventHandler, a plugin for Dotclear 2.
*
* Copyright(c) 2014-2022 Nicolas Roudaire <nikrou77@gmail.com> https://www.nikrou.net
*
* Copyright (c) 2009-2013 Jean-Christian Denis and contributors
* contact@jcdenis.fr http://jcd.lv
*
* Licensed under the GPL version 2.0 license.
* A copy of this license is available in LICENSE file or at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* -- END LICENSE BLOCK ------------------------------------
*/
// set ns
dcCore::app()->blog->settings->addNamespace('eventHandler');
// Localisation
__('scheduled');
__('ongoing');
__('finished');
// Load _wigdets.php
if (dcCore::app()->blog->settings->eventHandler->active) {
include_once(__DIR__ . '/_widgets.php');
}
// Public behaviors
dcCore::app()->addBehavior('publicHeadContent', [publicEventHandler::class, 'publicHeadContent']);
dcCore::app()->addBehavior('publicBeforeDocument', [publicEventHandler::class, 'publicBeforeDocument']);
dcCore::app()->addBehavior('publicEntryBeforeContent', [publicEventHandler::class, 'publicEntryBeforeContent']);
dcCore::app()->addBehavior('publicEntryAfterContent', [publicEventHandler::class, 'publicEntryAfterContent']);
// Missing values
dcCore::app()->tpl->addValue('BlogTimezone', [tplEventHandler::class, 'BlogTimezone']);
// Page of events
dcCore::app()->tpl->addBlock('EventsIf', [tplEventHandler::class, 'EventsIf']);
dcCore::app()->tpl->addValue('EventsMenuPeriod', [tplEventHandler::class, 'EventsMenuPeriod']);
dcCore::app()->tpl->addValue('EventsMenuSortOrder', [tplEventHandler::class, 'EventsMenuSortOrder']);
dcCore::app()->tpl->addValue('EventsFeedURL', [tplEventHandler::class, 'EventsFeedURL']);
dcCore::app()->tpl->addValue('EventsURL', [tplEventHandler::class, 'EventsURL']);
dcCore::app()->tpl->addValue('EventsPeriod', [tplEventHandler::class, 'EventsPeriod']);
dcCore::app()->tpl->addValue('EventsInterval', [tplEventHandler::class, 'EventsInterval']);
dcCore::app()->tpl->addBlock('EventsCount', [tplEventHandler::class, 'EventsCount']);
dcCore::app()->tpl->addBlock('EventsEntries', [tplEventHandler::class, 'EventsEntries']);
dcCore::app()->tpl->addBlock('EventsPagination', [tplEventHandler::class, 'EventsPagination']);
dcCore::app()->tpl->addBlock('EventsEntryIf', [tplEventHandler::class, 'EventsEntryIf']);
dcCore::app()->tpl->addBlock('EventsDateHeader', [tplEventHandler::class, 'EventsDateHeader']);
dcCore::app()->tpl->addBlock('EventsDateFooter', [tplEventHandler::class, 'EventsDateFooter']);
dcCore::app()->tpl->addValue('EventsEntryDate', [tplEventHandler::class, 'EventsEntryDate']);
dcCore::app()->tpl->addValue('EventsEntryTime', [tplEventHandler::class, 'EventsEntryTime']);
dcCore::app()->tpl->addValue('EventsEntryCategoryURL', [tplEventHandler::class, 'EventsEntryCategoryURL']);
dcCore::app()->tpl->addValue('EventsEntryAddress', [tplEventHandler::class, 'EventsEntryAddress']);
dcCore::app()->tpl->addValue('EventsEntryLatitude', [tplEventHandler::class, 'EventsEntryLatitude']);
dcCore::app()->tpl->addValue('EventsEntryLongitude', [tplEventHandler::class, 'EventsEntryLongitude']);
dcCore::app()->tpl->addValue('EventsEntryZoom', [tplEventHandler::class, 'EventsEntryZoom']);
dcCore::app()->tpl->addValue('EventsEntryDuration', [tplEventHandler::class, 'EventsEntryDuration']);
dcCore::app()->tpl->addValue('EventsEntryPeriod', [tplEventHandler::class, 'EventsEntryPeriod']);
dcCore::app()->tpl->addValue('EventsEntryMap', [tplEventHandler::class, 'EventsEntryMap']);
// Events of a post
dcCore::app()->tpl->addBlock('EventsOfPost', [tplEventHandler::class, 'EventsOfPost']);
dcCore::app()->tpl->addBlock('EventsOfPostHeader', [tplEventHandler::class, 'EventsOfPostHeader']);
dcCore::app()->tpl->addBlock('EventsOfPostFooter', [tplEventHandler::class, 'EventsOfPostFooter']);
dcCore::app()->tpl->addBlock('EventOfPostIf', [tplEventHandler::class, 'EventOfPostIf']);
dcCore::app()->tpl->addValue('EventOfPostURL', [tplEventHandler::class, 'EventOfPostURL']);
dcCore::app()->tpl->addValue('EventOfPostTitle', [tplEventHandler::class, 'EventOfPostTitle']);
dcCore::app()->tpl->addValue('EventOfPostDate', [tplEventHandler::class, 'EventOfPostDate']);
dcCore::app()->tpl->addValue('EventOfPostTime', [tplEventHandler::class, 'EventOfPostTime']);
dcCore::app()->tpl->addValue('EventOfPostAuthorCommonName', [tplEventHandler::class, 'EventOfPostAuthorCommonName']);
dcCore::app()->tpl->addValue('EventOfPostAuthorLink', [tplEventHandler::class, 'EventOfPostAuthorLink']);
dcCore::app()->tpl->addValue('EventOfPostCategory', [tplEventHandler::class, 'EventOfPostCategory']);
dcCore::app()->tpl->addValue('EventOfPostCategoryURL', [tplEventHandler::class, 'EventOfPostCategoryURL']);
dcCore::app()->tpl->addValue('EventOfPostAddress', [tplEventHandler::class, 'EventOfPostAddress']);
dcCore::app()->tpl->addValue('EventOfPostDuration', [tplEventHandler::class, 'EventOfPostDuration']);
dcCore::app()->tpl->addValue('EventOfPostPeriod', [tplEventHandler::class, 'EventOfPostPeriod']);
// Posts of an event
dcCore::app()->tpl->addBlock('PostsOfEvent', [tplEventHandler::class, 'PostsOfEvent']);
dcCore::app()->tpl->addBlock('PostsOfEventHeader', [tplEventHandler::class, 'PostsOfEventHeader']);
dcCore::app()->tpl->addBlock('PostsOfEventFooter', [tplEventHandler::class, 'PostsOfEventFooter']);
dcCore::app()->tpl->addBlock('PostOfEventIf', [tplEventHandler::class, 'PostOfEventIf']);
dcCore::app()->tpl->addValue('PostOfEventURL', [tplEventHandler::class, 'PostOfEventURL']);
dcCore::app()->tpl->addValue('PostOfEventTitle', [tplEventHandler::class, 'PostOfEventTitle']);
dcCore::app()->tpl->addValue('PostOfEventDate', [tplEventHandler::class, 'PostOfEventDate']);
dcCore::app()->tpl->addValue('PostOfEventTime', [tplEventHandler::class, 'PostOfEventTime']);
dcCore::app()->tpl->addValue('PostOfEventAuthorCommonName', [tplEventHandler::class, 'PostOfEventAuthorCommonName']);
dcCore::app()->tpl->addValue('PostOfEventAuthorLink', [tplEventHandler::class, 'PostOfEventAuthorLink']);
dcCore::app()->tpl->addValue('PostOfEventCategory', [tplEventHandler::class, 'PostOfEventCategory']);
dcCore::app()->tpl->addValue('PostOfEventCategoryURL', [tplEventHandler::class, 'PostOfEventCategoryURL']);