Discourse calendar plugin


(Kyungchul Shin) #1

I’ve made a plugin for registering schedules and checking it through calendar view.

This plug-in is based on discourse v1.6.1

You can find it here: GitHub - koreamic/discourse-calendar: Discourse's calendar plugin.

Features


  • Users can register schedules in any post.
  • Using calendar view, Users can show schedules.
  • The calendar can be viewed monthly, weekly, and daily.
  • Users can register all day schedule or specific time schedule.
  • Users can register one or more schedules in a post.
  • Users can enter extra contents about a schedule.

Screen shots



Best ways to announce and organize calendar event and due date discussions?
(Tom Newsom) #2

Wow, out of nowhere!

Off to test on 1.8. brb…


(Tom Newsom) #3

Doesn’t work that well I’m afraid :confused:

The Show Calendar bar appears below the subcategory list

Add Schedule button does nothing…


A fantastic start though!

My wishlist goes like:

  1. Move show/hide button to header, rather than page-wide bar
  2. Update Add Schedule button to work with new editor
  3. Provide .ics link to calendar data for integration into other calendar software, Google etc.

Also, I’d call them “Events” not “Schedules” but that’s user-editable anyway.


(lxk ) #4

This is great

Unfortunately I’ve not been able to get the scheduler to display from the post editor either


(Kyungchul Shin) #5

The button is located in post composer;s options, named ‘Add schedule’.

Yet I write user’s guide, that is my fault. sorry.


(Kyungchul Shin) #6

Thank you for your interest.
and Sorry for the late reply.

I am busy at the moment due to my heavy workloads.
but I will check the bugs and your wishlist ASAP

Thank you.


(lxk ) #7

Thanks @koreamic

I can see the button

What I mean is that the ‘Add Schedule’ button does not appear to do anything

I look forward to your updates, thanks for creating this plugin


#8

This looks indeed really good, thanks @koreamic
But I have the same issue: The button ‘Add schedule’ doesn’t do anything, no modal is popping up. The plugin itself seems to work though, when I enter

[schedule title='Test Driven Development Conference' start_date_time=2017-01-02 end_date_time=2017-01-05 all_day=true timezone_offset=+09:00]\n- Location : LA\n- Contents\n 1. TEST1\n 2. TEST2\n[/schedule]

inside the posts’ composer, I can create a schedule that appears in the calendar.

I would appreciate a fix of this issue a lot :slight_smile:


(Angus McLeod) #9

Nice work! This plugin is intense…

One change you might want to make is to use the PluginStore or PostCustomField rather than create a new table in the db for storing schedules for posts, and migrating the db when the plugin is installed.

The problem with creating a new table and then migrating the user’s db is that you can’t easily undo it if the plugin is uninstalled. See further:


(Angus McLeod) #10

I’ve just submitted a PR which fixes the bug preventing the calendar modal from appearing when composing a new post. With this minor fix, the plugin works as described by @koreamic.


(lxk ) #11

Top notch! It’s now working beautifully


(Andrew Waugh) #12

This plugin seems to break with 1.8.0.beta10. I tried installing it for the first time this morning.

There were no errors during the rebuild. The site came up but the rendering was all messed up - it looked like everything was at 300% zoom and /logs showed:

ActionView::Template::Error (undefined method `discourse_stylesheet_link_tag' for #<#<Class:0x007fe78d65bce8>:0x007fe7871de4c8> Did you mean? discourse_staff_notes_path) /var/www/discourse/app/views/
Failed to compile desktop stylesheet: Error: File to import not found or unreadable: vendor/fullcalendar/fullcalendar.scss. Parent style sheet: /var/www/discourse/plugins/discourse-calendar/ass
Failed to compile mobile stylesheet: Error: File to import not found or unreadable: vendor/fullcalendar/fullcalendar.scss. Parent style sheet: /var/www/discourse/plugins/discourse-calendar/asse
Failed to compile desktop_rtl stylesheet: Error: File to import not found or unreadable: vendor/fullcalendar/fullcalendar.scss. Parent style sheet: /var/www/discourse/plugins/discourse-calendar
Failed to compile mobile_rtl stylesheet: Error: File to import not found or unreadable: vendor/fullcalendar/fullcalendar.scss. Parent style sheet: /var/www/discourse/plugins/discourse-calendar/
Failed to compile desktop stylesheet: Error: File to import not found or unreadable: vendor/fullcalendar/fullcalendar.scss. Parent style sheet: /var/www/discourse/plugins/discourse-calendar/ass

#13

I upgraded a few days ago to v1.8.0.beta10 +3

The calendar plugin was installed before, and it still works after the upgrade.


(Andrew Waugh) #14

Interesting.

I just tried adding the calendar plugin to app.yml again and did a rebuild.

Here is what the page looks like after the rebuild:

and /logs shows the same “failed to compile” error.

Either there is a problem with the plugin not having been installed before the current beta release, or it is some kind of conflict between the calendar and my other plugins. Here are the plugins I have at the moment:

  - git clone https://github.com/discourse/docker_manager.git
  - git clone https://github.com/discourse/discourse-data-explorer.git
  - git clone https://github.com/leodavidson/discourse-reset-bump.git
  - git clone https://github.com/Ebsy/discourse-nationalflags.git
  - git clone https://github.com/discourse/discourse-staff-notes.git
  - git clone https://github.com/davidtaylorhq/discourse-whos-online.git
  - git clone https://github.com/discourse/discourse-narrative-bot.git
  - git clone https://github.com/koreamic/discourse-calendar.git

My bet is that the recent changes to styles have something to do with this.


Blank page / http error 500 after upgrading
(lxk ) #15

I got the same behavior, no styles. Mine was working previously

I also have the who’s online plugin. Rebuilding minus the calendar worked


#16

Anything new on this issue? I just upgraded my app to discourse 1.8.0.beta11 and now I got the same behavior. Solawi Dortmund No styles and this message:

Error: File to import not found or unreadable: vendor/fullcalendar/fullcalendar.scss. Parent style sheet: /var/www/discourse/plugins/discourse-calendar/assets/stylesheets/discourse-calendar.scss on line 1 of plugins/discourse-calendar/assets/stylesheets/discourse-calendar.scss @import "vendor/fullcalendar/fullcalendar"; ^ ';

./launcher rebuild app did not work for me.

What do you mean by gallery? Is there a gallery plugin?

Is there a way to get to the point before the upgrade? I’m using the backup service in discourse on a daily basis, but there are no stylesheets saved in this backup, right?

docker images -a gives me:

REPOSITORY TAG IMAGE ID CREATED SIZE local_discourse/app latest c1da1a574d92 19 minutes ago 2.58 GB <none> <none> ab678b5e6ac2 3 weeks ago 2.5 GB discourse/discourse 1.3.10 1881a9bd3afd 4 months ago 1.54 GB samsaffron/docker-gc latest 54ca424ca8d6 18 months ago 57.7 MB

Is it possible to use an older image? The one 3 weeks ago + my backups? How could I do this?


#17

I removed the calendar plugin from app.yml-file and rebuilt the app. Styles are back without the calendar.
But since the calendar feature is quite key to my community, I’m more than happy for any help for this issue.


(lxk ) #18

sorry typo, I meant calendar. There was also a broken image gallery plugin that was also in the mix at the time.

there might be a way to work around it if you don’t use launcher and build using an older image


(Sam Saffron) #19

Keep in mind, this topic is in the #plugin:broken-plugin category for a reason :persevere:


#20

Renaming the vendor .css files to .scss files fixes it for me