kalebheitzman / grav-plugin-events Goto Github PK
View Code? Open in Web Editor NEWThis plugin provides Calendar Events for Grav CMS
License: MIT License
This plugin provides Calendar Events for Grav CMS
License: MIT License
Just wanted to suggest that creating events via admin would be awesome. Grav now supports blueprints extensions so it may be possible to add on to existing page editing and add options to edit event.
If I have the time I might create a pull request
I tried installing this on a 1.1 Release Candidate and in said it installed fine, but the site is throwing errors. Any chance for an update on this plugin?
Site with error: http://test-apps.xarcell-studios.com/grav-rc1/grav-admin/
The only other plugin installed is the admin plugin.
I've been playing around with the settings of the events and I can't seem to get an event to repeat on the last day of a month. Is there a trick to make this work?
Hi. This isn't exactly a bug, but this seemed like the best place to ask. I went to install this plugin with bin/gpm but got Nothing to install
. Then I looked and realized you just published it yesterday so maybe it's not even finished, much less in the plugin directory.
But I'm looking for something to allow a non-developer client to easily create and delete events from grav admin, which would then populate an events page. Is that what this plugin is? And if so, is it usable yet?
Thanks.
Hello,
Is it planned to make the calendar responsive?
Regards
Stefan
Hi,
If you look at this page, you will see event on several days like:
It leads to following code:
<li class="even">
<a href="/calendriers_resultats/agenda/ligue-laser-trophee-equinoxe">Samedi 18 - Régate de Ligue Laser Trophée Equinoxe</a>
</li>
<li class="odd">
<a href="/calendriers_resultats/agenda/ligue-laser-trophee-equinoxe/16e910">Dimanche 19 - Régate de Ligue Laser Trophée Equinoxe</a>
</li>
The 1st link /calendriers_resultats/agenda/ligue-laser-trophee-equinoxe
will work but not /calendriers_resultats/agenda/ligue-laser-trophee-equinoxe/16e910
.
I'm up to date with Grav & plugins versions.
On template side, code is:
{% for event in events %}
[...]
<li class="{{ cycle(['odd','even'], loop.index0) }}"><a href="{{ event.url }}">{{ 'DAYS_OF_THE_WEEK'|ta(event.header.event.start|date("N")-1) }} {{ event.header.event.start|date("j") }} - {{ event.menu }}</a></li>
[...]
{% endfor %}
With events
being:
{% set events =
page.collection({
'items': {
'@taxonomy': {
'type': 'event',
}
},
'dateRange': {
'start': datetools.today|date('m/d/Y'),
'end': datetools.parseDate('+12 month')|date('m/d/Y')
},
'order': {
'by': 'date',
'dir': 'asc'
},
'pagination': true
})
%}
How could we make it work ?
Let me know if you need more details.
Thanks,
Nicolas
Hey guys, I read through your readme and did as suggested but have had no success with getting an event to show up on my page. I used an example frontmatter from the readme and added new dates to it, and didn't add anything to the page content itself as I couldn't find anything in the readme suggesting I'd need to. Is there something I'm overlooking? Thanks.
URL in question
http://beta.thehouseofindie.com/events/indie-game-salon
Frontmatter in use
event:
title: 'Indie Game Salon'
start: '29/06/2016 8:00pm'
end: '29/06/2016 12:00am'
repeat: W
freq: monthly
I have a site with dozens of events on it (shows for a musician) and most have no end date, only a start date. This site works perfectly fine on a live server but I downloaded it today to make some changes on my local server and the site crashed with error: "Undefined index: end". This was highlighted in eventsProcessor.php:
On one hand this makes sense, it's looking for an event end date and none of my events have that. On the other hand, I have no problems on my live server. Any ideas why?
Perhaps a check could be added to eventsProcessor.php to only add the end date to the event object if the end date exists. I tried this out and it works great:
if ( isset( $event['end'] ) ) {
$carbonEvent['end'] = Carbon::parse( $event['end'] );
}
I know this is far fetched, but this is a feature request for iCal support.
Hi,
I would like to translate all the weekly, daily and other terms which are specific to your plugin in French to use your plugin in a clean way.
Is there a reference file in which I can find all labels and manage the translation ? I saw the languages.yml
file but seems quite incomplete ; so what's the best way to contribute translation to your plugin ?
Thanks,
Nicolas
Tried to add the Events plugin from the Admin to a vanilla Grav install, but the result (right on the screenshot) looks broken, compared to what is on the demo page (on the left).
It looks like a whole set of css-rules does not get applied (missing references to the stylesheet?). The only thing I detect that is different: in the demo, there is a section.calender-table around the table.calendar element.
Any idea if I might have done something wrong?
v1.0.13 crashes on front page load
Whoops\Exception\ErrorException thrown with message "Invalid argument supplied for foreach()"
Stacktrace:
#16 Whoops\Exception\ErrorException in /var/www/public_html/classes/thesis/user/plugins/events/classes/events.php:297
#15 Whoops\Run:handleError in /var/www/public_html/classes/thesis/user/plugins/events/classes/events.php:297
#14 Events\Events:initEventStack in /var/www/public_html/classes/thesis/user/plugins/events/classes/events.php:216
#13 Events\Events:instances in /var/www/public_html/classes/thesis/user/plugins/events/events.php:196
#12 Grav\Plugin\EventsPlugin:onPagesInitialized in /var/www/public_html/classes/thesis/vendor/symfony/event-dispatcher/EventDispatcher.php:184
#11 call_user_func in /var/www/public_html/classes/thesis/vendor/symfony/event-dispatcher/EventDispatcher.php:184
#10 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /var/www/public_html/classes/thesis/vendor/symfony/event-dispatcher/EventDispatcher.php:46
#9 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /var/www/public_html/classes/thesis/vendor/rockettheme/toolbox/Event/src/EventDispatcher.php:23
#8 RocketTheme\Toolbox\Event\EventDispatcher:dispatch in /var/www/public_html/classes/thesis/system/src/Grav/Common/Grav.php:310
#7 Grav\Common\Grav:fireEvent in /var/www/public_html/classes/thesis/system/src/Grav/Common/Processors/PagesProcessor.php:18
#6 Grav\Common\Processors\PagesProcessor:process in /var/www/public_html/classes/thesis/system/src/Grav/Common/Grav.php:121
#5 Grav\Common\Grav:Grav\Common\{closure} in /var/www/public_html/classes/thesis/system/src/Grav/Common/Grav.php:396
#4 Grav\Common\Grav:Grav\Common\{closure} in /var/www/public_html/classes/thesis/system/src/Grav/Common/Grav.php:372
#3 call_user_func_array in /var/www/public_html/classes/thesis/system/src/Grav/Common/Grav.php:372
#2 Grav\Common\Grav:__call in /var/www/public_html/classes/thesis/system/src/Grav/Common/Grav.php:122
#1 Grav\Common\Grav:measureTime in /var/www/public_html/classes/thesis/system/src/Grav/Common/Grav.php:122
#0 Grav\Common\Grav:process in /var/www/public_html/classes/thesis/index.php:45
v1.0.12 was working find, and everything else works once the plugin is removed.
Any ideas?
The demo site is down.
Sadly, since there's no demonstration page, it is hard for me to understand how this plugin "should" work. As for now I added an event. I expected to coordinates to be collected to display the google map or sth. Actually this doesn't work. And: when displaying a single event, the location is displayed nowhere. I there some documentation for the location feature?
Hey,
I set an start and end date for each event. In my calendar is just the start of the event shown and that twice. So it should be like in my apple calendar. Where the event is shown on every day between the start and end date.
Also on every 16th of the month it gives the current day class. That should be just today not the next 16th.
There are few code errors that leads to various issues when trying to validate event page. Here are some of them in events.html.twig
An img element must have an alt attribute, except under certain conditions.
<div class="featured-event-masthead">
{% set image = event.media.images|first %}
{% if image != null %}
{{ image.cropZoom(1200,400).html }}
{% endif %}
<h3 class="featured-event-title"><a href="{{ event.url }}">{{ event.title }}</a></h3>
</div>
Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag.
<a href="{{ event.url }}" class="event-button" />{{ 'PLUGIN_EVENTS.EVENTS.BUTTON'|t }}</a>
Section lacks heading. Consider using h2-h6 elements to
<section class="featured-events">
I only tried validate page created by events.html.twig, haven't validate other pages.
I am testing out this great extension as I am testing Grav. For some reason events past 12/25/2016 start date do not show up on the page designated as the events page. I also made sure the extensions setting "Months Out to Display Events" is set to 12. Are there any additional settings that I may have missed.
Dear maintainer, i can imagine this might be a minor configuration issue, but i couldn't come up with a solution myself:
Setup:
Kind regards,
snapdeb
admin crashes on save event plugin after installation 1.0.6 update
Whoops \ Exception \ ErrorException (E_RECOVERABLE_ERROR)
COPY
Argument 1 passed to Grav\Common\Data\Blueprint::mergeArrays() must be of the type array, string given, called in /Library/WebServer/Documents/ami/system/src/Grav/Common/Data/Blueprint.php on line 276 and defined
Note: 100% repeatable
This is a very strange situation as the GRAV update has partially broken event plug-in. After reversing the update, everything is ok. It doesn't work in parsing the events and displaying them on an event page using events.html.twig.
In the calendar template, a current day is shown in each month (eg, on 22 June, the 22 August, September, October etc have the class 'current'.)
Quick fix is to add this before line 54 in calendar.html.twig: {% set month = "now"|date("F") %}
and add a check to line 58: {% if (day == calendar.currentDay) and (month == calendar.date|date("F")) %}
well. The demo page on http://grav.brandr.co/calendar is offline, it seems.
By modifying your changelog format, you are actually breaking it on the getgrav.org site. Changelog should be like this exactly:
# v1.0.10
## 02/11/2016
1. [](#new)
* Added new `Page::contentMeta()` mechanism to store content-level meta data alongside content
* Added Japanese language translation
1. [](#improved)
* Updated some vendor libraries
1. [](#bugfix)
* Hide `streams` blueprint from Admin plugin
* Fix translations of languages with `---` in YAML files
Yours is looking like this:
After reading the readme a couple of times and reviewing the GIST. I moved the yaml files over to my theme. Events tab shows up. I create a test event using it however it never makes it to the calendar.
Any help is greatly appreciated.
Calendar Test - http://rbiraptors.com/grav/calendar
Calendar twig - calendar.html.twig.txt
Calendar MD - calendar.md.txt
Test event - test.md.txt
I am trying to grasp the grav techniques and unfortunately got stuck. I am doing the website for culture center and it is essential to have some kind of events.
If I am making a collection with
content: items: '@taxonomy': type: event
I am getting only upcoming events. I tried to use
content: items: '@page.descendants': /events
and I do get the past events displayed but if I sort them by date
dateRange: start: 1/1/2014 end: 1/1/2016
I am not getting any.
I was hopping for archive plugin to sort it out somehow, but it doesn't show anything as well.
Probably I am missing something.
I'm just after detail on how this should be configured.
I've set up:
Events page of type events. http://mermaids.woolnough.com.au/events/
Event pages underneath that http://mermaids.woolnough.com.au/events/sunday-training
Seperate calendar page (currently called schedule): http://mermaids.woolnough.com.au/schedule
The event pages do no display on the events page or the calendar.
I tried placing the following frontmatter in events, but didnt have any effect:
title: Events
collection:
'@items':
'@taxonomy.type': event
Hi,
So i assigned the event
page type to a test page named "Presentation". Now, with menu, I see this page and all the coming events (which I would like to avoid). Is it a bug ? How can I fifter out the generated events from my menu ?
What I have when I'm on the "Presentation page":
What I have when I click on an event (ie link to given event, http://localhost:8080/le-club/presentation/evt:73b402 and the original content is still as 1st result)):
If I'm on a non event content, rendering is:
If people search for a "calendar" plugin, Events
doesn't show up. For this reason, I think the calendar
tag should be added.
Hi,
I love your plugin. It spared me lots and lots of time. However, my current project needs to be in German. The dates, however, I only get in English. They need to be German, as well. Where can I change the locale? I couldn't find that in your documentation.
Thanks in advance
Kim
After updating the event plugin to 1.0.6., about fifteen non-repeating events from a collection are shown with duplicates. Not all items are duplicated. The list is built by iterating over a collection of event pages. The pages themselves appear untouched. The uri's of the duplicates have the form original-event-uri-HEXNUM
Note: this never happened before the update.
Events page currently displays:
Weekly on U until April 3, 2025
instead of:
Weekly on Sunday until April 3, 2025
Hi,
Starting with Grav, i'm not yet clear about how I should add your plugins to the default page ; could you please precise it ?
I read docs about blueprint but so far, I'm not clear about how I should manage this.
Thanks in advance,
Nicolas
Event expects to be on multiple days.
displays:
Repeats Weekly , and Sunday Until April 3, 2025
instead of:
Repeats Weekly each Sunday Until April 3, 2025
Hi,
I would like to customise the event on admin side to add a few fields.
So I created a blueprint in my template named eventcvsq.yml
containing:
title: Event CVSQ
'@extends':
type: event
context: blueprints://event
form:
fields:
tabs:
fields:
contact:
type: tab
title: Event
fields:
header.event.cvsq_type:
type: select
label: Event CVSQ
options:
'ml': 'Manches Libres Laser'
'cf': 'Championnat de Flotte Laser'
'fc': 'Fête du club'
'al': 'Animation Libre Laser'
'rc': 'Régate CVSQ'
'ce': 'Coupe Entreprise'
'au': 'Autre'
So on admin side, it works as expected.
My need would be at the end to filter on "@taxonomy.type": "eventcvsq"
like this:
<div class="row actualite" data-equalizer data-equalize-on="medium" id="cvsq-actualite">
<div class="small-12 medium-4 large-4 columns">
<div class="cvsq-block" data-equalizer-watch>
<h4>Prochains événements</h4>
{% set events =
page.collection({
'items': {
'@taxonomy.type': 'eventcvsq',
},
'dateRange': {
'start': datetools.today,
'end': datetools.endOfYear
},
'order': {
'by': 'date',
'dir': 'asc'
},
'limit': 15
})
%}
{% for child in events %}
{% include 'partials/event_homepage.html.twig' with {'eventcvsq':page, 'page':child, 'truncate':true} %}
{% endfor %}
</div>
</div>
I also added in the plugin setup the eventcvsq
for the "Event template types"
But I have no output. When I use dump(child.taxonomy)
, I can see that my new events does not have the taxonomy.type added automatically, in opposite to defaults events.
How could I propagate the taxonomy.type to my custom events ? I don't strictly need that I have a type
that match eventcvsq
, I at least need that it's attached to type
is equal to event
.
And for the calendar
and events
page, it does not show up neither :(
Thanks,
Nicolas
With the new release of grav, plugin broke entire site. Just as an FYI.
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.