pikim / grav-plugin-events Goto Github PK
View Code? Open in Web Editor NEWThis project forked from kalebheitzman/grav-plugin-events
This plugin provides Calendar Events for Grav CMS
License: MIT License
This project forked from kalebheitzman/grav-plugin-events
This plugin provides Calendar Events for Grav CMS
License: MIT License
A useful enhancement to the plug-in would be converting individual event times from UTC/GMT (the GOOGLE .ics default) to whatever time zone the Grav site owner config specifies as the default (in our case “America/New York”). Otherwise it leaves me needing to modify several twig templates that come with this plugin, applying the |date(…,’America/New York’) filter as shown here: https://stackoverflow.com/questions/5497716/how-do-i-use-timezone-in-twig-date-filter
I'd appreciate if the location details were displayed and I'd be happy to make a PR.
How would you expect such a feature to behave? I assume it should be possible to turn it off and on. For me, the simple display of text is sufficient, but I do think that it might be interesting to link addresses and GPS coordinates to online maps.
Particularly if the latter is desired, I ask everyone involved for help, gladly with my support even in a later step that's following the first implementation!
Looks like there is an issue with the Carbon dependency. When the plugin is loaded, Grav throws errors, and at least at the top of the pile is:
"Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in /var/www/html/my_site/user/plugins/events/vendor/nesbot/c ▶"
Note, this is using PHP-8.2
This is partially referenced here:
https://stackoverflow.com/questions/74749564/laravel-carbon-carbonsetlasterrors
Hi !
If you take a look to the template on which the plugins depends. You'll see ther are missing in the plugin templates directory.
A plugin should not depend on a specific theme and should be able to work on any theme.
partials/base.html.twig and other dependencies must exists in the templates folder.
Is it clear enough for you ?
Thanks in advance
Guillaume
Those lines are duplicated in the blueprint file
header.event.status-section:
type: section
underline: true
title: Status
header.event.status:
label: Status
type: select
default: "scheduled"
options:
"": "None"
"scheduled": "scheduled"
"postponed": "postponed"
"cancelled": "cancelled"
title: Status
help: Possible values are scheduled, postponed, cancelled.
I have various weekly, monthly recurring events but even though I have changed the twig to use datetools.endOfYear it only seems to generate events for from January through to August. How do you extend this range?
{% set collection = page.collection({ 'items': { '@taxonomy': { 'type': 'event' } }, 'dateRange': { 'start': datetools.startOfWeek, 'end': datetools.endOfYear }, 'order': { 'by': 'date', 'dir': 'asc' }, 'limit': '0', 'pagination': false }) %}
Just installed the events plugin into Grav using the Admin-Backend. No folder is being created, no matter the name of the folder.
Tried running XAMPP as admin in case of read/write-errors, no success.
Since I updated to 1.1.7 Event tab in event page of type Event is not shown anymore ... I am unable to work with event metadata.
I did not try to reproduce it on fresh install anyway, but seems to conflict with the latest grav version
Grav v1.7.37.1 - Admin v1.10.37.1
You can filter an events list (= page type "events") by using the category taxanomy in the front matter like so:
content:
items:
'@taxonomy':
type: event
category: my-event-category
As far as I understood, the [email protected]
of the front matter corresponds to the form field "Taxonomy Type" which is shown in the "Events" tab of an "events"-page in the admin. Apparently, there is no such form field for filtering by category, so you have to edit the front matter manually if you want to filter by category.
Adding a form field to filter by category would be very helpful for editors of our site who are not proficient in programming. Ideally this form field would suggest existing categories just like the form field in the "Options" tab does.
It would be nice if you could generate ICS files based on the event entries. Then you could offer users the option of downloading these for their own calendar. If necessary, you could also integrate this plugin: https://github.com/wernerjoss/grav-plugin-fullcalendar
When showing the calendar page with php 7.3 and repeating events there are some errors in eventsProcessor.php
Hi, thanks for the nice plugin.
I run into html-tags being displayed in the "events"-list and "event"-items. (I use Grav v1.7.14 - Admin v1.10.14)
I figured that this can be solved by using the |raw
-filter on page.content
and page.summary
in the event_item.html.twig
template file on lines 39 and 47
.
However, in line 17
there is a –
symbol that I don't know how to filter in order to have it rendered properly by the browser. Any idea how to solve this?
Hi,
The plugin assets currently load on every page of a website, but they are usually (at least in my case) needed on only some of them. The other pages are then unnecessarily heavy.
Would it be possible to add something like an option to decide when/where the assets should be loaded ?
grav-plugin-events/blueprints/event.yaml
Line 63 in f1418dc
Hi there,
Currently, when I set the default site language to French, the days and months display the correct French words. But the first letter is capitalised. In French, days and months do not have a first capital letter.
I've been trying to see how this is set within the Events plugin, but have got a bit lost in the code. Can you help?
Thanks,
Mark
In German, the Weekday is shorted to 2 chars (instatt of 3):
grav-plugin-events/twig/DateTranslationExtension.php
Lines 104 to 107 in 836aff2
It appears Frequency is now set to "none" rather than null by the form, which triggers EventsProcessor to generate a bogus until date because freq is set.
This ultimately causes incorrect output in event_meta.html.twig which only tests for existence of fields and outputs when frequency is "none".
When I go to any page on my grav site I get the error:
"Call to a member function header() on null"
I've pasted the stack trace below.
The error disappears when I disable the events plugin.
I've not changed anything recently. However I have noticed an error appearing in the admin panel, which may or may not be related: HTTP/2 403 returned for "https://getgrav.org/blog.atom".
Any ideas what might be causing this?
Thanks!
Error thrown with message "Call to a member function header() on null"
Stacktrace:
43 Error in /home/tgbihrgd/public_html/grav/user/plugins/events/classes/eventsProcessor.php:389
42 Events\EventsProcessor:addVirtualEventsPages in /home/tgbihrgd/public_html/grav/user/plugins/events/classes/eventsProcessor.php:148
41 Events\EventsProcessor:all in /home/tgbihrgd/public_html/grav/user/plugins/events/events.php:200
40 Grav\Plugin\EventsPlugin:onPagesInitialized in /home/tgbihrgd/public_html/grav/vendor/symfony/event-dispatcher/EventDispatcher.php:264
39 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /home/tgbihrgd/public_html/grav/vendor/symfony/event-dispatcher/EventDispatcher.php:239
38 Symfony\Component\EventDispatcher\EventDispatcher:callListeners in /home/tgbihrgd/public_html/grav/vendor/symfony/event-dispatcher/EventDispatcher.php:73
37 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Grav.php:597
36 Grav\Common\Grav:fireEvent in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/PagesProcessor.php:53
35 Grav\Common\Processors\PagesProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
34 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
33 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/TwigProcessor.php:38
32 Grav\Common\Processors\TwigProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
31 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
30 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/AssetsProcessor.php:39
29 Grav\Common\Processors\AssetsProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
28 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
27 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/SchedulerProcessor.php:40
26 Grav\Common\Processors\SchedulerProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
25 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
24 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/BackupsProcessor.php:39
23 Grav\Common\Processors\BackupsProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
22 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
21 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/TasksProcessor.php:69
20 Grav\Common\Processors\TasksProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
19 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
18 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/RequestProcessor.php:64
17 Grav\Common\Processors\RequestProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
16 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
15 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/ThemesProcessor.php:38
14 Grav\Common\Processors\ThemesProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
13 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
12 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/PluginsProcessor.php:39
11 Grav\Common\Processors\PluginsProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
10 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
9 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/InitializeProcessor.php:130
8 Grav\Common\Processors\InitializeProcessor:Grav\Common\Processors{closure} in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Debugger.php:546
7 Grav\Common\Debugger:profile in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Processors/InitializeProcessor.php:131
6 Grav\Common\Processors\InitializeProcessor:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
5 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
4 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php:40
3 Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport:process in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
2 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
1 Grav\Framework\RequestHandler\RequestHandler:handle in /home/tgbihrgd/public_html/grav/system/src/Grav/Common/Grav.php:312
0 Grav\Common\Grav:process in /home/tgbihrgd/public_html/grav/index.php:47
i am trying to build a bilingual web site for a private school and all i want to do is create an event for both languages, but what happens is that when i switch into greek the same evnt appears written both in greek and in english...
is it possible to add an event status (scheduled, postponed, canceled)
Thanks in advance
Have added the ics file to the ical folder but cannot seem to read the file - any help appreciated
I forked the original grav-plugin-fullcalendar plugin.
And I would like to lake a single plugin with fullcalendar whihc reads ics files as:
Tried to install using lc. I have the problems plugin installed. Should the events plugin try to detect if ZipArchive is present before trying to run? Just a thought.
@macbook-pro htdocs % bin/gpm install events
GPM Releases Configuration: Stable
The following dependencies need to be installed...
|- Package datetools
Install this package? [Y|n] Y
Preparing to install Date Tools [v1.0.6]
|- Downloading package... 100%%7%
|- Checking destination... ok
|- Installing package...
Fatal error: Uncaught Error: Class 'ZipArchive' not found in /Applications/MAMP/htdocs/system/src/Grav/Common/GPM/Installer.php:175
Stack trace:
#0 /Applications/MAMP/htdocs/system/src/Grav/Common/GPM/Installer.php(104): Grav\Common\GPM\Installer::unZip('/Applications/M...', '/Applications/M...')
#1 /Applications/MAMP/htdocs/system/src/Grav/Console/Gpm/InstallCommand.php(655): Grav\Common\GPM\Installer::install('/Applications/M...', '/Applications/M...', Array)
#2 /Applications/MAMP/htdocs/system/src/Grav/Console/Gpm/InstallCommand.php(537): Grav\Console\Gpm\InstallCommand->installPackage(Object(Grav\Common\GPM\Remote\Package), false)
#3 /Applications/MAMP/htdocs/system/src/Grav/Console/Gpm/InstallCommand.php(339): Grav\Console\Gpm\InstallCommand->processGpm(Object(Grav\Common\GPM\Remote\Package), false)
#4 /Applications/MAMP/htdocs/system/src/Grav/Console/Gpm/InstallCommand.php(309): Grav\Console\Gpm\InstallCommand->processPackage(Object(Grav\Common\GPM\Remote\Package), false)
#5 /Applications/MAMP/htdocs/system/src/Grav in /Applications/MAMP/htdocs/system/src/Grav/Common/GPM/Installer.php on line 175
The blueprint for the events template prevents the use of Date Tools constants like datetools.startOfWeek
or DateTime relative values such as last monday
, for dateRange in the Admin interface. Worse, any such values added in the Page Expert view or edited directly, are lost if the page is saved later from the Normal view.
Unfortunately, Grav does not provide a date field which accepts relative values, but I would suggest that a normal text field would be better suited in this context, since the use of a relative date is more useful than defining a specific date (and would not destroy carefully entered values).
Small point, but a great plugin, thanks.
Hi there,
Any ideas why past events are still showing on my events page: https://www.campingledrennec.com/en/events
I'm sure this didn't used to happen.
Thanks,
Mark
Hello, as there is no google maps api key in plugin configuration, or any use of a google maps plugin dep, I get this :
Array ( [error_message] => You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account [results] => Array ( ) [status] => REQUEST_DENIED )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.