├── templates
├── user
│ ├── ical.tpl
│ ├── xml.tpl
│ ├── footer.tpl
│ ├── event.tpl
│ ├── day.tpl
│ ├── week.tpl
│ └── list.tpl
├── hooks
│ ├── delete.tpl
│ ├── view.tpl
│ ├── edit.tpl
│ └── modifyconfig.tpl
├── blocks
│ ├── calendarlinks.tpl
│ ├── featuredevent_modify.tpl
│ ├── pastevents_modify.tpl
│ ├── pastevents.tpl
│ ├── today.tpl
│ ├── upcoming.tpl
│ ├── calendar_modify.tpl
│ ├── month.tpl
│ └── featuredevent.tpl
├── contenttype
│ ├── postcalevent_edit.tpl
│ ├── postcalevents_edit.tpl
│ ├── postcalevents_view.tpl
│ └── postcalevent_view.tpl
├── email
│ └── adminnotify.tpl
├── event
│ ├── deleteeventconfirm.tpl
│ └── filtercats.tpl
├── plugins
│ ├── function.pc_implode.php
│ ├── modifier.pc_date_format.php
│ ├── function.pc_allowedhtml.php
│ ├── function.pc_queued_events_notify.php
│ └── function.pc_sort_events.php
├── admin
│ └── eventrevue.tpl
└── search
│ └── options.tpl
├── images
├── add.gif
├── day.gif
├── new.gif
├── admin.png
├── feed.gif
├── ical.png
├── list.gif
├── lock.gif
├── month.gif
├── today.gif
├── week.gif
├── year.gif
├── add_on.gif
├── calblank.gif
├── day_on.gif
├── list_on.gif
├── month_on.gif
├── repeat.png
├── search.gif
├── week_on.gif
├── year_on.gif
├── exceptions.png
├── icon-calendar.jpg
└── smallcalicon.jpg
├── .gitignore
├── docs
└── en
│ ├── User
│ └── userdocs.txt
│ ├── README
│ ├── Admin
│ ├── MenuConfig.txt
│ ├── Licensing_Usage.txt
│ ├── PendingContent.txt
│ ├── PersonalCalendars.txt
│ ├── Permissions.txt
│ ├── Customization.txt
│ ├── Blocks.txt
│ ├── Requirements_Features.txt
│ ├── TimeIt_Import.txt
│ ├── CategoryUsage.txt
│ ├── Hooks_OtherModules.txt
│ └── AdministrationOptions.txt
│ └── Developer
│ └── Hooks.txt
├── lib
├── vendor
│ └── sabre-vobject
│ │ ├── tests
│ │ ├── bootstrap.php
│ │ ├── Sabre
│ │ │ └── VObject
│ │ │ │ ├── Issue153Test.php
│ │ │ │ ├── VersionTest.php
│ │ │ │ ├── ParameterTest.php
│ │ │ │ ├── ElementListTest.php
│ │ │ │ ├── Issue154Test.php
│ │ │ │ ├── RecurrenceIteratorFifthTuesdayProblemTest.php
│ │ │ │ ├── EmClientTest.php
│ │ │ │ ├── Component
│ │ │ │ ├── VJournalTest.php
│ │ │ │ ├── VTodoTest.php
│ │ │ │ └── VEventTest.php
│ │ │ │ ├── RecurrenceIteratorInfiniteLoopProblemTest.php
│ │ │ │ ├── DateTimeParserTest.php
│ │ │ │ └── TimeZoneUtilTest.php
│ │ └── phpunit.xml
│ │ ├── .travis.yml
│ │ ├── vendor
│ │ ├── composer
│ │ │ ├── autoload_classmap.php
│ │ │ ├── autoload_namespaces.php
│ │ │ └── autoload_real.php
│ │ └── autoload.php
│ │ ├── ChangeLog
│ │ ├── lib
│ │ └── Sabre
│ │ │ └── VObject
│ │ │ ├── Element.php
│ │ │ ├── ParseException.php
│ │ │ ├── Version.php
│ │ │ ├── Component
│ │ │ ├── VJournal.php
│ │ │ ├── VTodo.php
│ │ │ ├── VEvent.php
│ │ │ └── VAlarm.php
│ │ │ ├── Parameter.php
│ │ │ └── ElementList.php
│ │ ├── composer.json
│ │ └── LICENSE
└── PostCalendar
│ ├── CalendarView
│ ├── Nav
│ │ ├── Day.php
│ │ ├── List.php
│ │ ├── Week.php
│ │ ├── Year.php
│ │ ├── Month.php
│ │ ├── Search.php
│ │ ├── Create.php
│ │ ├── Today.php
│ │ ├── Admin.php
│ │ ├── Ical.php
│ │ ├── Print.php
│ │ └── Xml.php
│ ├── Xml.php
│ ├── Day.php
│ ├── PastEventsBlock.php
│ ├── List.php
│ └── Week.php
│ ├── Entity
│ ├── EventCategory.php
│ └── RecurException.php
│ ├── Api
│ └── Account.php
│ ├── PostCalendarEvent
│ ├── Generic.php
│ └── News.php
│ ├── Handlers.php
│ ├── ContentType
│ └── PostCalEvent.php
│ ├── Form
│ └── Handler
│ │ └── EditHandler.php
│ ├── Needles
│ └── PostCalDate.php
│ ├── Block
│ ├── Featuredevent.php
│ └── Pastevents.php
│ ├── TaggedObjectMeta
│ └── PostCalendar.php
│ ├── Controller
│ └── User.php
│ └── Version.php
├── style
└── jquery-overrides.css
├── README.markdown
├── composer.json
├── javascript
├── postcalendar-admin-modifyconfig.js
├── postcalendar-function-updatefields.js
└── jquery-plugins
│ └── tipTipv13
│ └── tipTip.css
├── TODO.txt
├── zikula.manifest.json
└── locale
└── module_postcalendar_js.pot
/templates/user/ical.tpl:
--------------------------------------------------------------------------------
1 | {$icalendarData}
2 |
--------------------------------------------------------------------------------
/images/add.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/add.gif
--------------------------------------------------------------------------------
/images/day.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/day.gif
--------------------------------------------------------------------------------
/images/new.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/new.gif
--------------------------------------------------------------------------------
/images/admin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/admin.png
--------------------------------------------------------------------------------
/images/feed.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/feed.gif
--------------------------------------------------------------------------------
/images/ical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/ical.png
--------------------------------------------------------------------------------
/images/list.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/list.gif
--------------------------------------------------------------------------------
/images/lock.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/lock.gif
--------------------------------------------------------------------------------
/images/month.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/month.gif
--------------------------------------------------------------------------------
/images/today.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/today.gif
--------------------------------------------------------------------------------
/images/week.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/week.gif
--------------------------------------------------------------------------------
/images/year.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/year.gif
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # /
2 | .git_externals
3 | /nbproject
4 | /.project
5 | /.settings
6 | /.buildpath
--------------------------------------------------------------------------------
/images/add_on.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/add_on.gif
--------------------------------------------------------------------------------
/images/calblank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/calblank.gif
--------------------------------------------------------------------------------
/images/day_on.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/day_on.gif
--------------------------------------------------------------------------------
/images/list_on.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/list_on.gif
--------------------------------------------------------------------------------
/images/month_on.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/month_on.gif
--------------------------------------------------------------------------------
/images/repeat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/repeat.png
--------------------------------------------------------------------------------
/images/search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/search.gif
--------------------------------------------------------------------------------
/images/week_on.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/week_on.gif
--------------------------------------------------------------------------------
/images/year_on.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/year_on.gif
--------------------------------------------------------------------------------
/images/exceptions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/exceptions.png
--------------------------------------------------------------------------------
/images/icon-calendar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/icon-calendar.jpg
--------------------------------------------------------------------------------
/images/smallcalicon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craigh/PostCalendar/HEAD/images/smallcalicon.jpg
--------------------------------------------------------------------------------
/docs/en/User/userdocs.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 User Documentation
2 |
3 | Welcome to PostCalendar!
4 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 | $baseDir . '/lib/',
10 | );
11 |
--------------------------------------------------------------------------------
/templates/hooks/delete.tpl:
--------------------------------------------------------------------------------
1 |
{gt text="Deleting this item will also delete associated"} {gt text="PostCalendar Event"} #{$eid}
--------------------------------------------------------------------------------
/templates/hooks/view.tpl:
--------------------------------------------------------------------------------
1 | {img modname='PostCalendar' src='smallcalicon.jpg' __alt="PostCalendar" __title="PostCalendar"} {gt text="PostCalendar Event"} #{$eid}
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/ChangeLog:
--------------------------------------------------------------------------------
1 | 2.0.0-stable (2012-08-08)
2 | * VObject is now a separate project from SabreDAV. See the SabreDAV
3 | changelog for version information before 2.0.
4 | * New: VObject library now uses PHP 5.3 namespaces.
5 | * New: It's possible to specify lists of parameters when constructing
6 | properties.
7 | * New: made it easier to construct the FreeBusyGenerator.
8 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/Issue153Test.php:
--------------------------------------------------------------------------------
1 | assertEquals('Test Benutzer', (string)$obj->fn);
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/templates/blocks/calendarlinks.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "craigh/postcalendar-module",
3 | "description": "PostCalendar is a calendar module for the Zikula Application Framework",
4 | "type": "zikula-module",
5 | "license": "GPL-2.0+",
6 | "authors": [
7 | {
8 | "name": "Craig Heydenburg",
9 | "role": "owner"
10 | }
11 | ],
12 | "require": {
13 | "php": ">5.3.3"
14 | }
15 | }
--------------------------------------------------------------------------------
/javascript/postcalendar-admin-modifyconfig.js:
--------------------------------------------------------------------------------
1 | // hide or show custom dateFormat fields
2 | jQuery(document).ready(function(){
3 | jQuery('#pcEventDateFormat').change(function(){
4 | if (jQuery('#pcEventDateFormat').attr('value') == "-1") {
5 | jQuery('#manuallySetDateFormats').show("slow");
6 | } else {
7 | jQuery('#manuallySetDateFormats').hide("slow");
8 | }
9 | });
10 | });
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/VersionTest.php:
--------------------------------------------------------------------------------
1 | assertEquals(-1, version_compare('0.9.0',$v));
11 |
12 | $s = Version::STABILITY;
13 | $this->assertTrue($s == 'alpha' || $s == 'beta' || $s =='stable');
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/lib/Sabre/VObject/Element.php:
--------------------------------------------------------------------------------
1 |
8 |
9 | Sabre/
10 |
11 |
12 |
13 |
14 | ../lib/
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/en/Admin/MenuConfig.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Menu Configuration
2 |
3 | Link to PostCalendar by entering {PostCalendar:user:display} in a menu block.
4 |
5 | Go to your Block administration and edit/create the Menu block to hold your link to PostCalendar.
6 |
7 | The Menu Block editing screen should look something like this:
8 |
9 | Name | URL | Title
10 | -------------|-----------------------------|------------
11 | PostCalendar | {PostCalendar:user:display} | My Calendar
--------------------------------------------------------------------------------
/templates/contenttype/postcalevent_edit.tpl:
--------------------------------------------------------------------------------
1 |
2 | {formlabel for='eid' __text='PostCalendar Event ID'}
3 | {formtextinput id='eid' group='data' maxLength=10 mandatory=true}
4 |
5 |
6 | {formlabel for='showcountdown' __text='Display daily countdown to event'}
7 | {formcheckbox id='showcountdown' group='data'}
8 |
9 |
10 | {formlabel for='hideonexpire' __text='Hide event on expiration'}
11 | {formcheckbox id='hideonexpire' group='data'}
12 |
13 |
--------------------------------------------------------------------------------
/templates/email/adminnotify.tpl:
--------------------------------------------------------------------------------
1 | {gt text="Notice: PostCalendar submission/change"}
2 |
3 | {if $is_update eq true}
4 | {gt text="The following calendar event has been changed:"}
5 | {else}
6 | {gt text="The following calendar event has been added:"}
7 | {/if}
8 |
9 | {gt text="Event"} #{$eid}
10 |
11 | {gt text="A Message from your PostCalendar"} {$modversion}
12 | @ {$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}
13 | {gt text="from"} {$smarty.server.SERVER_NAME}
14 |
--------------------------------------------------------------------------------
/TODO.txt:
--------------------------------------------------------------------------------
1 | TODO LIST
2 | -
3 |
4 | Post 8.0:
5 | - change to jQuery-UI 1.9 tooltips
6 | - add perm check to all navlinks to avoid spiders?
7 | - make submit form an object
8 | - Needles are still a guess
9 | - should MultiHook support be removed?
10 |
11 | IDEAS:
12 | - make a navigation sideblock
13 | - add open graph stuff?
14 | - use timepicker in Event defaults?
15 | - eliminate YYYY-MM-DD and replace with YYYYMMDD ?
16 | - Agenda viewtype?
17 | - add right-click context menu for edit/delete event from multi-day views?
18 | - draggable behavior for changing event dates?
--------------------------------------------------------------------------------
/templates/event/deleteeventconfirm.tpl:
--------------------------------------------------------------------------------
1 | {gt text="Delete event"}
2 | {form}
3 |
4 | {$loaded_event.title} ({$loaded_event.eventStart|pc_date_format:$modvars.PostCalendar.pcDateFormats.date})
5 |
6 | {notifydisplayhooks eventname='postcalendar.ui_hooks.events.ui_delete' id=$loaded_event.eid}
7 | {gt text="Do you really want to delete this event?"}
8 | {formbutton commandName="delete" __text="Delete"}{* could include in formbutton call __confirmMessage="Delete" *}
9 | {formbutton commandName="cancel" __text="CANCEL"}
10 | {/form}
--------------------------------------------------------------------------------
/docs/en/Admin/Licensing_Usage.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Licensing & Usage
2 |
3 | #### License
4 |
5 | PostCalendar is licensed under the GNU GENERAL PUBLIC LICENSE (Version 2). This
6 | means that the code is *Open Source* and you are free to use it at no financial
7 | cost as well as free to change it in any way you see fit.
8 |
9 | #### Usage
10 |
11 | You are not required, but if you see fit it would be *very kind* of you to donate
12 | to the PostCalendar project!
13 |
14 | If you are using PostCalendar in a commercial situation, a donation is strongly
15 | suggested. Please contact craigh@mac.com.
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/ParameterTest.php:
--------------------------------------------------------------------------------
1 | assertEquals('NAME',$param->name);
11 | $this->assertEquals('value',$param->value);
12 |
13 | }
14 |
15 | function testCastToString() {
16 |
17 | $param = new Parameter('name','value');
18 | $this->assertEquals('value',$param->__toString());
19 | $this->assertEquals('value',(string)$param);
20 |
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/lib/Sabre/VObject/Version.php:
--------------------------------------------------------------------------------
1 | =1.3.5 <1.5"
14 | },
15 | "composerpath": "composer.json",
16 | "description": "PostCalendar is a calendar module for the Zikula Application Framework",
17 | "urls": {
18 | "issues": "https://github.com/craigh/PostCalendar/issues"
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/ElementListTest.php:
--------------------------------------------------------------------------------
1 | $subcomponent) {
21 |
22 | $count++;
23 | $this->assertInstanceOf('Sabre\\VObject\\Component',$subcomponent);
24 |
25 | }
26 | $this->assertEquals(3,$count);
27 | $this->assertEquals(2,$key);
28 |
29 | }
30 |
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/templates/blocks/featuredevent_modify.tpl:
--------------------------------------------------------------------------------
1 |
2 | {gt text="Event ID (eid)"}
3 |
4 |
5 |
6 | {gt text="Show countdown (days)"}
7 |
8 |
9 |
10 | {gt text="Hide block when countdown expires"}
11 |
12 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Day.php:
--------------------------------------------------------------------------------
1 | viewtype = 'day';
21 | $this->imageTitleText = $this->view->__('Day View');
22 | $this->displayText = $this->view->__('Day');
23 | $this->displayImageOn = 'day_on.gif';
24 | $this->displayImageOff = 'day.gif';
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/List.php:
--------------------------------------------------------------------------------
1 | viewtype = 'list';
21 | $this->imageTitleText = $this->view->__('List View');
22 | $this->displayText = $this->view->__('List');
23 | $this->displayImageOn = 'list_on.gif';
24 | $this->displayImageOff = 'list.gif';
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Week.php:
--------------------------------------------------------------------------------
1 | viewtype = 'week';
21 | $this->imageTitleText = $this->view->__('Week View');
22 | $this->displayText = $this->view->__('Week');
23 | $this->displayImageOn = 'week_on.gif';
24 | $this->displayImageOff = 'week.gif';
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Year.php:
--------------------------------------------------------------------------------
1 | viewtype = 'year';
21 | $this->imageTitleText = $this->view->__('Year View');
22 | $this->displayText = $this->view->__('Year');
23 | $this->displayImageOn = 'year_on.gif';
24 | $this->displayImageOff = 'year.gif';
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Month.php:
--------------------------------------------------------------------------------
1 | viewtype = 'month';
21 | $this->imageTitleText = $this->view->__('Month View');
22 | $this->displayText = $this->view->__('Month');
23 | $this->displayImageOn = 'month_on.gif';
24 | $this->displayImageOff = 'month.gif';
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/Issue154Test.php:
--------------------------------------------------------------------------------
1 | VERSION = '3.0';
11 | $vcard->PHOTO = base64_encode('random_stuff');
12 | $vcard->PHOTO->add('BASE64',null);
13 | $vcard->UID = 'foo-bar';
14 |
15 | $result = $vcard->serialize();
16 | $expected = array(
17 | "BEGIN:VCARD",
18 | "VERSION:3.0",
19 | "PHOTO;BASE64:" . base64_encode('random_stuff'),
20 | "UID:foo-bar",
21 | "END:VCARD",
22 | "",
23 | );
24 |
25 | $this->assertEquals(implode("\r\n", $expected), $result);
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/templates/plugins/function.pc_implode.php:
--------------------------------------------------------------------------------
1 | assign($args['assign'], $valueList);
20 | } else {
21 | return $valueList;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/templates/user/xml.tpl:
--------------------------------------------------------------------------------
1 | {pc_sort_events var="S_EVENTS" sort="time" order="asc" value=$eventsByDate}
2 | {foreach name='dates' item='events' key='date' from=$S_EVENTS}
3 | {*pc_sort_events var="S_EVENTS" sort="time" order="asc" value=$eventsByDate*}
4 | {if ((isset($S_EVENTS.$date)) && (count($S_EVENTS.$date) gt 0))}
5 | {foreach name='events' item='event' from=$S_EVENTS.$date}
6 | -
7 |
{$date|pc_date_format} : {$event.title|strip_tags} ({$event.catname})
8 | {modurl modname='PostCalendar' type='user' func='display' viewtype='event' eid=$event.eid fqurl=true}
9 | {if $event.alldayevent != true}{$event.startTime} - {$event.endTime}{else}{gt text='All-day event'}{/if} {$event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|strip_tags}
10 |
11 | {/foreach}
12 | {/if}
13 | {/foreach}
--------------------------------------------------------------------------------
/locale/module_postcalendar_js.pot:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: Zikula 1.x\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2012-12-30 17:45-0500\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 |
19 | #: templates/plugins/function.pc_pagejs_init.php:20
20 | msgid "PostCalendar Event"
21 | msgstr ""
22 |
23 | #: templates/plugins/function.pc_pagejs_init.php:92
24 | msgid "Select an iCal feed"
25 | msgstr ""
26 |
--------------------------------------------------------------------------------
/docs/en/Admin/PersonalCalendars.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Personal Calendars
2 |
3 | PostCalendar allows the administrator to define one Zikula group that is allowed
4 | to have personal calendars. First, use the Group manager to create a group and add
5 | whomever you wish to that group. Then select that group in the PostCalendar settings
6 | admin panel. If you wish, you can use pre-existing groups like 'Admins' or 'Users'
7 | (use of Users is discouraged). One can also select 'no group' which disables this
8 | feature for everyone.
9 |
10 | If you choose a group other than 'no group', an additional selectbox will be added
11 | to the PostCalendar header that will allow the users in that group to choose to
12 | filter their display by event type. In addition, admins (only) will be able to select
13 | any user with personal events and view those events.
14 |
15 | Private events are indicated by a 'lock' icon in the user-display.
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sabre/vobject",
3 | "description" : "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
4 | "keywords" : [ "VObject", "iCalendar", "vCard" ],
5 | "homepage" : "https://github.com/evert/sabre-vobject",
6 | "license" : "BSD-3-Clause",
7 | "require" : {
8 | "php" : ">=5.3.1"
9 | },
10 | "authors" : [
11 | {
12 | "name" : "Evert Pot",
13 | "email" : "evert@rooftopsolutions.nl",
14 | "homepage" : "http://www.rooftopsolutions.nl/",
15 | "role" : "Developer"
16 | }
17 | ],
18 | "support" : {
19 | "forum" : "https://groups.google.com/group/sabredav-discuss",
20 | "source" : "https://github.com/evert/sabre-vobject"
21 | },
22 | "autoload" : {
23 | "psr-0" : {
24 | "Sabre\\VObject" : "lib/"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/templates/contenttype/postcalevents_edit.tpl:
--------------------------------------------------------------------------------
1 |
17 |
18 | {formlabel for='pcbeventslimit' __text='Number of events to display'}
19 | {formtextinput id='pcbeventslimit' group='data' maxLength=64 mandatory=true}
20 |
21 |
22 | {formlabel for='pcbeventsrange' __text='Number of months ahead to query for upcoming events'}
23 | {formtextinput id='pcbeventsrange' group='data' maxLength=64 mandatory=true}
24 |
--------------------------------------------------------------------------------
/templates/user/footer.tpl:
--------------------------------------------------------------------------------
1 | {if ((!empty($smarty.get.viewtype) && (($smarty.get.viewtype != 'year') && ($smarty.get.viewtype != 'event')))
2 | || (empty($smarty.get.viewtype) && ($modvars.PostCalendar.pcDefaultView != 'year')))}
3 |
4 |
{gt text='View category legend'}
5 |
6 |
{gt text='Categories'}
7 |
8 | {foreach from=$pcCategories key='regname' item='categories'}
9 | {foreach from=$categories item='category'}
10 | {$category.display_name.$lang}
11 | {/foreach}
12 | {/foreach}
13 |
14 |
15 |
16 | {/if}
17 |
--------------------------------------------------------------------------------
/templates/event/filtercats.tpl:
--------------------------------------------------------------------------------
1 | {nocache}
2 | {gt text="All These Categories" assign="allText"}
3 | {foreach from=$catregistry key='property' item='category'}
4 | {selector_category
5 | editLink=0
6 | category=$category
7 | name="filtercats[$property]"
8 | field="id"
9 | selectedValue=$selectedcategories
10 | defaultValue="0"
11 | all=1
12 | allText=$allText
13 | allValue=0}
14 | {img modname="core" src="edit_add.png" set="icons/extrasmall" __alt="Select Multiple" __title="Select Multiple"}
15 |
24 | {/foreach}
25 | {/nocache}
26 |
--------------------------------------------------------------------------------
/templates/blocks/pastevents_modify.tpl:
--------------------------------------------------------------------------------
1 |
2 | {gt text='Only display events in category(s)'}
3 | {gt text="All Categories" assign="allText"}
4 | {nocache}
5 | {foreach from=$catregistry key='property' item='category'}
6 | {array_field assign="selectedValue" array=$vars.pcbfiltercats field=$property}
7 | {selector_category
8 | editLink=false
9 | category=$category
10 | name="pcbfiltercats[$property]"
11 | field="id"
12 | selectedValue=$selectedValue
13 | defaultValue="0"
14 | all=1
15 | allText=$allText
16 | allValue=0
17 | multipleSize=6}
18 | {/foreach}
19 |
20 | {/nocache}
21 |
22 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Search.php:
--------------------------------------------------------------------------------
1 | viewtype = $this->view->getRequest()->request->get('viewtype', $this->view->getRequest()->query->get('viewtype', $this->defaultViewtype));
21 | $this->imageTitleText = $this->view->__('Search');
22 | $this->displayText = $this->view->__('Search');
23 | $this->displayImageOn = 'search.gif';
24 | $this->displayImageOff = 'search.gif';
25 | }
26 |
27 | /**
28 | * Set the Zikula_ModUrl
29 | */
30 | protected function setUrl()
31 | {
32 | $this->url = new Zikula_ModUrl('Search', 'user', 'main', ZLanguage::getLanguageCode());
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/Entity/EventCategory.php:
--------------------------------------------------------------------------------
1 | entity;
32 | }
33 |
34 | public function setEntity($entity)
35 | {
36 | $this->entity = $entity;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/templates/user/event.tpl:
--------------------------------------------------------------------------------
1 | {formutil_getpassedvalue name="theme" source="get" assign="theme" default=false}
2 | {assign var="PRINT_VIEW" value=0}
3 | {if $theme eq "Printer"}
4 | {* page presented in printer theme *}
5 | {assign var="PRINT_VIEW" value=1}
6 | {/if}
7 | {if $PRINT_VIEW eq false}
8 | {$navBar}
9 | {/if}
10 |
11 | {include file="event/view.tpl"}
12 |
13 | {if $PRINT_VIEW eq true}
14 |
15 | {assign var="viewtype" value=$smarty.get.viewtype}
16 | {if ((empty($smarty.get.viewtype)) or (!isset($smarty.get.viewtype)))}
17 | {assign var="viewtype" value=$modvars.PostCalendar.pcDefaultView}
18 | {/if}
19 | {formutil_getpassedvalue name="date" source="get" assign="date" default=''}
20 |
{gt text='Return'}
21 |
22 | {/if}
23 | {modurl modname='PostCalendar' type='user' func='display' viewtype='event' eid=$loaded_event.eid assign='returnurl'}
24 | {notifydisplayhooks eventname='postcalendar.ui_hooks.events.ui_view' id=$loaded_event.eid}
25 | {include file="user/footer.tpl"}
--------------------------------------------------------------------------------
/templates/plugins/modifier.pc_date_format.php:
--------------------------------------------------------------------------------
1 | format($format));
28 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/RecurrenceIteratorFifthTuesdayProblemTest.php:
--------------------------------------------------------------------------------
1 | VEVENT->UID);
33 |
34 | while($it->valid()) {
35 | $it->next();
36 | }
37 |
38 | // If we got here, it means we were successful. The bug that was in teh
39 | // system before would fail on the 5th tuesday of the month, if the 5th
40 | // tuesday did not exist.
41 |
42 | }
43 |
44 | }
45 |
46 | ?>
47 |
--------------------------------------------------------------------------------
/templates/admin/eventrevue.tpl:
--------------------------------------------------------------------------------
1 | {adminheader}
2 |
3 | {icon type="view" size="small"}
4 |
{gt text='Event review'}
5 |
6 | {gt text="view" assign='view'}
7 | {if ($actiontext != $view)}
8 |
25 | {/if}
26 | {adminfooter}
--------------------------------------------------------------------------------
/docs/en/Admin/Permissions.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Permissions settings
2 |
3 | As of version 7 (and 6.2), PostCalendar supports _category-based_ permissions and
4 | _event-based_ permissions.
5 |
6 | In order to deny access to unregistered users to a particular event, you can use
7 | a permission setting like so:
8 |
9 | `Unregistered | PostCalendar::Event | :: | No access`
10 |
11 | *example:*
12 |
13 | `Unregistered | PostCalendar::Event | My Birthday::247 | No access`
14 |
15 | In order to deny access to unregistered users to all events in a certain category,
16 | you can use a permission setting like so:
17 |
18 | `Unregistered | Categories::Category | :: | No access`
19 |
20 | *example:*
21 |
22 | `Unregistered | Categories::Category | 93:: | No access`
23 |
24 | In order to allow all registered users to submit event, you can use a permission
25 | setting like so:
26 |
27 | `Users| PostCalendar:: | .* | Add access`
28 |
29 | You can restrict this to less users by choosing a different group.
30 |
31 | In order to allow a subgroup to administrate PostCalendar events, you can use a
32 | permission setting like so:
33 |
34 | `CalendarAdmins | PostCalendar:: | .* | Delete access`
35 |
36 | Be sure to define the group and assign members as appropriate.
37 |
38 | *Remember that the _order_ in which your permission
39 | settings occur (bottom to top) is _crucial_! *
--------------------------------------------------------------------------------
/docs/en/Admin/Customization.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Customization: Overriding PostCalendar Templates and Stylesheets
2 |
3 | ### Overriding Stylesheets (css)
4 |
5 | This is the easiest and most quickly beneficial customization you can make to your
6 | installation of PostCalendar. If the only thing you want to change is colors, this
7 | is all you need to do. You do need to understand css a little. The colors are clearly
8 | labeled in the stylesheet.
9 |
10 | * Create a directory in your theme `themes//style/PostCalendar/`
11 | * Copy `modules/PostCalendar/style/style.css` to `themes//style/PostCalendar/style.css`
12 |
13 | Now, you can modify the PostCalendar stylesheet in your theme all you like.
14 | ([make sure your changes will be seen immediately][link1])
15 |
16 | ### Overriding Templates
17 |
18 | This is a bit more complicated and will require a working knowledge of Smarty and
19 | HTML. In order to override a template, you must make an entry in your
20 | `config/tempalte_overrides.yml` file and then put a copy in that location and
21 | modify your copy.
22 |
23 | ### Warning
24 |
25 | When you upgrade PostCalendar, you have to remember to remove your overrides and
26 | then check them to see if they are still valid before using them with a new version.
27 |
28 | [link1]:
29 | "Zikula.org Wiki Docs"
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/vendor/composer/autoload_real.php:
--------------------------------------------------------------------------------
1 | $path) {
31 | $loader->add($namespace, $path);
32 | }
33 |
34 | $classMap = require __DIR__ . '/autoload_classmap.php';
35 | if ($classMap) {
36 | $loader->addClassMap($classMap);
37 | }
38 |
39 | $loader->register();
40 |
41 | return $loader;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/EmClientTest.php:
--------------------------------------------------------------------------------
1 | VEVENT->DTSTART->getDateTime();
50 | $this->assertEquals(new \DateTime('2011-10-08 19:30:00', new \DateTimeZone('America/Chicago')), $dt);
51 |
52 | }
53 |
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/lib/PostCalendar/Api/Account.php:
--------------------------------------------------------------------------------
1 | ModUtil::url('PostCalendar', 'event', 'create'),
26 | 'title' => $this->__('Submit Event'),
27 | 'icon' => 'admin.png');
28 | }
29 | if (SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_DELETE)) {
30 | $items['2'] = array(
31 | 'url' => ModUtil::url('PostCalendar', 'admin', 'listqueued'),
32 | 'title' => $this->__('Administrate Events'),
33 | 'icon' => 'admin.png');
34 | }
35 | // Return the items
36 | return $items;
37 | }
38 | } // end class def
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/lib/Sabre/VObject/Component/VJournal.php:
--------------------------------------------------------------------------------
1 | DTSTART)?$this->DTSTART->getDateTime():null;
32 | if ($dtstart) {
33 | $effectiveEnd = clone $dtstart;
34 | if ($this->DTSTART->getDateType() == VObject\Property\DateTime::DATE) {
35 | $effectiveEnd->modify('+1 day');
36 | }
37 |
38 | return ($start <= $effectiveEnd && $end > $dtstart);
39 |
40 | }
41 | return false;
42 |
43 |
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/templates/blocks/pastevents.tpl:
--------------------------------------------------------------------------------
1 | {pc_queued_events_notify}
2 | {pc_pagejs_init}
3 |
4 | {counter start=0 assign=eventcount}
5 | {pc_sort_events var="S_EVENTS" sort="time" order="desc" value=$eventsByDate}
6 | {foreach name='dates' item='events' key='date' from=$S_EVENTS}
7 | {foreach name='eventloop' key='id' item='event' from=$events}
8 | {if $event.alldayevent != true}
9 | {assign var="timestamp" value=$event.startTime}
10 | {else}
11 | {assign var="timestamp" value=""}
12 | {/if}
13 |
14 | {if $smarty.foreach.eventloop.iteration eq 1}
15 |
16 | {$date|pc_date_format}
17 |
18 | {/if}
19 |
20 | {gt text='private event' assign='p_txt'}
21 | {if $event.privateicon}{img src='lock.gif' modname='PostCalendar' title=$p_txt alt=$p_txt}{/if}
22 | {pc_url full=true class="eventlink" action="event" eid=$event.eid date=$date title=$event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|strip_tags|safehtml display="$timestamp `$event.title`"|strip_tags}
23 | {if $event.alldayevent != true} ({gt text='until'} {$event.endTime}){/if}
24 |
25 |
26 | {counter}
27 | {/foreach}
28 | {/foreach}
29 |
30 | {if $eventcount == 0}
31 | {gt text='No past events.'}
32 | {/if}
33 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/Component/VJournalTest.php:
--------------------------------------------------------------------------------
1 | assertEquals($outcome, $vtodo->isInTimeRange($start, $end));
15 |
16 | }
17 |
18 | public function timeRangeTestData() {
19 |
20 | $tests = array();
21 |
22 | $vjournal = Component::create('VJOURNAL');
23 | $vjournal->DTSTART = '20111223T120000Z';
24 | $tests[] = array($vjournal, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
25 | $tests[] = array($vjournal, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
26 |
27 | $vjournal2 = Component::create('VJOURNAL');
28 | $vjournal2->DTSTART = '20111223';
29 | $vjournal2->DTSTART['VALUE'] = 'DATE';
30 | $tests[] = array($vjournal2, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
31 | $tests[] = array($vjournal2, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
32 |
33 | $vjournal3 = Component::create('VJOURNAL');
34 | $tests[] = array($vjournal3, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), false);
35 | $tests[] = array($vjournal3, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
36 |
37 | return $tests;
38 | }
39 |
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Xml.php:
--------------------------------------------------------------------------------
1 | template = 'user/xml.tpl';
21 | }
22 |
23 | /**
24 | * Setup the view
25 | */
26 | protected function setup()
27 | {
28 | $this->viewtype = 'xml';
29 | $this->listMonths = ModUtil::getVar('PostCalendar', 'pcListMonths');
30 | }
31 |
32 | /**
33 | * Render the view
34 | * @return string
35 | */
36 | public function render()
37 | {
38 | if (!$this->isCached()) {
39 | // Load the events
40 | $eventsByDate = ModUtil::apiFunc('PostCalendar', 'event', 'getEvents', array(
41 | 'start' => $this->startDate,
42 | 'end' => $this->endDate,
43 | 'filtercats' => $this->selectedCategories,
44 | 'date' => $this->requestedDate,
45 | 'userfilter' => $this->userFilter));
46 | // create and return template
47 | $this->view
48 | ->assign('eventsByDate', $eventsByDate);
49 | }
50 | return $this->view->fetch($this->template);
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/templates/plugins/function.pc_allowedhtml.php:
--------------------------------------------------------------------------------
1 | {allowedhtml}
26 | *
27 | * @param array $params All attributes passed to this function from the template.
28 | * @param Smarty &$smarty Reference to the {@link Zikula_View} object.
29 | *
30 | * @return string A string containing the allowable HTML tags.
31 | */
32 | function smarty_function_pc_allowedhtml($params, Zikula_View $view)
33 | {
34 | $AllowableHTML = System::getVar('AllowableHTML');
35 | $allowedhtml = '';
36 | foreach ($AllowableHTML as $key => $access) {
37 | if ($access > 0) {
38 | $allowedhtml .= '<' . htmlspecialchars($key) . '> ';
39 | }
40 | }
41 |
42 | if (isset($params['assign'])) {
43 | $view->assign($params['assign'], $allowedhtml);
44 | } else {
45 | return $allowedhtml;
46 | }
47 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2007-2012 Rooftop Solutions.
2 |
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 | * Neither the name of the Sabre nor the names of its contributors
14 | may be used to endorse or promote products derived from this software
15 | without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 | POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/lib/PostCalendar/PostCalendarEvent/Generic.php:
--------------------------------------------------------------------------------
1 | setTitle(__f('New %1$s item (#%2$s)', array($this->getEvent()->getHooked_modulename(), $this->getEvent()->getHooked_objectid()), $dom));
28 | $text = ":html:" . __f('New %1$s item (#%2$s)', array($this->getEvent()->getHooked_modulename(), $this->getEvent()->getHooked_objectid()), $dom);
29 | $url = DataUtil::formatForDisplayHTML($this->getHook()->getUrl()->getUrl());
30 | $text .= isset($url) ? "(" . __("Item link", $dom) . " )" : "(" . __("URL not provided", $dom) . ")";
31 | $this->setHometext($text);
32 | $date = new DateTime();
33 | $this->setEventStart($date); // technically unneccessary but left for demonstration purposes
34 | $this->setEventEnd($date); // technically unneccessary but left for demonstration purposes
35 | $this->setSharing(PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL);
36 |
37 | return true;
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/docs/en/Admin/Blocks.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Blocks
2 |
3 | ### Calendar
4 |
5 | This is the main Calendar block for PostCalendar. This can display any or all of
6 | three main elements:
7 |
8 | 1. Small 'month view' navigation calendar
9 | 2. Today's events
10 | 3. Upcoming events
11 |
12 | One can also limit the display to one category by selecting it in the block administration.
13 | Select 'all categories' to not limit the display.
14 |
15 | One can choose to hide the "Today's Events" portion of the block if there are no
16 | events for today.
17 |
18 | Optionally display a submit and search link in the block and modify the amount of
19 | events to display in the upcoming events area.
20 |
21 | The block becomes more useful if the 'popup' or 'hover' options are selected in
22 | the admin settings.
23 |
24 | ### Featured Event
25 |
26 | The featured event block allows a site admin to call attention to a specific event
27 | in a block. The block requires the event ID to function. In addition, one can optionally
28 | display a daily countdown to that event and also optionally hide the block when
29 | the event 'expires'. *note: the block is not deleted it is simply hidden.* An admin-only
30 | notice will be displayed if a featured event block has been hidden.
31 |
32 | ### Past Events
33 |
34 | The past events block is useful as an archive of events as they have already passed.
35 | This is especially useful if you are using PostCalendar in *hooks mode* to archive
36 | your News stories or User registrations.
37 |
38 | Similar to the Upcoming Events block, one can filter the block to display only events
39 | in a certain Category (e.g. News). One can also limit the number of months into
40 | the past that events are displayed.
--------------------------------------------------------------------------------
/templates/plugins/function.pc_queued_events_notify.php:
--------------------------------------------------------------------------------
1 | getRepository('PostCalendar_Entity_CalendarEvent')->getEventCount(PostCalendar_Entity_CalendarEvent::QUEUED);
23 |
24 | if (empty($count) || ($count < 1)) {
25 | return;
26 | }
27 |
28 | $dom = ZLanguage::getModuleDomain('PostCalendar');
29 | $url = ModUtil::url('PostCalendar', 'admin', 'listqueued');
30 |
31 | $text = _fn('There is %s queued calendar event awaiting your review.', 'There are %s queued calendar events awaiting your review.', $count, $count, $dom);
32 | $linktext = __(/*!This is link text*/'Review queued events', $dom);
33 |
34 | $alert = "";
35 |
36 | if (isset($assign)) {
37 | $view->assign($assign, $count);
38 | } else {
39 | return $alert;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/templates/hooks/edit.tpl:
--------------------------------------------------------------------------------
1 | {if $postcalendar_hide}
2 |
3 |
4 | {else}
5 |
6 | {gt text='Associated PostCalendar event' domain="module_postcalendar"}
7 | {if $postcalendar_optoverride}
8 |
9 | {gt text="Create associated PostCalendar event (opt in)" domain="module_postcalendar"}
10 |
11 |
12 | {else}
13 |
14 | {/if}
15 | {if isset($postcalendar_catregistry)}
16 |
17 | {gt text="Assign to PostCalendar categories:" domain="module_postcalendar"}
18 | {nocache}
19 | {foreach from=$postcalendar_catregistry key='property' item='category'}
20 | {array_field assign="selectedValue" array=$postcalendar_selectedcategories field=$property}
21 | {selector_category
22 | editLink=false
23 | category=$category
24 | name="postcalendar[cats][$property]"
25 | field="id"
26 | selectedValue=$selectedValue}
27 | {/foreach}
28 | {/nocache}
29 |
30 | {else}
31 |
32 | {/if}
33 |
34 |
35 | {/if}
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Create.php:
--------------------------------------------------------------------------------
1 | viewtype = null;
21 | $this->imageTitleText = $this->view->__('Submit New Event');
22 | $this->displayText = $this->view->__('Add');
23 | $this->displayImageOn = 'add_on.gif';
24 | $this->displayImageOff = 'add.gif';
25 | }
26 |
27 | /**
28 | * Set the Zikula_ModUrl
29 | */
30 | protected function setUrl()
31 | {
32 | $this->url = new Zikula_ModUrl('PostCalendar', 'event', 'create', ZLanguage::getLanguageCode(), array(
33 | 'date' => $this->date->format('Ymd')));
34 | }
35 |
36 | /**
37 | * Set the anchortag
38 | */
39 | protected function setAnchorTag()
40 | {
41 | if (SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_ADD)) {
42 | parent::setAnchorTag();
43 | } else {
44 | $this->anchorTag = null;
45 | }
46 | }
47 |
48 | /**
49 | * Set the radio input
50 | */
51 | protected function setRadio()
52 | {
53 | if (SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_ADD)) {
54 | parent::setRadio();
55 | } else {
56 | $this->radio = null;
57 | }
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/Handlers.php:
--------------------------------------------------------------------------------
1 | getRepository('PostCalendar_Entity_CalendarEvent')->getEventCount(PostCalendar_Entity_CalendarEvent::QUEUED);
29 | if ($count > 0) {
30 | $collection = new Zikula_Collection_Container('PostCalendar');
31 | $collection->add(new Zikula_Provider_AggregateItem('submission', _n('Calendar event', 'Calendar events', $count, $dom), $count, 'admin', 'listevents'));
32 | $event->getSubject()->add($collection);
33 | }
34 | }
35 | }
36 |
37 | /**
38 | * Event handler to provide Content module ContentTypes
39 | * @param Zikula_Event $event
40 | */
41 | public static function getTypes(Zikula_Event $event)
42 | {
43 | $types = $event->getSubject();
44 | $types->add('PostCalendar_ContentType_PostCalEvent');
45 | $types->add('PostCalendar_ContentType_PostCalEvents');
46 | }
47 |
48 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Today.php:
--------------------------------------------------------------------------------
1 | viewtype = $this->view->getRequest()->request->get('viewtype', $this->view->getRequest()->query->get('viewtype', $this->defaultViewtype));
21 | $this->imageTitleText = $this->view->__('Jump to Today');
22 | $this->displayText = $this->view->__('Today');
23 | $this->displayImageOn = 'today.gif';
24 | $this->displayImageOff = 'today.gif';
25 | }
26 |
27 | /**
28 | * Set the anchortag
29 | */
30 | protected function setAnchorTag()
31 | {
32 | if (($this->date <> $this->today) && ($this->viewtype <> 'event')) {
33 | $this->date = clone $this->today;
34 | parent::setUrl(); // reset with new date
35 | parent::setAnchorTag();
36 | } else {
37 | $this->anchorTag = null;
38 | }
39 | }
40 |
41 | /**
42 | * Set the radio input
43 | */
44 | protected function setRadio()
45 | {
46 | if (($this->date <> $this->today) && ($this->viewtype <> 'event')) {
47 | $this->date = clone $this->today;
48 | parent::setUrl(); // reset with new date
49 | parent::setRadio();
50 | } else {
51 | $this->radio = null;
52 | }
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/templates/contenttype/postcalevents_view.tpl:
--------------------------------------------------------------------------------
1 | {pageaddvar name='stylesheet' value='modules/PostCalendar/style/style.css'}
2 | {pc_queued_events_notify}
3 | {pc_pagejs_init}
4 |
5 | {counter start=0 assign=eventcount}
6 | {pc_sort_events var="sortedEvents" sort="time" order="asc" value=$eventsByDate}
7 | {foreach name='dates' item='events' key='date' from=$sortedEvents}
8 | {foreach name='eventloop' key='id' item='event' from=$events}
9 | {if $eventcount < $displayLimit}
10 | {if $event.alldayevent != true}
11 | {assign var="timestamp" value=$event.startTime}
12 | {else}
13 | {assign var="timestamp" value=""}
14 | {/if}
15 |
16 | {if $smarty.foreach.eventloop.iteration eq 1}
17 |
18 | {$date|pc_date_format}
19 |
20 | {/if}
21 |
22 | {gt text='private event' assign='p_txt' domain='module_postcalendar'}
23 | {if $event.privateicon}{img src='lock.gif' modname='PostCalendar' title=$p_txt alt=$p_txt}{/if}
24 | {pc_url full=true class="eventlink" action="event" eid=$event.eid date=$date title=$event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|safehtml display="$timestamp `$event.title`"|strip_tags}
25 | {if $event.alldayevent != true} ({gt text='until' domain="module_postcalendar"} {$event.endTime}){/if}
26 |
27 |
28 | {/if}
29 | {counter}
30 | {/foreach}
31 | {/foreach}
32 |
33 | {if $eventcount == 0}
34 | {gt text='No upcoming events.' domain="module_postcalendar"}
35 | {/if}
36 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Admin.php:
--------------------------------------------------------------------------------
1 | viewtype = null;
21 | $this->imageTitleText = $this->view->__('Admin');
22 | $this->displayText = $this->view->__('Admin');
23 | }
24 |
25 | /**
26 | * provide the image params
27 | * @return array
28 | */
29 | protected function getImageParams()
30 | {
31 | return array(
32 | 'modname' => 'core',
33 | 'set' => 'icons/small',
34 | 'src' => 'configure.png');
35 | }
36 |
37 | /**
38 | * Set the Zikula_ModUrl
39 | */
40 | protected function setUrl()
41 | {
42 | $this->url = new Zikula_ModUrl('PostCalendar', 'admin', 'listevents', ZLanguage::getLanguageCode());
43 | }
44 |
45 | /**
46 | * Set the anchortag
47 | */
48 | protected function setAnchorTag()
49 | {
50 | if (SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_ADMIN)) {
51 | parent::setAnchorTag();
52 | } else {
53 | $this->anchorTag = null;
54 | }
55 | }
56 |
57 | /**
58 | * Set the radio input
59 | */
60 | protected function setRadio()
61 | {
62 | if (SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_ADMIN)) {
63 | parent::setRadio();
64 | } else {
65 | $this->radio = null;
66 | }
67 | }
68 |
69 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Ical.php:
--------------------------------------------------------------------------------
1 | viewtype = 'ical';
21 | $this->imageTitleText = $this->view->__('iCal Feed');
22 | $this->displayText = $this->view->__('iCal');
23 | }
24 |
25 | /**
26 | * provide the image params
27 | *
28 | * @return array
29 | */
30 | protected function getImageParams()
31 | {
32 | return array(
33 | 'modname' => 'PostCalendar',
34 | 'src' => 'ical.png',
35 | 'alt' => $this->displayText,
36 | );
37 | }
38 |
39 | /**
40 | * Set the Zikula_ModUrl
41 | */
42 | protected function setUrl()
43 | {
44 | $this->url = new Zikula_ModUrl('PostCalendar', 'user', 'display', ZLanguage::getLanguageCode());
45 | }
46 |
47 | /**
48 | * Set the anchor tag
49 | */
50 | protected function setAnchorTag()
51 | {
52 | $class = implode(' ', $this->cssClasses);
53 | $display = $this->useDisplayImage ? $this->imageHtml : $this->displayText;
54 | if ($this->navBarType == "buttonbar") {
55 | $this->anchorTag = "$display ";
56 | } else {
57 | $this->anchorTag = "$display ";
58 | }
59 | }
60 |
61 | }
--------------------------------------------------------------------------------
/templates/search/options.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 | {gt text="Calendar"}
4 | {gt text='in Categories'}:
5 | {gt text="All These Categories" assign="allText"}
6 | {nocache}
7 | {foreach from=$catregistry key='property' item='category'}
8 | {selector_category
9 | editLink=0
10 | category=$category
11 | name="modvar[PostCalendar][categories][$property]"
12 | field="id"
13 | defaultValue="0"
14 | all=1
15 | allText=$allText
16 | allValue=0}
17 | {/foreach}
18 | {/nocache}
19 | {gt text="date range:"}
20 | {gt text="from"}
21 |
22 | {gt text='last %s years' tag1='10'}
23 | {gt text='last %s years' tag1='5'}
24 | {gt text='last %s years' tag1='2'}
25 | {gt text='last year'}
26 | {gt text='now'}
27 |
28 | {gt text="to"}
29 |
30 | {gt text='now'}
31 | {gt text='next year'}
32 | {gt text='next %s years' tag1='2'}
33 | {gt text='next %s years' tag1='5'}
34 | {gt text='next %s years' tag1='10'}
35 |
36 |
--------------------------------------------------------------------------------
/docs/en/Developer/Hooks.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar Developer Documentation
2 |
3 | ### Hooks
4 |
5 | **Please note: this information applies to PostCalendar v8.0.0+ only.**
6 |
7 | PostCalendar hooks have been updated in version 8.0.0 and require a refactoring
8 | of provided plugin classes. If your module supplies a plugin, please be sure to
9 | update it as outlined here.
10 |
11 | PostCalendar provides create, update and delete hooks that can be utilized and
12 | customized by any modules that wishes to create a calendar event along with
13 | their own item creation. PostCalendar ships with an example of this
14 | technology: _News_ (and _Generic_). You can find these examples as follows:
15 |
16 | modules/PostCalendar/lib/PostCalendar/PostCalendarEvent/News.php
17 | modules/PostCalendar/lib/PostCalendar/PostCalendarEvent/Generic.php
18 |
19 | Each of these functions _could_ (and should) be located in their respective module's own
20 | directory. Create the following directory structure with your module:
21 |
22 | modules//lib//PostCalendarEvent/.php
23 |
24 | within this file, create a class which extends the base class like so:
25 |
26 | class _PostCalendarEvent_ extends PostCalendar_PostCalendarEvent_AbstractBase
27 |
28 | within that class, you must create at least the following _required_ method:
29 |
30 | public function makeEvent()
31 |
32 | Again, please see the PostCalendar module for examples.
33 |
34 | Your makeEvent method must set the following properties that will form the event:
35 |
36 | title
37 | hometext
38 | eventStart
39 | eventEnd
40 | sharing
41 |
42 | **Use the provided Setter methods to set the property values.**
43 |
44 | There are additional class properties that can be set if you wish. Please see
45 | the Base class for additional information.
46 |
47 | modules/PostCalendar/lib/PostCalendar/PostCalendarEvent/Base.php
48 |
49 |
--------------------------------------------------------------------------------
/templates/blocks/today.tpl:
--------------------------------------------------------------------------------
1 | {if !$hideTodaysEvents}
2 | {pc_pagejs_init}
3 |
4 | {if $blockVars.pcbeventoverview eq 1}
5 |
{gt text="Today's events"}
6 | {/if}
7 | {assign var="eventtotal" value=0}
8 | {assign var="eventcount" value=0}
9 |
10 |
11 | {$todayDate|pc_date_format}
12 |
13 | {foreach name='eventloop' key='id' item='event' from=$todaysEvents}
14 | {assign var="eventtotal" value=$eventtotal+1}
15 | {if $eventcount < $blockVars.pcbeventslimit}
16 | {assign var="eventcount" value=$eventcount+1}
17 | {if $event.alldayevent != true}
18 | {assign var="timestamp" value=$event.startTime}
19 | {else}
20 | {assign var="timestamp" value=""}
21 | {/if}
22 |
23 | {gt text='private event' assign='p_txt'}
24 | {if $event.privateicon}{img src='lock.gif' modname='PostCalendar' title=$p_txt alt=$p_txt}{/if}
25 | {pc_url full=true class="eventlink" action="event" eid=$event.eid date=$event.eventStart title=$event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|strip_tags|safehtml display="$timestamp `$event.title`"|strip_tags}
26 | {if $event.alldayevent != true} ({gt text='until'} {$event.endTime}){/if}
27 |
28 | {/if}
29 | {foreachelse}
30 | {assign var="eventtotal" value="0"}
31 | {gt text='No events scheduled.'}
32 | {/foreach}
33 |
34 | {if ($eventtotal > $blockVars.pcbeventslimit)}
35 |
{$eventtotal} {gt text="total events to view"}
36 | {/if}
37 |
38 | {/if}
39 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Print.php:
--------------------------------------------------------------------------------
1 | viewtype = $this->view->getRequest()->request->get('viewtype', $this->view->getRequest()->query->get('viewtype', $this->defaultViewtype));
26 | $this->eid = $this->view->getRequest()->request->get('eid', $this->view->getRequest()->query->get('eid', null));
27 | $this->imageTitleText = $this->view->__('Print View');
28 | $this->displayText = $this->view->__('Print');
29 | }
30 |
31 | /**
32 | * Provide the image params
33 | *
34 | * @return array
35 | */
36 | protected function getImageParams()
37 | {
38 | return array(
39 | 'modname' => 'core',
40 | 'set' => 'icons/small',
41 | 'src' => 'printer.png');
42 | }
43 |
44 | /**
45 | * Set the Zikula_ModUrl
46 | */
47 | protected function setUrl()
48 | {
49 | $args = array(
50 | 'viewtype' => $this->viewtype,
51 | 'userfilter' => $this->userFilter,
52 | 'theme' => 'Printer');
53 | if (($this->viewtype == 'event') && (isset($this->eid))) {
54 | $args['eid'] = $this->eid;
55 | } else {
56 | $args['date'] = $this->date->format('Ymd');
57 | }
58 | $this->url = new Zikula_ModUrl('PostCalendar', 'user', 'display', ZLanguage::getLanguageCode(), $args);
59 | }
60 |
61 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/lib/Sabre/VObject/Parameter.php:
--------------------------------------------------------------------------------
1 | name = strtoupper($name);
42 | $this->value = $value;
43 |
44 | }
45 |
46 | /**
47 | * Turns the object back into a serialized blob.
48 | *
49 | * @return string
50 | */
51 | public function serialize() {
52 |
53 | if (is_null($this->value)) {
54 | return $this->name;
55 | }
56 | $src = array(
57 | '\\',
58 | "\n",
59 | ';',
60 | ',',
61 | );
62 | $out = array(
63 | '\\\\',
64 | '\n',
65 | '\;',
66 | '\,',
67 | );
68 |
69 | return $this->name . '=' . str_replace($src, $out, $this->value);
70 |
71 | }
72 |
73 | /**
74 | * Called when this object is being cast to a string
75 | *
76 | * @return string
77 | */
78 | public function __toString() {
79 |
80 | return $this->value;
81 |
82 | }
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/templates/blocks/upcoming.tpl:
--------------------------------------------------------------------------------
1 | {pc_queued_events_notify}
2 | {pc_pagejs_init}
3 |
4 | {if (($blockVars.pcbshowcalendar eq 1) OR ($blockVars.pcbeventoverview eq 1)) }
5 |
{gt text='Upcoming events'}
6 | {/if}
7 |
8 | {counter start=0 assign='eventcount'}
9 | {pc_sort_events var="S_EVENTS" sort="time" order="asc" value=$eventsByDate}
10 | {foreach name='dates' item='events' key='date' from=$S_EVENTS}
11 | {if $date > $todayDate}
12 | {foreach name='eventloop' key='id' item='event' from=$events}
13 | {if $eventcount < $blockVars.pcbeventslimit}
14 | {if $event.alldayevent != true}
15 | {assign var="timestamp" value=$event.startTime}
16 | {else}
17 | {assign var="timestamp" value=""}
18 | {/if}
19 |
20 | {if $smarty.foreach.eventloop.iteration eq 1}
21 |
22 | {$date|pc_date_format}
23 |
24 | {/if}
25 |
26 | {gt text='private event' assign='p_txt'}
27 | {if $event.privateicon}{img src='lock.gif' modname='PostCalendar' title=$p_txt alt=$p_txt}{/if}
28 | {pc_url full=true class="eventlink" action="event" eid=$event.eid date=$date title=$event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|strip_tags|safehtml display="$timestamp `$event.title`"|strip_tags}
29 | {if $event.alldayevent != true} ({gt text='until'} {$event.endTime}){/if}
30 |
31 |
32 | {/if}
33 | {counter}
34 | {/foreach}
35 | {/if}
36 | {/foreach}
37 |
38 | {if $eventcount == 0}
39 | {gt text='No upcoming events.'}
40 | {/if}
41 |
--------------------------------------------------------------------------------
/docs/en/Admin/Requirements_Features.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Requirements & Features
2 |
3 | PostCalendar is a calendar module for Zikula with multiple views, private
4 | calendars, MultiHook needles, Content Module support and much more.
5 | PostCalendar is completely converted to the new Zikula 1.3 model (OOP).
6 |
7 | #### Software Requirements
8 |
9 | * Zikula >= 1.3.5 (or 1.3.3 with updated jquery_datepicker plugin - see below**)
10 | * php 5.3+
11 |
12 | #### Features
13 |
14 | * Multiple views (Year, Month, Week, Day, List, RSS, iCal)
15 | * 100% W3C-valid XHTML 1.1 templates - fully customizable with optional navigation images
16 | * Repeating events (including continuous events, and repeat-exceptions)
17 | * Use of jQuery to make the UI user-friendly
18 | * Categorization of events using Zikula category system
19 | * Category-based permissions allow group-based or multiple calendars
20 | * Content module support
21 | * MultiHook Needles provided (currently non-functional due to MultiHook not working)
22 | * Supports all available Core 1.3.x-based Subscriber hooks
23 | * Provides event-creation Core 1.3.x-based Provider hook
24 | * **Date/Time Formats**
25 | * Admin-definable date format for entire module
26 | * 24 or 12 hour format
27 | * Monday/Sunday/Saturday week start
28 | * Print any view using Printer theme
29 | * **Blocks**
30 | * Upcoming Events, Today's Events and calendar view blocks (optional category filter)
31 | * Featured Event block with daily countdown
32 | * Past Events
33 | * Admin notification on Event Submission, option to disable, also option to disable on admin-only submission.
34 | * Users can create private and/or global events (admin defined by Zikula group)
35 | * Events can be queued or immediately submitted (admin defined)
36 | * Events can be filtered by category or user (if personal calendar is enabled)
37 | * Hovering event information using JavaScript
38 | * Admin definable event default values
39 |
40 | **file: https://github.com/zikula/core/blob/1.3/src/lib/viewplugins/function.jquery_datepicker.php
--------------------------------------------------------------------------------
/lib/PostCalendar/ContentType/PostCalEvent.php:
--------------------------------------------------------------------------------
1 | __('PostCalendar Featured Event');
16 | }
17 | public function getDescription() {
18 | return $this->__('Displays one event from PostCalendar.');
19 | }
20 |
21 | public function loadData(&$data) {
22 | $this->eid = $data['eid'];
23 | $this->showcountdown = $data['showcountdown'];
24 | $this->hideonexpire = $data['hideonexpire'];
25 | }
26 |
27 | public function display() {
28 | if (!isset($this->eid) || $this->eid == 0) {
29 | return LogUtil::RegisterError ($this->__('PostCalendar: No event ID set.'));
30 | }
31 |
32 | $vars = array('bid' => $this->contentId,
33 | 'content' => serialize(array(
34 | 'showcountdown' => $this->showcountdown,
35 | 'hideonexpire' => $this->hideonexpire,
36 | 'eid' => $this->eid,
37 | )));
38 | $date = new DateTime();
39 | $calendarView = new PostCalendar_CalendarView_FeaturedEventBlock($this->view, $date, '', null, $vars);
40 |
41 | $this->view->assign('loaded_event', $calendarView->getEvent());
42 |
43 | return $this->view->fetch($this->getTemplate());
44 | }
45 |
46 | public function displayEditing() {
47 | return $this->__('Display featured event') . ' #' . $this->eid;
48 | }
49 |
50 | public function getDefaultData() {
51 | return array(
52 | 'eid' => 0,
53 | 'hideonexpire' => 0,
54 | 'showcountdown' => 0);
55 | }
56 |
57 | public function getSearchableText() {
58 | return; // html_entity_decode(strip_tags($this->text));
59 | }
60 |
61 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/RecurrenceIteratorInfiniteLoopProblemTest.php:
--------------------------------------------------------------------------------
1 | DTSTART = '20090420T180000Z';
18 | $ev->RRULE = 'FREQ=WEEKLY;BYDAY=MO;UNTIL=20090704T205959Z;INTERVAL=1';
19 |
20 | $this->assertFalse($ev->isInTimeRange(new DateTime('2012-01-01 12:00:00'),new DateTime('3000-01-01 00:00:00')));
21 |
22 | }
23 |
24 | /**
25 | * Different bug, also likely an infinite loop.
26 | */
27 | function testYearlyByMonthLoop() {
28 |
29 | $ev = Component::create('VEVENT');
30 | $ev->UID = 'uuid';
31 | $ev->DTSTART = '20120101T154500';
32 | $ev->DTSTART['TZID'] = 'Europe/Berlin';
33 | $ev->RRULE = 'FREQ=YEARLY;INTERVAL=1;UNTIL=20120203T225959Z;BYMONTH=2;BYSETPOS=1;BYDAY=SU,MO,TU,WE,TH,FR,SA';
34 | $ev->DTEND = '20120101T164500';
35 | $ev->DTEND['TZID'] = 'Europe/Berlin';
36 |
37 | // This recurrence rule by itself is a yearly rule that should happen
38 | // every february.
39 | //
40 | // The BYDAY part expands this to every day of the month, but the
41 | // BYSETPOS limits this to only the 1st day of the month. Very crazy
42 | // way to specify this, and could have certainly been a lot easier.
43 | $cal = Component::create('VCALENDAR');
44 | $cal->add($ev);
45 |
46 | $it = new RecurrenceIterator($cal,'uuid');
47 | $it->fastForward(new DateTime('2012-01-29 23:00:00', new DateTimeZone('UTC')));
48 |
49 | $collect = array();
50 |
51 | while($it->valid()) {
52 | $collect[] = $it->getDTSTART();
53 | if ($it->getDTSTART() > new DateTime('2013-02-05 22:59:59', new DateTimeZone('UTC'))) {
54 | break;
55 | }
56 | $it->next();
57 |
58 | }
59 |
60 | $this->assertEquals(
61 | array(new DateTime('2012-02-01 15:45:00', new DateTimeZone('Europe/Berlin'))),
62 | $collect
63 | );
64 |
65 | }
66 |
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/templates/user/day.tpl:
--------------------------------------------------------------------------------
1 | {formutil_getpassedvalue name="theme" source="get" assign="theme" default=false}
2 | {assign var="PRINT_VIEW" value=0}
3 | {if $theme eq "Printer"}
4 | {* page presented in printer theme *}
5 | {assign var="PRINT_VIEW" value=1}
6 | {/if}
7 | {if $PRINT_VIEW eq false}
8 | {$navBar}
9 | {/if}
10 |
15 |
16 |
17 |
18 | {pc_sort_events var="S_EVENTS" sort="time" order="asc" value=$eventsByDate}
19 | {foreach name='dates' item='events' key='date' from=$S_EVENTS}
20 | {if isset($events)}
21 | {foreach name='events' item='event' from=$S_EVENTS.$date}
22 |
23 | {if $event.alldayevent != true}{$event.startTime} - {$event.endTime}{else}{gt text='All-day event'}{/if}
24 | {if $event.privateicon}{img src='lock.gif' modname='PostCalendar' __title="private event" __alt="private event"}{/if}
25 | {pc_url full=true action='event' eid=$event.eid date=$date style="text-decoration: none;" title=$event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|strip_tags|safehtml display=$event.title|strip_tags}
26 |
27 | {foreachelse}
28 | {gt text='No events scheduled.'}
29 | {/foreach}{* /foreach events *}
30 | {/if}{* /if events *}
31 | {/foreach}{* /foreach dates *}
32 |
33 |
34 |
35 | {if $PRINT_VIEW eq true}
36 | {assign var="viewtype" value=$smarty.get.viewtype}
37 | {if ((empty($smarty.get.viewtype)) or (!isset($smarty.get.viewtype)))}
38 | {assign var="viewtype" value=$modvars.PostCalendar.pcDefaultView}
39 | {/if}
40 | {formutil_getpassedvalue name="date" source="get" assign="date" default=''}
41 |
{gt text='Return'}
42 | {/if}
43 |
44 | {include file="user/footer.tpl"}
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/lib/Sabre/VObject/Component/VTodo.php:
--------------------------------------------------------------------------------
1 | DTSTART)?$this->DTSTART->getDateTime():null;
32 | $duration = isset($this->DURATION)?VObject\DateTimeParser::parseDuration($this->DURATION):null;
33 | $due = isset($this->DUE)?$this->DUE->getDateTime():null;
34 | $completed = isset($this->COMPLETED)?$this->COMPLETED->getDateTime():null;
35 | $created = isset($this->CREATED)?$this->CREATED->getDateTime():null;
36 |
37 | if ($dtstart) {
38 | if ($duration) {
39 | $effectiveEnd = clone $dtstart;
40 | $effectiveEnd->add($duration);
41 | return $start <= $effectiveEnd && $end > $dtstart;
42 | } elseif ($due) {
43 | return
44 | ($start < $due || $start <= $dtstart) &&
45 | ($end > $dtstart || $end >= $due);
46 | } else {
47 | return $start <= $dtstart && $end > $dtstart;
48 | }
49 | }
50 | if ($due) {
51 | return ($start < $due && $end >= $due);
52 | }
53 | if ($completed && $created) {
54 | return
55 | ($start <= $created || $start <= $completed) &&
56 | ($end >= $created || $end >= $completed);
57 | }
58 | if ($completed) {
59 | return ($start <= $completed && $end >= $completed);
60 | }
61 | if ($created) {
62 | return ($end > $created);
63 | }
64 | return true;
65 |
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/javascript/postcalendar-function-updatefields.js:
--------------------------------------------------------------------------------
1 | // update companion time and date fields to prevent user from selecting invalid dates and times
2 | function updateFields(inputElementObj, dateText)
3 | {
4 | var fieldName = jQuery(inputElementObj).attr('id');
5 | var date = new Date(dateText);
6 | var datePlusOne = new Date(dateText);
7 | datePlusOne.setDate(datePlusOne.getDate()+1);
8 | var eventStartTime = jQuery("#eventstart_time_display").datepicker("getDate");
9 | var eventEndTime = jQuery("#eventend_time_display").datepicker("getDate");
10 |
11 | switch(fieldName)
12 | {
13 | case 'eventstart_display':
14 | jQuery("#eventend_display").datepicker('option', 'minDate', date);
15 | jQuery("#eventend_display").effect("highlight", 3000);
16 | jQuery("#repeat_enddate_display").datepicker('option', 'minDate', datePlusOne);
17 | updateFields(jQuery("#eventend_time_display"), dateText);
18 | break;
19 | case 'eventend_display':
20 | jQuery("#repeat_enddate_display").datepicker('option', 'minDate', datePlusOne);
21 | updateFields(jQuery("#eventstart_time_display"), dateText);
22 | break;
23 | case 'repeat_enddate_display':
24 | // do nothing
25 | break;
26 | case 'eventstart_time_display':
27 | if (jQuery("#eventstart_display").datepicker("getDate").getTime() == jQuery("#eventend_display").datepicker("getDate").getTime()) {
28 | if (eventStartTime > eventEndTime) {
29 | jQuery("#eventend_time_display").datepicker("setDate", eventStartTime);
30 | jQuery("#eventend_time_display").effect("highlight", 3000);
31 | jQuery("#eventend_time").attr("value", timepickerFormatTime(eventStartTime));
32 | }
33 | }
34 | break;
35 | case 'eventend_time_display':
36 | if (jQuery("#eventstart_display").datepicker("getDate").getTime() == jQuery("#eventend_display").datepicker("getDate").getTime()) {
37 | if (eventStartTime > eventEndTime) {
38 | jQuery("#eventstart_time_display").datepicker("setDate", eventEndTime);
39 | jQuery("#eventstart_time_display").effect("highlight", 3000);
40 | jQuery("#eventstart_time").attr("value", timepickerFormatTime(eventEndTime));
41 | jQuery("#eventend_time").attr("value", timepickerFormatTime(eventStartTime));
42 | }
43 | }
44 | break;
45 | }
46 | }
--------------------------------------------------------------------------------
/templates/user/week.tpl:
--------------------------------------------------------------------------------
1 | {formutil_getpassedvalue name="theme" source="get" assign="theme" default=false}
2 | {assign var="PRINT_VIEW" value=0}
3 | {if $theme eq "Printer"}
4 | {* page presented in printer theme *}
5 | {assign var="PRINT_VIEW" value=1}
6 | {/if}
7 | {if $PRINT_VIEW eq false}
8 | {$navBar}
9 | {/if}
10 |
15 |
16 |
17 | {* Loop through the EventsByDate array : This array contains data for each day in the view. *}
18 | {pc_sort_events var="S_EVENTS" sort="time" order="asc" value=$eventsByDate}
19 | {assign var="javascript" value=""}
20 | {foreach name='dates' item='events' key='cdate' from=$S_EVENTS}
21 |
24 | {* Loop through the events for this day and display the event data *}
25 |
26 | {foreach name='eventloop' key='id' item='event' from=$S_EVENTS.$cdate}
27 |
28 | {if $event.alldayevent != true}{$event.startTime} - {$event.endTime}{else}{gt text='All-day event'}{/if}
29 | {if $event.privateicon}{img src='lock.gif' modname='PostCalendar' __title="private event" __alt="private event"}{/if}
30 | {pc_url full=true action='event' eid=$event.eid date=$cdate display=$event.title|strip_tags title=$event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|safehtml}
31 |
32 | {foreachelse}
33 |
34 | {/foreach}
35 |
36 | {/foreach}
37 |
38 |
39 | {if $PRINT_VIEW eq true}
40 | {assign var="viewtype" value=$smarty.get.viewtype}
41 | {if ((empty($smarty.get.viewtype)) or (!isset($smarty.get.viewtype)))}
42 | {assign var="viewtype" value=$modvars.PostCalendar.pcDefaultView}
43 | {/if}
44 |
{gt text='Return'}
45 | {/if}
46 |
47 | {include file="user/footer.tpl"}
--------------------------------------------------------------------------------
/docs/en/Admin/TimeIt_Import.txt:
--------------------------------------------------------------------------------
1 | # PostCalendar v8.0.0 TimeIt Import to PostCalendar
2 |
3 | In the admin settings there is a link for importing events from TimeIt into
4 | PostCalendar. The category of events is also converted to PC. Import can only be
5 | performed one time.
6 |
7 | **Before proceeding make sure you have a good backup of your full database!
8 | Since categories are imported and the PostCalendar tables will be updated.**
9 |
10 | The import script is based upon the last release of TimeIt (version 2.1.1). If
11 | you are using a earlier version, please upgrade to 2.1.1 before upgrading
12 | Zikula to 1.3.x. If you are using a later, unreleased version, this is
13 | unsupported but may still work. use at your own risk.
14 |
15 | In order to perform the migration, the table must be properly named and the
16 | system is scanned to detect the table. Please follow the directions in the Admin
17 | Settings page to complete this step. The migrate link will be visible in the
18 | admin menu bar when this step is complete.
19 |
20 | After clicking the link to import events all TimeIt events are collected.
21 | Every event is converted into a Doctrine object and inserted into PostCalendar.
22 | Fields that are converted are: duration, all day flag, repeating, location info,
23 | contact info, sharing and approval status.
24 |
25 | Please note that events that had 'random' repeat settings (multiple unrelated,
26 | non-sequential dates) are not supported in PostCalendar and are converted to a
27 | single day event. Events with repeat exceptions are handled as expected.
28 |
29 | ###TimeIt Calendars
30 | All events from TimeIt are imported into the PostCalendar as the same 'calendar'.
31 | Because TimeIt and PostCalendar handle this differently there is no simple
32 | transfer (PC handles multiple calendars via categories).
33 |
34 | ### Categories
35 | Every event gets the PostCalendar category _Imported_ and the original category
36 | assigned in TimeIt. The categories of TimeIt are assumed to be in registry
37 | TimeIt - TimeItEvents with property Main. (You should confirm this before
38 | beginning the migration)
39 |
40 | TimeIt categories are imported as a secondary category relation. If you wish to
41 | utilize those categories as the primary (or only) category relation, you may do
42 | so by doing the following:
43 | * Rename or delete the current 'Main' relation
44 | * rename the TimeItImport relation to 'Main'
45 |
46 | After import the TimeIt event categories are removed from the old location in
47 | the categories_mapobj table.
48 |
49 | The TimeIt version used for the creation of the import script was 2.1.1.
--------------------------------------------------------------------------------
/templates/blocks/calendar_modify.tpl:
--------------------------------------------------------------------------------
1 |
2 | {gt text="Display the calendar in the block"}
3 |
4 |
5 |
6 | {gt text="Display today's events in the block"}
7 |
8 |
9 |
10 | {gt text="Hide today's events if none"}
11 |
12 |
13 |
14 | {gt text="Display upcoming events in the block"}
15 |
16 |
17 |
18 | {gt text='Only display events in category(s)'}
19 | {gt text="All Categories" assign="allText"}
20 | {nocache}
21 | {foreach from=$catregistry key='property' item='category'}
22 | {array_field assign="selectedValue" array=$vars.pcbfiltercats field=$property}
23 | {selector_category
24 | editLink=false
25 | category=$category
26 | name="pcbfiltercats[$property]"
27 | field="id"
28 | selectedValue=$selectedValue
29 | defaultValue="0"
30 | all=1
31 | allText=$allText
32 | allValue=0
33 | multipleSize=6}
34 | {/foreach}
35 |
36 | {/nocache}
37 |
38 |
39 | {gt text="Display search/submit links in the block"}
40 |
41 |
42 |
43 | {gt text="Number of events to display"}
44 |
45 |
46 |
47 | {gt text="Number of months ahead to query for upcoming events"}
48 |
49 |
--------------------------------------------------------------------------------
/lib/PostCalendar/Entity/RecurException.php:
--------------------------------------------------------------------------------
1 | exception = $exception;
51 | }
52 |
53 | /**
54 | * get the record id
55 | * @return integer
56 | */
57 | public function getId()
58 | {
59 | return $this->id;
60 | }
61 |
62 | /**
63 | * set the record id
64 | * @param integer $id
65 | */
66 | public function setId($id)
67 | {
68 | $this->id = $id;
69 | }
70 |
71 | /**
72 | * get the associated event
73 | * @return PostCalendar_Entity_CalendarEvent
74 | */
75 | public function getEvent()
76 | {
77 | return $this->event;
78 | }
79 |
80 | /**
81 | * Set the associated event
82 | * @param PostCalendar_Entity_CalendarEvent $event
83 | */
84 | public function setEvent(PostCalendar_Entity_CalendarEvent $event)
85 | {
86 | $this->event = $event;
87 | }
88 |
89 | /**
90 | * get the exception
91 | * @return DateTime
92 | */
93 | public function getException()
94 | {
95 | return $this->exception;
96 | }
97 |
98 | /**
99 | * Set the exception
100 | * @param DateTime $exception
101 | */
102 | public function setException(DateTime $exception)
103 | {
104 | $this->exception = $exception;
105 | }
106 |
107 | }
108 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/lib/Sabre/VObject/Component/VEvent.php:
--------------------------------------------------------------------------------
1 | RRULE) {
31 | $it = new VObject\RecurrenceIterator($this);
32 | $it->fastForward($start);
33 |
34 | // We fast-forwarded to a spot where the end-time of the
35 | // recurrence instance exceeded the start of the requested
36 | // time-range.
37 | //
38 | // If the starttime of the recurrence did not exceed the
39 | // end of the time range as well, we have a match.
40 | return ($it->getDTStart() < $end && $it->getDTEnd() > $start);
41 |
42 | }
43 |
44 | $effectiveStart = $this->DTSTART->getDateTime();
45 | if (isset($this->DTEND)) {
46 |
47 | // The DTEND property is considered non inclusive. So for a 3 day
48 | // event in july, dtstart and dtend would have to be July 1st and
49 | // July 4th respectively.
50 | //
51 | // See:
52 | // http://tools.ietf.org/html/rfc5545#page-54
53 | $effectiveEnd = $this->DTEND->getDateTime();
54 |
55 | } elseif (isset($this->DURATION)) {
56 | $effectiveEnd = clone $effectiveStart;
57 | $effectiveEnd->add( VObject\DateTimeParser::parseDuration($this->DURATION) );
58 | } elseif ($this->DTSTART->getDateType() == VObject\Property\DateTime::DATE) {
59 | $effectiveEnd = clone $effectiveStart;
60 | $effectiveEnd->modify('+1 day');
61 | } else {
62 | $effectiveEnd = clone $effectiveStart;
63 | }
64 | return (
65 | ($start <= $effectiveEnd) && ($end > $effectiveStart)
66 | );
67 |
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Nav/Xml.php:
--------------------------------------------------------------------------------
1 | viewtype = 'xml';
21 | $this->imageTitleText = $this->view->__('RSS Feed');
22 | $this->displayText = $this->view->__('RSS');
23 | }
24 |
25 | /**
26 | * provide the image params
27 | *
28 | * @return array
29 | */
30 | protected function getImageParams()
31 | {
32 | return array(
33 | 'modname' => 'PostCalendar',
34 | 'src' => 'feed.gif');
35 | }
36 |
37 | /**
38 | * Set the Zikula_ModUrl
39 | */
40 | protected function setUrl()
41 | {
42 | $this->url = new Zikula_ModUrl('PostCalendar', 'user', 'display', ZLanguage::getLanguageCode(), array(
43 | 'viewtype' => $this->viewtype,
44 | 'date' => $this->date->format('Ymd'),
45 | 'theme' => 'rss'));
46 | }
47 |
48 | /**
49 | * Set the anchortag
50 | */
51 | protected function setAnchorTag()
52 | {
53 | if (!ModUtil::getVar('Theme', 'render_expose_template')) {
54 | $this->prepRss();
55 | parent::setAnchorTag();
56 | } else {
57 | $this->anchorTag = null;
58 | }
59 | }
60 |
61 | /**
62 | * Set the radio input
63 | */
64 | protected function setRadio()
65 | {
66 | if (!ModUtil::getVar('Theme', 'render_expose_template')) {
67 | $this->prepRss();
68 | parent::setRadio();
69 | } else {
70 | $this->radio = null;
71 | }
72 | }
73 |
74 | /**
75 | * Setup the page properly to provide an RSS feed
76 | */
77 | private function prepRss()
78 | {
79 | $rsslink = $this->getUrl();
80 | $rsslink = DataUtil::formatForDisplay($rsslink);
81 | $sitename = System::getVar('sitename');
82 | $modinfo = ModUtil::getInfo(ModUtil::getIdFromName('PostCalendar'));
83 | $modname = $modinfo['displayname'];
84 | $title = DataUtil::formatForDisplay($sitename . " " . $modname);
85 | $pagevarvalue = " ";
86 | PageUtil::addVar("header", $pagevarvalue);
87 | }
88 |
89 | }
--------------------------------------------------------------------------------
/templates/hooks/modifyconfig.tpl:
--------------------------------------------------------------------------------
1 | {admincategorymenu}
2 |
3 |
{gt text=$ActiveModule}
4 | {modulelinks modname=$ActiveModule type='admin'}
5 |
6 |
7 |
8 |
{img modname='PostCalendar' src='admin.png'}
9 |
{gt text="PostCalendar settings for %s" tag1=$ActiveModule}
10 |
49 |
--------------------------------------------------------------------------------
/lib/PostCalendar/Form/Handler/EditHandler.php:
--------------------------------------------------------------------------------
1 | eid = $this->request->query->get('eid');
26 |
27 | return true;
28 | }
29 |
30 | function handleCommand(Zikula_Form_View $view, &$args)
31 | {
32 | $url = null;
33 |
34 | // Fetch event data from DB to confirm event exists
35 | $event = $this->entityManager->getRepository('PostCalendar_Entity_CalendarEvent')->find($this->eid);
36 | $eventArray = $event->getOldArray();
37 | if (count($event) == 0) {
38 | return LogUtil::registerError($this->__f('Error! There are no events with ID %s.', $this->eid));
39 | }
40 |
41 | if ($args['commandName'] == 'delete') {
42 | if ((UserUtil::getVar('uid') != $eventArray['informant']) and (!SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_ADMIN))) {
43 | return LogUtil::registerError($this->__('Sorry! You do not have authorization to delete this event.'));
44 | }
45 | try {
46 | $this->entityManager->remove($event);
47 | $this->entityManager->flush();
48 | } catch (Exception $e) {
49 | return LogUtil::registerError($e->getMessage());
50 | }
51 | LogUtil::registerStatus($this->__('Done! The event was deleted.'));
52 |
53 | $this->notifyHooks(new Zikula_ProcessHook('postcalendar.ui_hooks.events.process_delete', $this->eid));
54 |
55 | $redir = ModUtil::url('PostCalendar', 'user', 'display', array(
56 | 'viewtype' => $this->getVar('pcDefaultView')));
57 | return $view->redirect($redir);
58 | } else if ($args['commandName'] == 'cancel') {
59 | $url = ModUtil::url('PostCalendar', 'user', 'display', array(
60 | 'eid' => $this->eid,
61 | 'viewtype' => 'event'));
62 | }
63 |
64 | if ($url != null) {
65 | /*ModUtil::apiFunc('PageLock', 'user', 'releaseLock', array('lockName' => "HowtoPnFormsRecipe{$this->recipeId}")); */
66 | return $view->redirect($url);
67 | }
68 |
69 | return true;
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Day.php:
--------------------------------------------------------------------------------
1 | cacheTag = $this->requestedDate->format('Ymd');
24 | }
25 |
26 | /**
27 | * Set the template name
28 | */
29 | protected function setTemplate()
30 | {
31 | $this->template = 'user/day.tpl';
32 | }
33 |
34 | /**
35 | * Setup the view
36 | */
37 | protected function setup()
38 | {
39 | $this->viewtype = 'day';
40 |
41 | $prevClone = clone $this->requestedDate;
42 | $prevClone->modify("-1 day");
43 | $this->navigation['previous'] = ModUtil::url('PostCalendar', 'user', 'display', array(
44 | 'viewtype' => $this->viewtype,
45 | 'date' => $prevClone->format('Ymd'),
46 | 'userfilter' => $this->userFilter,
47 | 'filtercats' => $this->selectedCategories));
48 | $nextClone = clone $this->requestedDate;
49 | $nextClone->modify("+1 day");
50 | $this->navigation['next'] = ModUtil::url('PostCalendar', 'user', 'display', array(
51 | 'viewtype' => $this->viewtype,
52 | 'date' => $nextClone->format('Ymd'),
53 | 'userfilter' => $this->userFilter,
54 | 'filtercats' => $this->selectedCategories));
55 | }
56 |
57 | /**
58 | * Render the view
59 | *
60 | * @return string
61 | */
62 | public function render()
63 | {
64 | if (!$this->isCached()) {
65 | // Load the events
66 | $start = clone $this->requestedDate;
67 | $end = clone $this->requestedDate;
68 | $eventsByDate = ModUtil::apiFunc('PostCalendar', 'event', 'getEvents', array(
69 | 'start' => $start,
70 | 'end' => $end,
71 | 'filtercats' => $this->selectedCategories,
72 | 'date' => $this->requestedDate,
73 | 'userfilter' => $this->userFilter));
74 | // create and return template
75 | $this->view
76 | ->assign('navBar', $this->navBar)
77 | ->assign('navigation', $this->navigation)
78 | ->assign('eventsByDate', $eventsByDate)
79 | ->assign('requestedDate', $this->requestedDate);
80 | }
81 | return $this->view->fetch($this->template);
82 | }
83 |
84 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/Component/VTodoTest.php:
--------------------------------------------------------------------------------
1 | assertEquals($outcome, $vtodo->isInTimeRange($start, $end));
15 |
16 | }
17 |
18 | public function timeRangeTestData() {
19 |
20 | $tests = array();
21 |
22 | $vtodo = Component::create('VTODO');
23 | $vtodo->DTSTART = '20111223T120000Z';
24 | $tests[] = array($vtodo, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
25 | $tests[] = array($vtodo, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
26 |
27 | $vtodo2 = clone $vtodo;
28 | $vtodo2->DURATION = 'P1D';
29 | $tests[] = array($vtodo2, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
30 | $tests[] = array($vtodo2, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
31 |
32 | $vtodo3 = clone $vtodo;
33 | $vtodo3->DUE = '20111225';
34 | $tests[] = array($vtodo3, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
35 | $tests[] = array($vtodo3, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
36 |
37 | $vtodo4 = Component::create('VTODO');
38 | $vtodo4->DUE = '20111225';
39 | $tests[] = array($vtodo4, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
40 | $tests[] = array($vtodo4, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
41 |
42 | $vtodo5 = Component::create('VTODO');
43 | $vtodo5->COMPLETED = '20111225';
44 | $tests[] = array($vtodo5, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
45 | $tests[] = array($vtodo5, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
46 |
47 | $vtodo6 = Component::create('VTODO');
48 | $vtodo6->CREATED = '20111225';
49 | $tests[] = array($vtodo6, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
50 | $tests[] = array($vtodo6, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
51 |
52 | $vtodo7 = Component::create('VTODO');
53 | $vtodo7->CREATED = '20111225';
54 | $vtodo7->COMPLETED = '20111226';
55 | $tests[] = array($vtodo7, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
56 | $tests[] = array($vtodo7, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
57 |
58 | $vtodo7 = Component::create('VTODO');
59 | $tests[] = array($vtodo7, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
60 | $tests[] = array($vtodo7, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), true);
61 |
62 | return $tests;
63 |
64 | }
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/javascript/jquery-plugins/tipTipv13/tipTip.css:
--------------------------------------------------------------------------------
1 | /* TipTip CSS - Version 1.2 */
2 |
3 | #tiptip_holder {
4 | display: none;
5 | position: absolute;
6 | top: 0;
7 | left: 0;
8 | z-index: 99999;
9 | }
10 |
11 | #tiptip_holder.tip_top {
12 | padding-bottom: 5px;
13 | }
14 |
15 | #tiptip_holder.tip_bottom {
16 | padding-top: 5px;
17 | }
18 |
19 | #tiptip_holder.tip_right {
20 | padding-left: 5px;
21 | }
22 |
23 | #tiptip_holder.tip_left {
24 | padding-right: 5px;
25 | }
26 | /* shadows removed for PostCalendar */
27 | #tiptip_content {
28 | font-size: 11px;
29 | color: #fff;
30 | /* text-shadow: 0 0 2px #000;*/
31 | padding: 4px 8px;
32 | border: 1px solid rgba(255,255,255,0.25);
33 | background-color: rgb(25,25,25);
34 | background-color: rgba(25,25,25,0.92);
35 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
36 | border-radius: 3px;
37 | -webkit-border-radius: 3px;
38 | -moz-border-radius: 3px;
39 | /* box-shadow: 0 0 3px #555;
40 | -webkit-box-shadow: 0 0 3px #555;
41 | -moz-box-shadow: 0 0 3px #555;*/
42 | }
43 |
44 | #tiptip_arrow, #tiptip_arrow_inner {
45 | position: absolute;
46 | border-color: transparent;
47 | border-style: solid;
48 | border-width: 6px;
49 | height: 0;
50 | width: 0;
51 | }
52 |
53 | #tiptip_holder.tip_top #tiptip_arrow {
54 | border-top-color: #fff;
55 | border-top-color: rgba(255,255,255,0.35);
56 | }
57 |
58 | #tiptip_holder.tip_bottom #tiptip_arrow {
59 | border-bottom-color: #fff;
60 | border-bottom-color: rgba(255,255,255,0.35);
61 | }
62 |
63 | #tiptip_holder.tip_right #tiptip_arrow {
64 | border-right-color: #fff;
65 | border-right-color: rgba(255,255,255,0.35);
66 | }
67 |
68 | #tiptip_holder.tip_left #tiptip_arrow {
69 | border-left-color: #fff;
70 | border-left-color: rgba(255,255,255,0.35);
71 | }
72 |
73 | #tiptip_holder.tip_top #tiptip_arrow_inner {
74 | margin-top: -7px;
75 | margin-left: -6px;
76 | border-top-color: rgb(25,25,25);
77 | border-top-color: rgba(25,25,25,0.92);
78 | }
79 |
80 | #tiptip_holder.tip_bottom #tiptip_arrow_inner {
81 | margin-top: -5px;
82 | margin-left: -6px;
83 | border-bottom-color: rgb(25,25,25);
84 | border-bottom-color: rgba(25,25,25,0.92);
85 | }
86 |
87 | #tiptip_holder.tip_right #tiptip_arrow_inner {
88 | margin-top: -6px;
89 | margin-left: -5px;
90 | border-right-color: rgb(25,25,25);
91 | border-right-color: rgba(25,25,25,0.92);
92 | }
93 |
94 | #tiptip_holder.tip_left #tiptip_arrow_inner {
95 | margin-top: -6px;
96 | margin-left: -7px;
97 | border-left-color: rgb(25,25,25);
98 | border-left-color: rgba(25,25,25,0.92);
99 | }
100 |
101 | /* Webkit Hacks */
102 | @media screen and (-webkit-min-device-pixel-ratio:0) {
103 | #tiptip_content {
104 | padding: 4px 8px 5px 8px;
105 | background-color: rgba(45,45,45,0.88);
106 | }
107 | #tiptip_holder.tip_bottom #tiptip_arrow_inner {
108 | border-bottom-color: rgba(45,45,45,0.88);
109 | }
110 | #tiptip_holder.tip_top #tiptip_arrow_inner {
111 | border-top-color: rgba(20,20,20,0.92);
112 | }
113 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/Needles/PostCalDate.php:
--------------------------------------------------------------------------------
1 | 'PostCalendar', // module name
19 | 'info' => 'POSTCALDATE-{date-displaytype}', // possible needles
20 | 'inspect' => true,
21 | //'needle' => array('http://', 'https://', 'ftp://', 'mailto://'),
22 | //'function' => 'http',
23 | //'casesensitive' => false,
24 | );
25 | return $info;
26 | }
27 |
28 | public static function needle($args)
29 | {
30 | $dom = ZLanguage::getModuleDomain('PostCalendar');
31 | // simple replacement, no need to cache anything
32 | if (isset($args['nid']) && !empty($args['nid'])) {
33 | if (substr($args['nid'], 0, 1) != '-') {
34 | $args['nid'] = '-' . $args['nid'];
35 | }
36 | list ($dispose, $date, $displaytype) = explode('-', $args['nid']);
37 | //validate date format
38 | if ((empty($date)) || (strlen($date) != 8)) {
39 | $date = date("Ymd");
40 | }
41 | $displaytype = $displaytype ? strtoupper($displaytype) : 'DIL'; // in any order: D (date) I (icon) L (uselink) - default: DIL
42 |
43 | $icon = '';
44 | $link = '';
45 | $uselink = false;
46 | $moddir = ModUtil::getBaseDir($modname = 'PostCalendar');
47 | if (strpos($displaytype, 'I') !== false) {
48 | $icon = " ";
49 | }
50 | if (strpos($displaytype, 'L') !== false) {
51 | $uselink = true;
52 | }
53 | if (strpos($displaytype, 'D') !== false) {
54 | $link = ModUtil::url('PostCalendar', 'user', 'display', array(
55 | 'viewtype' => 'day',
56 | 'date' => $date));
57 | $format = ModUtil::getVar('PostCalendar', 'pcDateFormats');
58 | $linktext = DateUtil::strftime($format['strftime'], strtotime($date));
59 | }
60 |
61 | $linktext = DataUtil::formatForDisplay($linktext);
62 | if ($uselink) {
63 | $link = DataUtil::formatForDisplay($link);
64 | $result = "$icon$linktext ";
65 | } else {
66 | $result = $icon . $linktext;
67 | }
68 | } else {
69 | $result = __('No needle ID', $dom);
70 | }
71 | return $result;
72 | }
73 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/Block/Featuredevent.php:
--------------------------------------------------------------------------------
1 | 'featuredevent',
24 | 'module' => 'PostCalendar',
25 | 'text_type_long' => $this->__('Featured Event Calendar Block'),
26 | 'allow_multiple' => true,
27 | 'form_content' => false,
28 | 'form_refresh' => false,
29 | 'show_preview' => true,
30 | 'admin_tableless' => true);
31 | }
32 |
33 | /**
34 | * display block
35 | */
36 | public function display($blockinfo)
37 | {
38 | if (!SecurityUtil::checkPermission('PostCalendar:featuredeventblock:', "$blockinfo[title]::", ACCESS_OVERVIEW)) {
39 | return;
40 | }
41 | if (!ModUtil::available('PostCalendar')) {
42 | return;
43 | }
44 |
45 | $date = new DateTime();
46 | $calendarView = new PostCalendar_CalendarView_FeaturedEventBlock($this->view, $date, '', null, $blockinfo);
47 | $blockinfo = $calendarView->render();
48 |
49 | return BlockUtil::themeBlock($blockinfo);
50 | }
51 |
52 | /**
53 | * modify block settings ..
54 | */
55 | public function modify($blockinfo)
56 | {
57 | $vars = BlockUtil::varsFromContent($blockinfo['content']);
58 | // Defaults
59 | if (empty($vars['eid'])) $vars['eid'] = '';
60 | if (empty($vars['showcountdown'])) $vars['showcountdown'] = 0;
61 | if (empty($vars['hideonexpire'])) $vars['hideonexpire'] = 0;
62 |
63 | $this->view->assign('vars', $vars);
64 |
65 | return $this->view->fetch('blocks/featuredevent_modify.tpl');
66 | }
67 |
68 | /**
69 | * update block settings
70 | */
71 | public function update($blockinfo)
72 | {
73 | $vars = BlockUtil::varsFromContent($blockinfo['content']);
74 |
75 | // alter the corresponding variable
76 | $vars['eid'] = $this->request->request->get('eid', '');
77 | $vars['showcountdown'] = $this->request->request->get('showcountdown', '');
78 | $vars['hideonexpire'] = $this->request->request->get('hideonexpire', '');
79 |
80 | // write back the new contents
81 | $blockinfo['content'] = BlockUtil::varsToContent($vars);
82 |
83 | // clear the block cache
84 | $this->view->clear_cache('blocks/featuredevent.tpl');
85 |
86 | return $blockinfo;
87 | }
88 | } // end class def
--------------------------------------------------------------------------------
/docs/en/Admin/CategoryUsage.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Category Usage
2 |
3 | ### Categorization now required
4 |
5 | As of v8.0.0, PostCalendar now requires the use of categorization. All checks for
6 | 'enablecategorization' have been removed and it is assumed they are in use.
7 |
8 | ### Utilizing Categories in a New Installation of PostCalendar
9 |
10 | On install, PostCalendar will create a main category called 'PostCalendar' and one
11 | subcategory called 'Events'. The category will have a property name of 'Main'. The
12 | Events subcategory will have an attribute called 'color' and a value of '#99ccff'
13 | (light blue).
14 |
15 | ### Adding New Categories & Subcategories to PostCalendar
16 |
17 | If you wish to add more subcategories, you can do so easily using the Categories
18 | module. Be sure to choose 'PostCalendar' as the parent category and add a color
19 | attribute with an appropriate hexadecimal value.
20 |
21 | One may also create a new category and link it to PostCalendar. This will allow
22 | you to categorize PostCalendar events in multiple areas. Simply create a new Category,
23 | then using the categories registry, select the following values
24 |
25 | `PostCalendar | CalendarEvent | | `
26 |
27 | Be sure to create appropriate subcategories. PostCalendar will not associate colors
28 | with secondary (non 'Main') subcategories, so there is no need to create color attributes.
29 |
30 | To remove a parent category from PostCalendar, simply delete the associated entry
31 | in the category registry and it will no longer be associated with the module.
32 |
33 | ### Using Colors in Categories
34 |
35 | One can assign colors for any category utilized in PostCalendar. This color is used
36 | to provide a visual cue to the user. Do so by creating a _color_ attribute and give
37 | it a [hexadecimal value][link1] (including the hash symbol) e.g. '#cccccc'. If you
38 | do not assign a color to a category a default color of '#eeeeee' will be used.
39 |
40 | *Note that the attribute names **must** be in English (as above).*
41 |
42 | ### Using Global Categories in PostCalendar
43 |
44 | If you want to use the same categories in PostCalendar that you are using in other
45 | modules (the Global categories or another), you are free to do so. Create a new
46 | category registry entry with the following settings:
47 |
48 | `PostCalendar | CalendarEvent | Main | __SYSTEM__/Modules/Global`
49 |
50 | *note: these settings assign the 'Main' property name to the global categories.
51 | If you do this, delete the old PostCalendar 'Main' reference or convert it to a
52 | secondary category.*
53 |
54 | Be sure to remember to add a 'color' attribute to each of the global categories
55 | to take advantage of that feature in PostCalendar.
56 |
57 | ### Multi-Category Filter
58 |
59 | Multi-Category filtering is possible using the multi-select in the filter.
60 |
61 | ### Category Permissions
62 |
63 | Category-based permissions became available for the first time in PostCalendar
64 | v7.0. Please see `Permissions.txt` of the documentation for more information.
65 |
66 | [link1]:
67 | "Wikipedia Web Color Reference"
--------------------------------------------------------------------------------
/templates/blocks/month.tpl:
--------------------------------------------------------------------------------
1 | {pc_pagejs_init}
2 |
3 |
4 |
5 | {foreach from=$dayDisplay.colclass item=colclassname}
6 |
7 | {/foreach}
8 |
9 |
14 |
15 |
16 |
17 | {foreach name='daynames' item='day' from=$dayDisplay.short}
18 | {$day}
19 | {/foreach}
20 |
21 | {foreach name='weeks' item='days' from=$graph}
22 |
23 | >
24 | {foreach name='day' item='date' from=$days}
25 | {if $date == $todayDate}
26 | {assign var="stylesheet" value="monthtoday"}
27 | {elseif ($date < $firstDayOfMonth || $date > $lastDayOfMonth)}
28 | {assign var="stylesheet" value="monthoff"}
29 | {else}
30 | {assign var="stylesheet" value="monthon"}
31 | {/if}
32 |
33 | {assign var="titles" value=""}
34 | {assign var="numberofevents" value=$eventsByDate.$date|@count}
35 | {if $modvars.PostCalendar.pcUsePopups}
36 | {foreach name='events' item='event' from=$eventsByDate.$date}
37 | {if $event.alldayevent != true}
38 | {assign var="titles" value="$titles`$event.startTime`-`$event.endTime` `$event.title` "}
39 | {else}
40 | {assign var="titles" value="$titles`$event.title` "}
41 | {/if}
42 | {foreachelse}
43 | {gt text='no events' assign='titles'}
44 | {/foreach}
45 | {else}
46 | {gt text="event" plural="events" count=$numberofevents assign="titlelabel"}
47 | {assign var="titles" value="`$numberofevents` `$titlelabel`"}
48 | {/if}
49 | {if $numberofevents}
50 | {if $numberofevents > 2}
51 | {assign var="classname" value="event-three"}
52 | {elseif $numberofevents > 1}
53 | {assign var="classname" value="event-two"}
54 | {elseif $numberofevents > 0}
55 | {assign var="classname" value="event-one"}
56 | {else}
57 | {assign var="classname" value="event-none"}
58 | {/if}
59 | {pc_url full=true class=$classname action="day" date=$date title=$titles|safetext display=$date|date_format:"%e"}
60 | {else}
61 | {pc_url full=true class="blockevent-none" action="day" date=$date title=$titles display=$date|date_format:"%e"}
62 | {/if}
63 |
64 | {/foreach}
65 |
66 | {/foreach}
67 |
68 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/PastEventsBlock.php:
--------------------------------------------------------------------------------
1 | bid = $blockinfo['bid'];
39 | $this->blockVars = BlockUtil::varsFromContent($blockinfo['content']);
40 | if (!isset($categoryFilter)) {
41 | $categoryFilter = $this->blockVars['pcbfiltercats'];
42 | }
43 | parent::__construct($view, $requestedDate, $userFilter, $categoryFilter);
44 | }
45 |
46 | /**
47 | * Set the cacheTag
48 | */
49 | protected function setCacheTag()
50 | {
51 | $this->cacheTag = $this->bid;
52 | }
53 |
54 | /**
55 | * Set the template
56 | */
57 | protected function setTemplate()
58 | {
59 | $this->template = 'blocks/pastevents.tpl';
60 | }
61 |
62 | /**
63 | * Set the date range of this view
64 | */
65 | protected function setDates()
66 | {
67 | $this->startDate = new DateTime();
68 | if ($this->blockVars['pcbeventsrange'] == 0) {
69 | $this->startDate->modify("January 1, 1970");
70 | } else {
71 | $this->startDate->modify("-{$this->blockVars['pcbeventsrange']} months");
72 | }
73 | $this->endDate = new DateTime();
74 | $this->endDate->modify("-1 day"); // yesterday
75 | }
76 |
77 | /**
78 | * provide required setup
79 | */
80 | protected function setup()
81 | {
82 |
83 | }
84 |
85 | /**
86 | * Render the view
87 | * @return string
88 | */
89 | public function render()
90 | {
91 | if (!$this->isCached()) {
92 | // Load the events
93 | $eventsByDate = ModUtil::apiFunc('PostCalendar', 'event', 'getEvents', array(
94 | 'start' => $this->startDate,
95 | 'end' => $this->endDate,
96 | 'filtercats' => $this->selectedCategories,
97 | 'sort' => 'DESC'));
98 | // create and return template
99 | $this->view
100 | ->assign('eventsByDate', $eventsByDate);
101 | }
102 |
103 | return $this->view->fetch($this->template);
104 | }
105 |
106 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/Block/Pastevents.php:
--------------------------------------------------------------------------------
1 | 'PostCalendar',
26 | 'module' => 'PostCalendar',
27 | 'text_type_long' => $this->__('Past Events Block'),
28 | 'allow_multiple' => true,
29 | 'form_content' => false,
30 | 'form_refresh' => false,
31 | 'show_preview' => true);
32 | }
33 |
34 | /**
35 | * display block
36 | */
37 | public function display($blockinfo)
38 | {
39 | if (!SecurityUtil::checkPermission('PostCalendar:pasteventsblock:', "$blockinfo[title]::", ACCESS_OVERVIEW)) {
40 | return;
41 | }
42 | if (!ModUtil::available('PostCalendar')) {
43 | return;
44 | }
45 | $date = new DateTime();
46 | $calendarView = new PostCalendar_CalendarView_PastEventsBlock($this->view, $date, '', null, $blockinfo);
47 | $blockinfo['content'] = $calendarView->render();
48 |
49 | return BlockUtil::themeBlock($blockinfo);
50 | }
51 |
52 | /**
53 | * modify block settings ..
54 | */
55 | public function modify($blockinfo)
56 | {
57 | $vars = BlockUtil::varsFromContent($blockinfo['content']);
58 | // Defaults
59 | if (empty($vars['pcbeventsrange'])) $vars['pcbeventsrange'] = 6;
60 | if (empty($vars['pcbfiltercats'])) $vars['pcbfiltercats'] = array();
61 |
62 | // load the category registry util
63 | $catregistry = CategoryRegistryUtil::getRegisteredModuleCategories('PostCalendar', 'CalendarEvent');
64 | $this->view->assign('catregistry', $catregistry);
65 |
66 | $props = array_keys($catregistry);
67 | $this->view->assign('firstprop', $props[0]);
68 |
69 | $this->view->assign('vars', $vars);
70 |
71 | return $this->view->fetch('blocks/pastevents_modify.tpl');
72 | }
73 |
74 | /**
75 | * update block settings
76 | */
77 | public function update($blockinfo)
78 | {
79 | // Get current content
80 | $vars = BlockUtil::varsFromContent($blockinfo['content']);
81 |
82 | // overwrite with new values
83 | $vars['pcbeventsrange'] = $this->request->request->get('pcbeventsrange', 6);
84 | $vars['pcbfiltercats'] = $this->request->request->get('pcbfiltercats'); //array
85 |
86 | $this->view->clear_cache('blocks/pastevents.tpl');
87 | $blockinfo['content'] = BlockUtil::varsToContent($vars);
88 |
89 | return $blockinfo;
90 | }
91 | } // end class def
--------------------------------------------------------------------------------
/templates/user/list.tpl:
--------------------------------------------------------------------------------
1 | {formutil_getpassedvalue name="theme" source="get" assign="theme" default=false}
2 | {assign var="PRINT_VIEW" value=0}
3 | {if $theme eq "Printer"}
4 | {* page presented in printer theme *}
5 | {assign var="PRINT_VIEW" value=1}
6 | {/if}
7 | {if $PRINT_VIEW eq false}
8 | {$navBar}
9 | {/if}
10 |
15 |
16 |
17 |
18 | {pc_sort_events var="S_EVENTS" sort="time" order="asc" value=$eventsByDate}
19 | {foreach name='dates' item='events' key='date' from=$S_EVENTS}
20 |
21 | {* CREATE THE LIST *}
22 | {*sort the events by category so we can make it pretty*}
23 | {if ((isset($S_EVENTS.$date)) && (count($S_EVENTS.$date) gt 0))}
24 |
26 | {foreach name='events' item='event' from=$S_EVENTS.$date}
27 | {if $smarty.foreach.events.first eq true}{/if}
28 |
29 | {if $event.alldayevent != true}{$event.startTime} - {$event.endTime}{else}{gt text='All-day event'}{/if}
30 | {if $event.privateicon}{img src='lock.gif' modname='PostCalendar' __title="private event" __alt="private event"}{/if}
31 | {pc_url full=true action='event' eid=$event.eid date=$date style="text-decoration: none;" title=$event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|strip_tags|safehtml display=$event.title|strip_tags}
32 |
33 | {/foreach}
34 |
35 | {/if}{* end if isset($S_EVENTS) *}
36 | {/foreach}
37 |
38 |
43 |
44 |
45 | {if $PRINT_VIEW eq true}
46 | {assign var="viewtype" value=$smarty.get.viewtype}
47 | {if ((empty($smarty.get.viewtype)) or (!isset($smarty.get.viewtype)))}
48 | {assign var="viewtype" value=$modvars.PostCalendar.pcDefaultView}
49 | {/if}
50 | {formutil_getpassedvalue name="date" source="get" assign="date" default=''}
51 |
{gt text='Return'}
52 | {/if}
53 |
54 | {include file="user/footer.tpl"}
55 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/Component/VEventTest.php:
--------------------------------------------------------------------------------
1 | assertEquals($outcome, $vevent->isInTimeRange($start, $end));
15 |
16 | }
17 |
18 | public function timeRangeTestData() {
19 |
20 | $tests = array();
21 |
22 | $vevent = new VEvent('VEVENT');
23 | $vevent->DTSTART = '20111223T120000Z';
24 | $tests[] = array($vevent, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
25 | $tests[] = array($vevent, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
26 |
27 | $vevent2 = clone $vevent;
28 | $vevent2->DTEND = '20111225T120000Z';
29 | $tests[] = array($vevent2, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
30 | $tests[] = array($vevent2, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
31 |
32 | $vevent3 = clone $vevent;
33 | $vevent3->DURATION = 'P1D';
34 | $tests[] = array($vevent3, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
35 | $tests[] = array($vevent3, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
36 |
37 | $vevent4 = clone $vevent;
38 | $vevent4->DTSTART = '20111225';
39 | $vevent4->DTSTART['VALUE'] = 'DATE';
40 | $tests[] = array($vevent4, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
41 | $tests[] = array($vevent4, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
42 | // Event with no end date should be treated as lasting the entire day.
43 | $tests[] = array($vevent4, new \DateTime('2011-12-25 16:00:00'), new \DateTime('2011-12-25 17:00:00'), true);
44 |
45 |
46 | $vevent5 = clone $vevent;
47 | $vevent5->DURATION = 'P1D';
48 | $vevent5->RRULE = 'FREQ=YEARLY';
49 | $tests[] = array($vevent5, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
50 | $tests[] = array($vevent5, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
51 | $tests[] = array($vevent5, new \DateTime('2013-12-01'), new \DateTime('2013-12-31'), true);
52 |
53 | $vevent6 = clone $vevent;
54 | $vevent6->DTSTART = '20111225';
55 | $vevent6->DTSTART['VALUE'] = 'DATE';
56 | $vevent6->DTEND = '20111225';
57 | $vevent6->DTEND['VALUE'] = 'DATE';
58 |
59 | $tests[] = array($vevent6, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true);
60 | $tests[] = array($vevent6, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
61 |
62 | // Added this test to ensure that recurrence rules with no DTEND also
63 | // get checked for the entire day.
64 | $vevent7 = clone $vevent;
65 | $vevent7->DTSTART = '20120101';
66 | $vevent7->DTSTART['VALUE'] = 'DATE';
67 | $vevent7->RRULE = 'FREQ=MONTHLY';
68 | $tests[] = array($vevent7, new \DateTime('2012-02-01 15:00:00'), new \DateTime('2012-02-02'), true);
69 | return $tests;
70 |
71 | }
72 |
73 | }
74 |
75 |
--------------------------------------------------------------------------------
/lib/PostCalendar/PostCalendarEvent/News.php:
--------------------------------------------------------------------------------
1 | $this->getEvent()->getHooked_objectid(),
25 | 'SQLcache' => false);
26 | $article = ModUtil::apiFunc('News', 'user', 'get', $funcargs);
27 |
28 | $eventstatus = 1; // approved
29 | if ($article['published_status'] != News_Api_User::STATUS_PUBLISHED) { // article not published yet (draft, etc)
30 | return false;
31 | }
32 |
33 | $now = date("Y-m-d H:i:s");
34 | $diff = DateUtil::getDatetimeDiff_AsField($now, $article['from'], 6);
35 | if ($diff > 0) {
36 | $eventstatus = -1; // hide published but pending events
37 | }
38 |
39 | $this->setTitle(__('News: ', $dom) . $article['title']);
40 | $this->setHometext(":html:" . __('Article link: ', $dom) . " $article['sid'])) . "'>" . substr($article['hometext'], 0, 32) . "... ");
41 | $this->setAid($article['cr_uid']); // userid of creator
42 | $articleCreated = DateTime::createFromFormat('Y-m-d G:i:s', $article['cr_date']);
43 | $this->setTime($articleCreated);
44 | $this->setInformant($article['cr_uid']); // userid of creator
45 | $articleDate = DateTime::createFromFormat('Y-m-d G:i:s', $article['from']);
46 | $this->setEventStart($articleDate);
47 | $this->setEventEnd($articleDate);
48 | $this->setEventstatus($eventstatus);
49 | $this->setSharing(PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL);
50 |
51 | return true;
52 | }
53 |
54 | /**
55 | * convert scheduled events status to APPROVED on their eventDate for hooked news events
56 | */
57 | public static function scheduler()
58 | {
59 | $_em = ServiceUtil::getService('doctrine.entitymanager');
60 | $dql = "UPDATE PostCalendar_Entity_CalendarEvent a " .
61 | "SET a.eventstatus = :newstatus " .
62 | "WHERE a.hooked_modulename = :modname " .
63 | "AND a.eventstatus = :oldstatus " .
64 | "AND a.eventStart <= :now";
65 | $query = $_em->createQuery($dql);
66 | $query->setParameters(array(
67 | 'newstatus' => PostCalendar_Entity_CalendarEvent::APPROVED,
68 | 'modname' => 'news',
69 | 'oldstatus' => PostCalendar_Entity_CalendarEvent::HIDDEN,
70 | 'now' => new DateTime(),
71 | ));
72 | try {
73 | $query->getResult();
74 | $_em->clear();
75 | } catch (Exception $e) {
76 | LogUtil::registerError($e->getMessage());
77 | }
78 | }
79 |
80 | }
--------------------------------------------------------------------------------
/lib/PostCalendar/TaggedObjectMeta/PostCalendar.php:
--------------------------------------------------------------------------------
1 | getRepository('PostCalendar_Entity_CalendarEvent')->find($this->getObjectId())->getOldArray();
30 | // check for permission and status
31 | $permission = SecurityUtil::checkPermission('PostCalendar::Event', "$pc_event[title]::$pc_event[eid]", ACCESS_OVERVIEW);
32 | $private = ($pc_event['sharing'] == 0 && $pc_event['aid'] != UserUtil::getVar('uid') && !SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_ADMIN));
33 | $formats = ModUtil::getVar('PostCalendar', 'pcDateFormats');
34 | $timeFormat = ModUtil::getVar('PostCalendar', 'pcTime24Hours') ? "G:i" : "g:i a";
35 | if ($pc_event && $permission && !$private) {
36 | $this->setObjectAuthor("");
37 | $this->setObjectDate($pc_event['eventStart']->format($formats['date'] . " " . $timeFormat));
38 | $this->setObjectTitle($pc_event['title']);
39 | }
40 | }
41 |
42 | /**
43 | * Set the object title
44 | * @param string $title
45 | */
46 | public function setObjectTitle($title)
47 | {
48 | $this->title = $title;
49 | }
50 |
51 | /**
52 | * Set the object date
53 | * @param string $date
54 | */
55 | public function setObjectDate($date)
56 | {
57 | $this->date = $date;
58 | }
59 |
60 | /**
61 | * Set the object author
62 | * @param string $author
63 | */
64 | public function setObjectAuthor($author)
65 | {
66 | $this->author = $author;
67 | }
68 |
69 | /**
70 | * Override the method to present specialized link
71 | * @return string
72 | */
73 | public function getPresentationLink()
74 | {
75 | $date = $this->getDate();
76 | $title = $this->getTitle();
77 | $link = null;
78 | if (!empty($title)) {
79 | $dom = ZLanguage::getModuleDomain('PostCalendar');
80 | $on = __('on', $dom);
81 | $calEvent = __('Event', $dom);
82 | $modinfo = ModUtil::getInfoFromName('PostCalendar');
83 | $urlObj = $this->getUrlObject();
84 | $link = "$modinfo[displayname] $calEvent: $title ";
85 | $sub = '';
86 | if (!empty($date)) {
87 | $sub .= " $on $date";
88 | }
89 | $link .= ( !empty($sub)) ? " (" . trim($sub) . ")" : '';
90 | }
91 | return $link;
92 | }
93 | }
--------------------------------------------------------------------------------
/docs/en/Admin/Hooks_OtherModules.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Hooks and Support for Other Modules
2 |
3 |
4 | ## Hooks Support
5 |
6 | ### General Hook Support
7 |
8 | PostCalendar supports the following Core 1.3.x-based Subscriber hooks:
9 |
10 | * display_view
11 | * form_edit
12 | * form_delete
13 | * validate_edit
14 | * validate_delete
15 | * process_edit
16 | * process_delete
17 | * filter
18 |
19 | Therefore, any module that offers a Core 1.3.x-compatible hook is available in PostCalendar.
20 |
21 | ### Provided Hooks
22 |
23 | PostCalendar provides Core 1.3.x Provider hooks that are useful for other modules.
24 | Support is included for the News module. In this case, the admin and/or item creator
25 | is able to assign the PostCalendar category or able to opt-out of the hook.
26 |
27 | * **News:** when hooked, will create an event per article published. Scheduled
28 | publishing of articles is supported.
29 |
30 | Other modules can create their own API to create events as well. See the
31 | [Developer Docs][link1] for more information.
32 |
33 | ### Needle Usage (MultiHook)
34 |
35 | MultiHook development has ceased for the moment and so this is currenlty non-functional
36 |
37 | PostCalendar provides two needles that can be used in any module hooked with the
38 | MultiHook module. In order to use these (or any needles) you must have the MultiHook
39 | module installed and then hook MultiHook to that other module (for example, News).
40 | Then in that other module, you can type these needles and they will be auto-replaced
41 | by this content.
42 |
43 | * **POSTCALEVENT-{eventid-displaytype}** (example: *POSTCALEVENT-263-NDL*) replaces needle with a PostCalendar event title and link. Can include the date and time of the event with an icon if desired. Date is presented in PostCalendar-defined format.
44 | * eventid = the integer event id of the event you wish to insert. this is shown in the browser addressbar as eid=####. It is also shown in the title header of each event when viewing the event details.
45 | * displaytype = any or all of the following capital letters, in any order.(default: NLI)
46 | * N (shows the event name)
47 | * D (shows the date of the event)
48 | * T (shows the time of the event)
49 | * I (adds a small icon)
50 | * L (replaced content is a link instead of just text)
51 | * **POSTCALDATE-{date-displaytype}** (example: *POSTCALDATE-20091225-DL*) replaces needle with a PostCalendar date and link. Can include an icon if desired. Date is presented in PostCalendar-defined format.
52 | * date = the date you wish to link to in format 'YYYYMMDD'
53 | * displaytype = any or all of the following capital letters, in any order.(default: DIL)
54 | * D (shows the date of the event)
55 | * I (adds a small icon)
56 | * L (replaced content is a link instead of just text)
57 |
58 | ## Content Support
59 |
60 | PostCalendar provides support for the Content Module API with two block types.
61 |
62 | * Upcoming Events
63 | * Featured Event
64 |
65 | These two block types are identical in function to standard the Zikula blocks documented
66 | above with the exception that the Upcoming block merges today's events with all
67 | upcoming events and does not display the navigation calendar.
68 |
69 | [link1]:
70 | "PostCalendar Developer Documentation"
--------------------------------------------------------------------------------
/lib/PostCalendar/Controller/User.php:
--------------------------------------------------------------------------------
1 | redirect(ModUtil::url('PostCalendar', 'user', 'display', $args));
18 | }
19 |
20 | public function view($args)
21 | {
22 | $this->redirect(ModUtil::url('PostCalendar', 'user', 'display', $args));
23 | }
24 |
25 | /**
26 | * display calendar events in requested viewtype
27 | */
28 | public function display($args)
29 | {
30 | $this->throwForbiddenUnless(SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_OVERVIEW), LogUtil::getErrorMsgPermission());
31 | $defaultView = $this->getVar('pcDefaultView');
32 | // get the vars that were passed in
33 | $userFilter = $this->request->query->get('userfilter', $this->request->request->get('userfilter', ''));
34 | $eid = $this->request->query->get('eid', $this->request->request->get('eid', 0));
35 | $filtercats = isset($args['filtercats']) ? $args['filtercats'] : $this->request->query->get('filtercats', $this->request->request->get('filtercats', null));
36 | $jumpargs = array(
37 | 'jumpday' => $this->request->query->get('jumpDay', $this->request->request->get('jumpDay', null)),
38 | 'jumpmonth' => $this->request->query->get('jumpMonth', $this->request->request->get('jumpMonth', null)),
39 | 'jumpyear' => $this->request->query->get('jumpYear', $this->request->request->get('jumpYear', null)));
40 | $viewtype = isset($args['viewtype']) ? strtolower($args['viewtype']) : strtolower($this->request->query->get('viewtype', $this->request->request->get('viewtype', $defaultView)));
41 | $date = isset($args['date']) ? $args['date'] : $this->request->query->get('date', $this->request->request->get('date', PostCalendar_Util::getDate($jumpargs)));
42 | $prop = isset($args['prop']) ? $args['prop'] : (string)$this->request->query->get('prop', null);
43 | $cat = isset($args['cat']) ? $args['cat'] : (string)$this->request->query->get('cat', null);
44 | $popup = $this->view->getRequest()->query->get('popup', $this->view->getRequest()->request->get('popup', false));
45 |
46 | if (empty($filtercats) && !empty($prop) && !empty($cat)) {
47 | $filtercats[$prop] = $cat;
48 | }
49 |
50 | if (empty($date) && empty($viewtype)) {
51 | return LogUtil::registerArgsError();
52 | }
53 |
54 | if ($viewtype == 'event') {
55 | $this->throwForbiddenUnless(SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_READ), LogUtil::getErrorMsgPermission());
56 | }
57 |
58 | if (!is_object($date)) {
59 | $date = DateTime::createFromFormat('Ymd', $date);
60 | }
61 |
62 | $allowedViews = $this->getVar('pcAllowedViews');
63 | if ((in_array($viewtype, $allowedViews)) || ($viewtype == 'event' && $popup)) {
64 | $class = 'PostCalendar_CalendarView_' . ucfirst($viewtype);
65 | } else {
66 | LogUtil::registerError($this->__('Attempting to view unauthorized viewtype.'));
67 | $class = 'PostCalendar_CalendarView_' . ucfirst($defaultView);
68 | }
69 | $calendarView = new $class($this->view, $date, $userFilter, $filtercats, $eid);
70 | return $calendarView->render();
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/lib/PostCalendar/Version.php:
--------------------------------------------------------------------------------
1 | __('PostCalendar');
20 | $meta['url'] = $this->__(/* !used in URL - nospaces, no special chars, lcase */'postcalendar');
21 | $meta['description'] = $this->__('Calendar for Zikula');
22 | $meta['version'] = '8.0.3';
23 |
24 | $meta['securityschema'] = array(
25 | 'PostCalendar::Event' => 'Event Title::Event ID',
26 | 'PostCalendar::' => '::');
27 | $meta['core_min'] = '1.3.3'; // requires minimum 1.3.3 or later (with updated (>=1.3.5) jquery_datepicker plugin)
28 | $meta['core_max'] = '1.4.99';
29 |
30 | $meta['capabilities'] = array();
31 | $meta['capabilities'][HookUtil::PROVIDER_CAPABLE] = array('enabled' => true);
32 | $meta['capabilities'][HookUtil::SUBSCRIBER_CAPABLE] = array('enabled' => true);
33 |
34 | return $meta;
35 | }
36 |
37 | /**
38 | * Set up hook subscriber and provider bundles
39 | */
40 | protected function setupHookBundles()
41 | {
42 | $bundle = new Zikula_HookManager_ProviderBundle($this->name, 'provider.postcalendar.ui_hooks.event', 'ui_hooks', $this->__('PostCalendar Event Maker'));
43 | $bundle->addServiceHandler('display_view', 'PostCalendar_HookHandlers', 'uiView', 'postcalendar.service');
44 | $bundle->addServiceHandler('form_edit', 'PostCalendar_HookHandlers', 'uiEdit', 'postcalendar.service');
45 | $bundle->addServiceHandler('form_delete', 'PostCalendar_HookHandlers', 'uiDelete', 'postcalendar.service');
46 | $bundle->addServiceHandler('validate_edit', 'PostCalendar_HookHandlers', 'validateEdit', 'postcalendar.service');
47 | $bundle->addServiceHandler('validate_delete', 'PostCalendar_HookHandlers', 'validateDelete', 'postcalendar.service');
48 | $bundle->addServiceHandler('process_edit', 'PostCalendar_HookHandlers', 'processEdit', 'postcalendar.service');
49 | $bundle->addServiceHandler('process_delete', 'PostCalendar_HookHandlers', 'processDelete', 'postcalendar.service');
50 | $this->registerHookProviderBundle($bundle);
51 |
52 | $bundle = new Zikula_HookManager_SubscriberBundle($this->name, 'subscriber.postcalendar.ui_hooks.events', 'ui_hooks', $this->__('PostCalendar Events'));
53 | $bundle->addEvent('display_view', 'postcalendar.ui_hooks.events.ui_view');
54 | $bundle->addEvent('form_edit', 'postcalendar.ui_hooks.events.ui_edit');
55 | $bundle->addEvent('form_delete', 'postcalendar.ui_hooks.events.ui_delete');
56 | $bundle->addEvent('validate_edit', 'postcalendar.ui_hooks.events.validate_edit');
57 | $bundle->addEvent('validate_delete', 'postcalendar.ui_hooks.events.validate_delete');
58 | $bundle->addEvent('process_edit', 'postcalendar.ui_hooks.events.process_edit');
59 | $bundle->addEvent('process_delete', 'postcalendar.ui_hooks.events.process_delete');
60 | $this->registerHookSubscriberBundle($bundle);
61 |
62 | $bundle = new Zikula_HookManager_SubscriberBundle($this->name, 'subscriber.postcalendar.filter_hooks.eventcontent', 'filter_hooks', $this->__('PostCalendar Event Filters'));
63 | $bundle->addEvent('filter', 'postcalendar.filter_hooks.eventsfilter.filter');
64 | $this->registerHookSubscriberBundle($bundle);
65 | }
66 |
67 | }
--------------------------------------------------------------------------------
/templates/contenttype/postcalevent_view.tpl:
--------------------------------------------------------------------------------
1 | {pageaddvar name='stylesheet' value='modules/PostCalendar/style/style.css'}
2 |
3 | {if $loaded_event.showcountdown}
4 |
5 | {if $loaded_event.datedifference gt 0}
6 | {gt text='This event will occur in %s day.' plural='This event will occur in %s days.' count=$loaded_event.datedifference tag1=$loaded_event.datedifference domain="module_postcalendar"}
7 | {elseif $loaded_event.datedifference eq 0}
8 | {gt text='This event occurs today.' domain="module_postcalendar"}
9 | {else}
10 | {gt text='This event has already occured.' domain="module_postcalendar"}
11 | {/if}
12 |
13 | {/if}
14 |
22 |
23 | {$loaded_event.eventStart|pc_date_format:$modvars.PostCalendar.pcDateFormats.date}
24 | {if $loaded_event.alldayevent != true}
25 | {$loaded_event.startTime} - {$loaded_event.endTime}
26 | {else}
27 | {gt text='All day event' domain="module_postcalendar"}
28 | {/if}
29 |
30 |
31 | {if ($loaded_event.hometext) && ($loaded_event.hometext ne "n/a")}
32 |
33 |
{gt text='Description' domain="module_postcalendar"}:
34 | {$loaded_event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|safehtml}
35 |
36 | {/if}
37 |
38 | {if ($loaded_event.location.event_location) OR ($loaded_event.location.event_street1) OR ($loaded_event.location.event_street2) OR ($loaded_event.location.event_city)}
39 |
{gt text='Location' domain="module_postcalendar"}:
40 |
41 | {if $loaded_event.location.event_location}{$loaded_event.location.event_location} {/if}
42 | {if $loaded_event.location.event_street1}{$loaded_event.location.event_street1} {/if}
43 | {if $loaded_event.location.event_street2}{$loaded_event.location.event_street2} {/if}
44 | {if $loaded_event.location.event_city}{$loaded_event.location.event_city} {$loaded_event.location.event_state}, {$loaded_event.location.event_postal} {/if}
45 |
46 | {/if}
47 | {if ($loaded_event.contname) OR ($loaded_event.conttel) OR ($loaded_event.contemail) OR ($loaded_event.website)}
48 |
{gt text='Contact information' domain="module_postcalendar"}:
49 |
50 | {if $loaded_event.contname}{$loaded_event.contname} {/if}
51 | {if $loaded_event.conttel}{$loaded_event.conttel} {/if}
52 | {if $loaded_event.contemail}{$loaded_event.contemail} {/if}
53 | {if $loaded_event.website}{$loaded_event.website} {/if}
54 |
55 | {/if}
56 | {if $loaded_event.fee}{gt text='Fee' domain="module_postcalendar"}: {$loaded_event.fee}{/if}
57 |
58 |
59 |
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/lib/Sabre/VObject/ElementList.php:
--------------------------------------------------------------------------------
1 | vevent where there's multiple VEVENT objects.
10 | *
11 | * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
12 | * @author Evert Pot (http://www.rooftopsolutions.nl/)
13 | * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
14 | */
15 | class ElementList implements \Iterator, \Countable, \ArrayAccess {
16 |
17 | /**
18 | * Inner elements
19 | *
20 | * @var array
21 | */
22 | protected $elements = array();
23 |
24 | /**
25 | * Creates the element list.
26 | *
27 | * @param array $elements
28 | */
29 | public function __construct(array $elements) {
30 |
31 | $this->elements = $elements;
32 |
33 | }
34 |
35 | /* {{{ Iterator interface */
36 |
37 | /**
38 | * Current position
39 | *
40 | * @var int
41 | */
42 | private $key = 0;
43 |
44 | /**
45 | * Returns current item in iteration
46 | *
47 | * @return Element
48 | */
49 | public function current() {
50 |
51 | return $this->elements[$this->key];
52 |
53 | }
54 |
55 | /**
56 | * To the next item in the iterator
57 | *
58 | * @return void
59 | */
60 | public function next() {
61 |
62 | $this->key++;
63 |
64 | }
65 |
66 | /**
67 | * Returns the current iterator key
68 | *
69 | * @return int
70 | */
71 | public function key() {
72 |
73 | return $this->key;
74 |
75 | }
76 |
77 | /**
78 | * Returns true if the current position in the iterator is a valid one
79 | *
80 | * @return bool
81 | */
82 | public function valid() {
83 |
84 | return isset($this->elements[$this->key]);
85 |
86 | }
87 |
88 | /**
89 | * Rewinds the iterator
90 | *
91 | * @return void
92 | */
93 | public function rewind() {
94 |
95 | $this->key = 0;
96 |
97 | }
98 |
99 | /* }}} */
100 |
101 | /* {{{ Countable interface */
102 |
103 | /**
104 | * Returns the number of elements
105 | *
106 | * @return int
107 | */
108 | public function count() {
109 |
110 | return count($this->elements);
111 |
112 | }
113 |
114 | /* }}} */
115 |
116 | /* {{{ ArrayAccess Interface */
117 |
118 |
119 | /**
120 | * Checks if an item exists through ArrayAccess.
121 | *
122 | * @param int $offset
123 | * @return bool
124 | */
125 | public function offsetExists($offset) {
126 |
127 | return isset($this->elements[$offset]);
128 |
129 | }
130 |
131 | /**
132 | * Gets an item through ArrayAccess.
133 | *
134 | * @param int $offset
135 | * @return mixed
136 | */
137 | public function offsetGet($offset) {
138 |
139 | return $this->elements[$offset];
140 |
141 | }
142 |
143 | /**
144 | * Sets an item through ArrayAccess.
145 | *
146 | * @param int $offset
147 | * @param mixed $value
148 | * @return void
149 | */
150 | public function offsetSet($offset,$value) {
151 |
152 | throw new \LogicException('You can not add new objects to an ElementList');
153 |
154 | }
155 |
156 | /**
157 | * Sets an item through ArrayAccess.
158 | *
159 | * This method just forwards the request to the inner iterator
160 | *
161 | * @param int $offset
162 | * @return void
163 | */
164 | public function offsetUnset($offset) {
165 |
166 | throw new \LogicException('You can not remove objects from an ElementList');
167 |
168 | }
169 |
170 | /* }}} */
171 |
172 | }
173 |
--------------------------------------------------------------------------------
/templates/blocks/featuredevent.tpl:
--------------------------------------------------------------------------------
1 | {if $loaded_event.showhiddenwarning}
2 | {checkpermission component="PostCalendar::" instance="::" level="ACCESS_ADMIN" assign="ACCESS_ADMIN"}
3 | {if $ACCESS_ADMIN}
4 |
6 | {/if}
7 | {else}
8 |
9 | {if $loaded_event.showcountdown}
10 |
11 | {if $loaded_event.datedifference gt 0}
12 | {gt text='This event will occur in %s day.' plural='This event will occur in %s days.' count=$loaded_event.datedifference tag1=$loaded_event.datedifference}
13 | {elseif $loaded_event.datedifference eq 0}
14 | {gt text='This event occurs today.'}
15 | {else}
16 | {gt text='This event has already occured.'}
17 | {/if}
18 |
19 | {/if}
20 |
28 |
29 | {$loaded_event.eventStart|pc_date_format:$modvars.PostCalendar.pcDateFormats.date}
30 | {if $loaded_event.alldayevent != true}
31 | {$loaded_event.startTime} - {$loaded_event.endTime}
32 | {else}
33 | {gt text='All day event'}
34 | {/if}
35 |
36 |
37 | {if ($loaded_event.hometext) && ($loaded_event.hometext ne "n/a")}
38 |
39 |
{gt text='Description'}:
40 | {$loaded_event.hometext|notifyfilters:'postcalendar.filter_hooks.eventsfilter.filter'|safehtml}
41 |
42 | {/if}
43 |
44 | {if ($loaded_event.location.event_location) OR ($loaded_event.location.event_street1) OR ($loaded_event.location.event_street2) OR ($loaded_event.location.event_city)}
45 |
{gt text='Location'}:
46 |
47 | {if $loaded_event.location.event_location}{$loaded_event.location.event_location} {/if}
48 | {if $loaded_event.location.event_street1}{$loaded_event.location.event_street1} {/if}
49 | {if $loaded_event.location.event_street2}{$loaded_event.location.event_street2} {/if}
50 | {if $loaded_event.location.event_city}{$loaded_event.location.event_city} {$loaded_event.location.event_state}, {$loaded_event.location.event_postal} {/if}
51 |
52 | {/if}
53 | {if ($loaded_event.contname) OR ($loaded_event.conttel) OR ($loaded_event.contemail) OR ($loaded_event.website)}
54 |
{gt text='Contact information'}:
55 |
56 | {if $loaded_event.contname}{$loaded_event.contname} {/if}
57 | {if $loaded_event.conttel}{$loaded_event.conttel} {/if}
58 | {if $loaded_event.contemail}{$loaded_event.contemail} {/if}
59 | {if $loaded_event.website}{$loaded_event.website} {/if}
60 |
61 | {/if}
62 | {if $loaded_event.fee}{gt text='Fee'}: {$loaded_event.fee}{/if}
63 |
64 |
65 |
66 | {/if}
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/DateTimeParserTest.php:
--------------------------------------------------------------------------------
1 | assertEquals('+1 weeks', DateTimeParser::parseDuration('P1W',true));
14 | $this->assertEquals('+5 days', DateTimeParser::parseDuration('P5D',true));
15 | $this->assertEquals('+5 days 3 hours 50 minutes 12 seconds', DateTimeParser::parseDuration('P5DT3H50M12S',true));
16 | $this->assertEquals('-1 weeks 50 minutes', DateTimeParser::parseDuration('-P1WT50M',true));
17 | $this->assertEquals('+50 days 3 hours 2 seconds', DateTimeParser::parseDuration('+P50DT3H2S',true));
18 | $this->assertEquals(new DateInterval('PT0S'), DateTimeParser::parseDuration('PT0S'));
19 |
20 | }
21 |
22 | function testParseICalendarDurationDateInterval() {
23 |
24 | $expected = new DateInterval('P7D');
25 | $this->assertEquals($expected, DateTimeParser::parseDuration('P1W'));
26 | $this->assertEquals($expected, DateTimeParser::parse('P1W'));
27 |
28 | $expected = new DateInterval('PT3M');
29 | $expected->invert = true;
30 | $this->assertEquals($expected, DateTimeParser::parseDuration('-PT3M'));
31 |
32 | }
33 |
34 | /**
35 | * @expectedException LogicException
36 | */
37 | function testParseICalendarDurationFail() {
38 |
39 | DateTimeParser::parseDuration('P1X',true);
40 |
41 | }
42 |
43 | function testParseICalendarDateTime() {
44 |
45 | $dateTime = DateTimeParser::parseDateTime('20100316T141405');
46 |
47 | $compare = new DateTime('2010-03-16 14:14:05',new DateTimeZone('UTC'));
48 |
49 | $this->assertEquals($compare, $dateTime);
50 |
51 | }
52 |
53 | /**
54 | * @depends testParseICalendarDateTime
55 | * @expectedException LogicException
56 | */
57 | function testParseICalendarDateTimeBadFormat() {
58 |
59 | $dateTime = DateTimeParser::parseDateTime('20100316T141405 ');
60 |
61 | }
62 |
63 | /**
64 | * @depends testParseICalendarDateTime
65 | */
66 | function testParseICalendarDateTimeUTC() {
67 |
68 | $dateTime = DateTimeParser::parseDateTime('20100316T141405Z');
69 |
70 | $compare = new DateTime('2010-03-16 14:14:05',new DateTimeZone('UTC'));
71 | $this->assertEquals($compare, $dateTime);
72 |
73 | }
74 |
75 | /**
76 | * @depends testParseICalendarDateTime
77 | */
78 | function testParseICalendarDateTimeUTC2() {
79 |
80 | $dateTime = DateTimeParser::parseDateTime('20101211T160000Z');
81 |
82 | $compare = new DateTime('2010-12-11 16:00:00',new DateTimeZone('UTC'));
83 | $this->assertEquals($compare, $dateTime);
84 |
85 | }
86 |
87 | /**
88 | * @depends testParseICalendarDateTime
89 | */
90 | function testParseICalendarDateTimeCustomTimeZone() {
91 |
92 | $dateTime = DateTimeParser::parseDateTime('20100316T141405', new DateTimeZone('Europe/Amsterdam'));
93 |
94 | $compare = new DateTime('2010-03-16 13:14:05',new DateTimeZone('UTC'));
95 | $this->assertEquals($compare, $dateTime);
96 |
97 | }
98 |
99 | function testParseICalendarDate() {
100 |
101 | $dateTime = DateTimeParser::parseDate('20100316');
102 |
103 | $expected = new DateTime('2010-03-16 00:00:00',new DateTimeZone('UTC'));
104 |
105 | $this->assertEquals($expected, $dateTime);
106 |
107 | $dateTime = DateTimeParser::parse('20100316');
108 | $this->assertEquals($expected, $dateTime);
109 |
110 | }
111 |
112 | /**
113 | * @depends testParseICalendarDate
114 | * @expectedException LogicException
115 | */
116 | function testParseICalendarDateBadFormat() {
117 |
118 | $dateTime = DateTimeParser::parseDate('20100316T141405');
119 |
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/templates/plugins/function.pc_sort_events.php:
--------------------------------------------------------------------------------
1 | trigger_error(__f('%1$s: missing or empty \'%2$s\' parameter', array(
13 | 'Plugin:pc_sort_events',
14 | 'var'), $dom));
15 | return;
16 | }
17 |
18 | if (!array_key_exists('value', $params) || !is_array($params['value'])) {
19 | $view->trigger_error(__f('%1$s: missing or empty \'%2$s\' parameter', array(
20 | 'Plugin:pc_sort_events',
21 | 'value'), $dom));
22 | return;
23 | }
24 |
25 | if (!array_key_exists('sort', $params)) {
26 | $view->trigger_error(__f('%1$s: missing or empty \'%2$s\' parameter', array(
27 | 'Plugin:pc_sort_events',
28 | 'sort'), $dom));
29 | return;
30 | }
31 |
32 | $order = array_key_exists('order', $params) ? $params['order'] : 'asc';
33 |
34 | switch ($params['sort']) {
35 | case 'category':
36 | if (strtolower($order) == 'asc') {
37 | $function = 'sort_byCategoryA';
38 | }
39 | if (strtolower($order) == 'desc') {
40 | $function = 'sort_byCategoryD';
41 | }
42 | break;
43 |
44 | case 'title':
45 | if (strtolower($order) == 'asc') {
46 | $function = 'sort_byTitleA';
47 | }
48 | if (strtolower($order) == 'desc') {
49 | $function = 'sort_byTitleD';
50 | }
51 | break;
52 |
53 | case 'time':
54 | if (strtolower($order) == 'asc') {
55 | $function = 'sort_byTimeA';
56 | }
57 | if (strtolower($order) == 'desc') {
58 | $function = 'sort_byTimeD';
59 | }
60 | break;
61 | }
62 |
63 | $newArray = array();
64 | foreach ($params['value'] as $date => $events) {
65 | usort($events, $function);
66 | $newArray[$date] = $events;
67 | }
68 |
69 | $view->assign_by_ref($params['var'], $newArray);
70 | }
71 | /**
72 | * Sorting Functions
73 | **/
74 |
75 | function sort_byCategoryA($a, $b)
76 | {
77 | if ($a['catname'] < $b['catname']) {
78 | return -1;
79 | } elseif ($a['catname'] > $b['catname']) {
80 | return 1;
81 | } else {
82 | return 0;
83 | }
84 | }
85 | function sort_byCategoryD($a, $b)
86 | {
87 | if ($a['catname'] < $b['catname']) {
88 | return 1;
89 | } elseif ($a['catname'] > $b['catname']) {
90 | return -1;
91 | } else {
92 | return 0;
93 | }
94 | }
95 | function sort_byTitleA($a, $b)
96 | {
97 | if ($a['title'] < $b['title']) {
98 | return -1;
99 | } elseif ($a['title'] > $b['title']) {
100 | return 1;
101 | } else {
102 | return 0;
103 | }
104 | }
105 | function sort_byTitleD($a, $b)
106 | {
107 | if ($a['title'] < $b['title']) {
108 | return 1;
109 | } elseif ($a['title'] > $b['title']) {
110 | return -1;
111 | } else {
112 | return 0;
113 | }
114 | }
115 | function sort_byTimeA($a, $b)
116 | {
117 | if ($a['eventStart'] < $b['eventStart']) {
118 | return -1;
119 | } elseif ($a['eventStart'] > $b['eventStart']) {
120 | return 1;
121 | } else {
122 | return 0;
123 | }
124 | }
125 | function sort_byTimeD($a, $b)
126 | {
127 | if ($a['eventStart'] < $b['eventStart']) {
128 | return 1;
129 | } elseif ($a['eventStart'] > $b['eventStart']) {
130 | return -1;
131 | } else {
132 | return 0;
133 | }
134 | }
--------------------------------------------------------------------------------
/docs/en/Admin/AdministrationOptions.txt:
--------------------------------------------------------------------------------
1 | ## PostCalendar v8.0.0 Administration Options
2 |
3 | #### General Settings
4 |
5 | Item |Description
6 | ---------------------------|-----------
7 | Reset All... |This resets all admin-definable options to the default settings
8 | ...Activated without review|Do not queue up event for admin approval
9 | ...Personal Calendars... |Personal Calendars allow users to create events that only they can see. Choose a Zikula Group allowed to do so (or no group)
10 |
11 | #### Display Settings
12 |
13 | Item |Description
14 | ---------------------------------|-----------
15 | Number of events... |The number of events displayed in Admin list view (Queued/Hidden/Approved)
16 | Use 24 Hour time format |Display 13:30 instead of 1:30 PM
17 | Time Increment... |Used in dropdown on new event form for possible event lengths and start time
18 | Popup Window |changes functionality to popup a new window with event details instead of linking to full display
19 | Event details in tooltip... |Use Javascript to display event description in tooltip on mouseover
20 | Date Display Format |Choose format Dates will be displayed (see note*)
21 | First Day of Week |Which Day weeks begin with
22 | Default Calendar View |Which calendar view is displayed with no arguments in link to module
23 | Views/links available... |Choose which links and views are available to your users (see notes in template)
24 | ...months ... in list/rss |how many months into the future (from today) to display in list/rss view
25 |
26 | #### Navigation display settings
27 |
28 | Item |Description
29 | ---------------------------------|-----------
30 | Navigation Bar type |v8.0.0 adds the (default) option of using a jQuery-based navbar or use the old style (see note**)
31 | Filter Event Display |Allow users to filter events by category/user (if option available)
32 | ...jump date... year(s) before...|Number of years to display before current year in jump date selector
33 | ...jump date... year(s) after... |Number of years to display after current year in jump date selector
34 | Enable images... |Show images in the PostCalendar navigation header (or just show text links)
35 |
36 | #### Notification Settings
37 |
38 | Item |Description
39 | -----------------------------|-----------
40 | Notify about Pending Content |Posts notice in PostCalendar user templates when events queued for review
41 | Notify about USER submission |Sends email to admin on USER submission
42 | Notify about ADMIN submission|Sends email to admin on ADMIN submission
43 | Admin email Address |enter the email address to send notifications to
44 |
45 | #### TimeIt Migration
46 |
47 | PostCalendar can import events from TimeIt module. To perform the import,
48 | PostCalendar must detect a TimeIt database table named "[prefix]TimeIt_events"
49 | (note case). Here, you will find information on whether the TimeIt module table
50 | was detected and what exact table name was searched for. If your TimeIt table
51 | exists but has different name than the one specified below, rename it and click
52 | "Check again". Once this detects a table, you can complete the migration by
53 | clicking the link in the admin menu bar. See the TimeIt_Imports.txt file for
54 | more information.
55 |
56 | ## Event Default Values
57 |
58 | The values entered here will be automatically entered in the new event form. They can be changed there if needed again, but this provides a good start to quick event creation.
59 |
60 | ## NOTES:
61 | * Three standard choices are prepared. If choosing to customize it is required that *all three* types of formatting be entered.
62 | * The new NavBar uses jQuery and jQuery-UI which are included with Zikula 1.3.3+. The old style (with or without icons) uses Prototype
63 | and Scriptaculous. Load times are not dramatically different between these two options unless your theme or a block on your calendar
64 | page is also loading the other library. The new jQuery method is preferred.
65 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/List.php:
--------------------------------------------------------------------------------
1 | cacheTag = $this->requestedDate->format('Ymd');
28 | }
29 |
30 | /**
31 | * Set the template
32 | */
33 | protected function setTemplate()
34 | {
35 | $this->template = 'user/list.tpl';
36 | }
37 |
38 | /**
39 | * Set the date range of the view
40 | */
41 | protected function setDates()
42 | {
43 | $this->startDate = clone $this->requestedDate;
44 | $this->endDate = clone $this->requestedDate;
45 | $this->endDate
46 | ->modify("+" . $this->listMonths . " months");
47 |
48 | $interval = new DateInterval("P1D");
49 | $datePeriod = new DatePeriod($this->startDate, $interval, $this->endDate);
50 | $i = 0;
51 | $week = 0;
52 | foreach ($datePeriod as $date) {
53 | $this->dateGraph[$week][$i] = $date->format('Y-m-d');
54 | $i++;
55 | if ($i > 6) {
56 | $i = 0;
57 | $week++;
58 | }
59 | }
60 | }
61 |
62 | /**
63 | * Setup the view
64 | */
65 | protected function setup()
66 | {
67 | $this->viewtype = 'list';
68 | $this->listMonths = ModUtil::getVar('PostCalendar', 'pcListMonths');
69 |
70 | $prevClone = clone $this->requestedDate;
71 | $prevClone->modify("-" . $this->listMonths . " months");
72 | $this->navigation['previous'] = ModUtil::url('PostCalendar', 'user', 'display', array(
73 | 'viewtype' => $this->viewtype,
74 | 'date' => $prevClone->format('Ymd'),
75 | 'userfilter' => $this->userFilter,
76 | 'filtercats' => $this->selectedCategories));
77 | $nextClone = clone $this->requestedDate;
78 | $nextClone->modify("+" . $this->listMonths . " months")
79 | ->modify("+1 day");
80 | $this->navigation['next'] = ModUtil::url('PostCalendar', 'user', 'display', array(
81 | 'viewtype' => $this->viewtype,
82 | 'date' => $nextClone->format('Ymd'),
83 | 'userfilter' => $this->userFilter,
84 | 'filtercats' => $this->selectedCategories));
85 | }
86 |
87 | /**
88 | * Render the view
89 | * @return string
90 | */
91 | public function render()
92 | {
93 | if (!$this->isCached()) {
94 | // Load the events
95 | $eventsByDate = ModUtil::apiFunc('PostCalendar', 'event', 'getEvents', array(
96 | 'start' => $this->startDate,
97 | 'end' => $this->endDate,
98 | 'filtercats' => $this->selectedCategories,
99 | 'date' => $this->requestedDate,
100 | 'userfilter' => $this->userFilter));
101 | // create and return template
102 | $this->view
103 | ->assign('navBar', $this->navBar)
104 | ->assign('navigation', $this->navigation)
105 | ->assign('dayDisplay', $this->dayDisplay)
106 | ->assign('graph', $this->dateGraph)
107 | ->assign('eventsByDate', $eventsByDate)
108 | ->assign('startDate', $this->startDate)
109 | ->assign('endDate', $this->endDate);
110 | }
111 | return $this->view->fetch($this->template);
112 | }
113 |
114 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/lib/Sabre/VObject/Component/VAlarm.php:
--------------------------------------------------------------------------------
1 | TRIGGER;
27 | if(!isset($trigger['VALUE']) || strtoupper($trigger['VALUE']) === 'DURATION') {
28 | $triggerDuration = VObject\DateTimeParser::parseDuration($this->TRIGGER);
29 | $related = (isset($trigger['RELATED']) && strtoupper($trigger['RELATED']) == 'END') ? 'END' : 'START';
30 |
31 | $parentComponent = $this->parent;
32 | if ($related === 'START') {
33 | $effectiveTrigger = clone $parentComponent->DTSTART->getDateTime();
34 | $effectiveTrigger->add($triggerDuration);
35 | } else {
36 | if ($parentComponent->name === 'VTODO') {
37 | $endProp = 'DUE';
38 | } elseif ($parentComponent->name === 'VEVENT') {
39 | $endProp = 'DTEND';
40 | } else {
41 | throw new \LogicException('time-range filters on VALARM components are only supported when they are a child of VTODO or VEVENT');
42 | }
43 |
44 | if (isset($parentComponent->$endProp)) {
45 | $effectiveTrigger = clone $parentComponent->$endProp->getDateTime();
46 | $effectiveTrigger->add($triggerDuration);
47 | } elseif (isset($parentComponent->DURATION)) {
48 | $effectiveTrigger = clone $parentComponent->DTSTART->getDateTime();
49 | $duration = VObject\DateTimeParser::parseDuration($parentComponent->DURATION);
50 | $effectiveTrigger->add($duration);
51 | $effectiveTrigger->add($triggerDuration);
52 | } else {
53 | $effectiveTrigger = clone $parentComponent->DTSTART->getDateTime();
54 | $effectiveTrigger->add($triggerDuration);
55 | }
56 | }
57 | } else {
58 | $effectiveTrigger = $trigger->getDateTime();
59 | }
60 | return $effectiveTrigger;
61 |
62 | }
63 |
64 | /**
65 | * Returns true or false depending on if the event falls in the specified
66 | * time-range. This is used for filtering purposes.
67 | *
68 | * The rules used to determine if an event falls within the specified
69 | * time-range is based on the CalDAV specification.
70 | *
71 | * @param \DateTime $start
72 | * @param \DateTime $end
73 | * @return bool
74 | */
75 | public function isInTimeRange(\DateTime $start, \DateTime $end) {
76 |
77 | $effectiveTrigger = $this->getEffectiveTriggerTime();
78 |
79 | if (isset($this->DURATION)) {
80 | $duration = VObject\DateTimeParser::parseDuration($this->DURATION);
81 | $repeat = (string)$this->repeat;
82 | if (!$repeat) {
83 | $repeat = 1;
84 | }
85 |
86 | $period = new \DatePeriod($effectiveTrigger, $duration, (int)$repeat);
87 |
88 | foreach($period as $occurrence) {
89 |
90 | if ($start <= $occurrence && $end > $occurrence) {
91 | return true;
92 | }
93 | }
94 | return false;
95 | } else {
96 | return ($start <= $effectiveTrigger && $end > $effectiveTrigger);
97 | }
98 |
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------
/lib/PostCalendar/CalendarView/Week.php:
--------------------------------------------------------------------------------
1 | "Sunday",
23 | self::MONDAY_IS_FIRST => "Monday",
24 | self::SATURDAY_IS_FIRST => "Saturday",
25 | );
26 |
27 | /**
28 | * Set the cacheTag
29 | */
30 | protected function setCacheTag()
31 | {
32 | $this->cacheTag = $this->requestedDate->format('Ym');
33 | }
34 |
35 | /**
36 | * Set the template
37 | */
38 | protected function setTemplate()
39 | {
40 | $this->template = 'user/week.tpl';
41 | }
42 |
43 | /**
44 | * Set the date range of the view
45 | */
46 | protected function setDates()
47 | {
48 | $this->startDate = clone $this->requestedDate;
49 | if ($this->requestedDate->format('w') <> $this->firstDayOfWeek) {
50 | $this->startDate
51 | ->modify("last " . $this->dayMap[$this->firstDayOfWeek]);
52 | }
53 | $this->endDate = clone $this->requestedDate;
54 | $this->endDate
55 | ->modify("next " . $this->dayMap[$this->firstDayOfWeek])
56 | ->modify("-1 day");
57 | }
58 |
59 | /**
60 | * Setup the view
61 | */
62 | protected function setup()
63 | {
64 | $this->viewtype = 'week';
65 |
66 | $prevClone = clone $this->requestedDate;
67 | $prevClone->modify("last " . $this->dayMap[$this->firstDayOfWeek]);
68 | if ($this->requestedDate->format('w') <> $this->firstDayOfWeek) {
69 | $prevClone->modify("-7 days");
70 | }
71 | $this->navigation['previous'] = ModUtil::url('PostCalendar', 'user', 'display', array(
72 | 'viewtype' => $this->viewtype,
73 | 'date' => $prevClone->format('Ymd'),
74 | 'userfilter' => $this->userFilter,
75 | 'filtercats' => $this->selectedCategories));
76 | $nextClone = clone $this->requestedDate;
77 | $nextClone->modify("next " . $this->dayMap[$this->firstDayOfWeek]);
78 | $this->navigation['next'] = ModUtil::url('PostCalendar', 'user', 'display', array(
79 | 'viewtype' => $this->viewtype,
80 | 'date' => $nextClone->format('Ymd'),
81 | 'userfilter' => $this->userFilter,
82 | 'filtercats' => $this->selectedCategories));
83 | }
84 |
85 | /**
86 | * Render the view
87 | * @return string
88 | */
89 | public function render()
90 | {
91 | if (!$this->isCached()) {
92 | // Load the events
93 | $eventsByDate = ModUtil::apiFunc('PostCalendar', 'event', 'getEvents', array(
94 | 'start' => clone $this->startDate,
95 | 'end' => clone $this->endDate,
96 | 'filtercats' => $this->selectedCategories,
97 | 'date' => $this->requestedDate,
98 | 'userfilter' => $this->userFilter));
99 | // create and return template
100 | $this->view
101 | ->assign('navBar', $this->navBar)
102 | ->assign('navigation', $this->navigation)
103 | ->assign('eventsByDate', $eventsByDate)
104 | ->assign('startDate', $this->startDate->format('Ymd'))
105 | ->assign('endDate', $this->endDate->format('Ymd'))
106 | ->assign('requestedDate', $this->requestedDate->format('Ymd'));
107 | }
108 | return $this->view->fetch($this->template);
109 | }
110 |
111 | }
--------------------------------------------------------------------------------
/lib/vendor/sabre-vobject/tests/Sabre/VObject/TimeZoneUtilTest.php:
--------------------------------------------------------------------------------
1 | assertEquals(new \DateTimeZone('Europe/Sarajevo'), $tz);
66 |
67 | }
68 |
69 | function testUnknownExchangeId() {
70 |
71 | $vobj = <<assertEquals(new \DateTimeZone(date_default_timezone_get()), $tz);
107 |
108 | }
109 |
110 | function testWindowsTimeZone() {
111 |
112 | $tz = TimeZoneUtil::getTimeZone('Eastern Standard Time');
113 | $this->assertEquals(new \DateTimeZone('America/New_York'), $tz);
114 |
115 | }
116 |
117 | function testFallBack() {
118 |
119 | $vobj = <<assertEquals(new \DateTimeZone(date_default_timezone_get()), $tz);
152 |
153 | }
154 |
155 | }
156 |
--------------------------------------------------------------------------------