[nodebb-plugin-calendar] Fully featured calendar plugin for NodeBB - Testers needed


  • This plugin won't load for me. It just loads and times out.

    Screenshot_2021-05-15 TalkCounty com.png

    had to uninstall as it's unusable.

  • Global Moderator Plugin & Theme Dev

    @anodetobb what version of the plugin? What version of NodeBB? What version of Node.js?


  • @pitaj Hi,

    I now have the calendar page here.

    and in the admin area I see this...

    Screenshot_2021-05-15 TalkCounty com(1).png

    are all settings ok? & how do I add an event?

    many thanks 🙂


  • Am I supposed to be able to add my own events to this? I can't find out where to add them?

  • Global Moderator Plugin & Theme Dev

    @anodetobb the settings there should be fine, though you may want to shorten the "Interval on which to check for upcoming events" as right now it'll only check every 3 1/2 days and you probably want it more like every few minutes (5 minutes = 300 seconds).

    You add events by adding them to a post: https://github.com/pitaj/nodebb-plugin-calendar#how-event-creation-works


  • @pitaj Thanks very much 🙂


  • Is there a way to remove the Yes No Maybe section ?

  • Global Moderator Plugin & Theme Dev

    @dcook are you referring to seeing other people's responses or responding to the event yourself or both?


  • @PitaJ Hi @PitaJ , for NodeBB 1.19.1 we have this warning in the logs:

    2022-02-03T04:29:12.098Z [4567/3646564] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
      * nodebb-plugin-calendar
    

    But, so far I have not seen any clear problem with the plugin. FYI.


  • Currently setting up a v2.0 nodeBB Forum.
    I was confused as nodebb-plugin-calendar was listed as compatible here.

    What am I doing wrong? Do I have to use any special branch/fork?
    Installing the @latest ("nodebb-plugin-calendar": "^1.1.3") leads to this error:

    opt_nodebb_1  | 2022-05-20T13:13:30.946Z [4567/357] - info: Initializing NodeBB v2.0.0 *snip*
    opt_nodebb_1  | 2022-05-20T13:13:32.447Z [4567/357] - info: [socket.io] Restricting access to origin: *snip*
    opt_nodebb_1  | 2022-05-20T13:13:33.053Z [4567/357] - warn:    [plugins/nodebb-plugin-calendar] The plugin.json field "library" is deprecated. Please use the package.json field "main" instead.
    opt_nodebb_1  | 2022-05-20T13:13:33.054Z [4567/357] - warn: [plugins] Unable to load library for: nodebb-plugin-calendar
    opt_nodebb_1  | 2022-05-20T13:13:33.062Z [4567/357] - error: ReferenceError: define is not defined
    opt_nodebb_1  |     at Object.<anonymous> (/usr/src/app/public/src/modules/translator.js:5:1)
    opt_nodebb_1  |     at Module._compile (node:internal/modules/cjs/loader:1105:14)
    opt_nodebb_1  |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    opt_nodebb_1  |     at Module.load (node:internal/modules/cjs/loader:981:32)
    opt_nodebb_1  |     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    opt_nodebb_1  |     at Module.require (node:internal/modules/cjs/loader:1005:19)
    opt_nodebb_1  |     at require (node:internal/modules/cjs/helpers:102:18)
    opt_nodebb_1  |     at Module.require.main.require (/usr/src/app/require-main.js:8:10)
    opt_nodebb_1  |     at Object.<anonymous> (/usr/src/app/node_modules/nodebb-plugin-calendar/src/lib/index.ts:20:38)
    opt_nodebb_1  |     at Module._compile (node:internal/modules/cjs/loader:1105:14)
    opt_nodebb_1  |
    
  • Global Moderator Plugin & Theme Dev

    @Frozen_byte I think they listed it because they've provided a patch for 2.0. I haven't merged the patch or issued a new version yet.

  • GNU/Linux Admin


  • Thank you! The Fork from @baris is what I need.
    Do I have to build the fork inside the docker? Since it's not setup with dev-packages, I try to avoid this kind of tinkering.

    I have trouble getting the package built inside the docker:
    npm i "https://github.com/barisusakli/nodebb-plugin-calendar/tarball/main"
    npm activate nodebb-plugin-calendar
    ./nodebb build
    fails with the following error:

    [email protected]:/usr/src/app$ ./nodebb build
      started
    2022-05-21T12:52:34.420Z [4567/2257] - warn: [plugins] File not found: /usr/src/app/node_modules/nodebb-plugin-calendar/build/bundles/ (Ignoring)
    2022-05-21T12:52:34.421Z [4567/2257] - error: [build] Encountered error preparing for build
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
        at Object.stat (node:internal/fs/promises:660:10)
        at processDir (/usr/src/app/src/plugins/data.js:102:36)
        at async Promise.all (index 0)
        at async Data.getStaticDirectories (/usr/src/app/src/plugins/data.js:120:2)
    2022-05-21T12:52:34.422Z [4567/2257] - error: [build] Encountered error during build step
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
        at Object.stat (node:internal/fs/promises:660:10)
        at processDir (/usr/src/app/src/plugins/data.js:102:36)
        at async Promise.all (index 0)
        at async Data.getStaticDirectories (/usr/src/app/src/plugins/data.js:120:2)
    2022-05-21T12:52:34.422Z [4567/2257] - error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
        at Object.stat (node:internal/fs/promises:660:10)
        at processDir (/usr/src/app/src/plugins/data.js:102:36)
        at async Promise.all (index 0)
        at async Data.getStaticDirectories (/usr/src/app/src/plugins/data.js:120:2)
    
  • Global Moderator Plugin & Theme Dev

    @Frozen_byte you'll really just need to wait until I release a new version. I'll try to get that done tonight.

  • Global Moderator Plugin & Theme Dev

    New version. Please try out [email protected]
    Note: this version requires NodeBB v1.19.6 or later

    npm i [email protected]
    

    Changelog:


  • @PitaJ thanks 🙏

  • Community Rep

    @PitaJ Tried this for first time 1.19.7, installed via ACP not npm via terminal.

    Popped the calendar button on the nav menu.

    Click it and got a button labelled Show Only "Yes"

    Bug or Human setup/error?

  • Global Moderator Plugin & Theme Dev

    @omega do you have any errors in the js console


  • @teh_g said in [nodebb-plugin-calendar] Fully featured calendar plugin for NodeBB - Testers needed:

    I think I asked a while ago, but is it possible to add events via an ical feed to this calendar?

    The specific one I am looking to add is this one here: http://c.opencritic.com/calendar/OpenCritic.ics

    I am very interested in an ICS-export function. I've developed a calendar extension for phpBB, that can export and import ICS. I can write JavaScript, so it should be easy, to port the ICS-function to this calendar.

    The difficult/time expensive part would be to create an alternative user login. As ICS requires a simple URL to load the events from, there needs to be an extra ICS download key for each user, that can be put into the URL's query string to enable the ICS download...

    @PitaJ Maybe we can work together - with some help regarding the nodeBB's extension structure, it should be possible...

  • GNU/Linux Admin

    The difficult/time expensive part would be to create an alternative user login. As ICS requires a simple URL to load the events from, there needs to be an extra ICS download key for each user, that can be put into the URL's query string to enable the ICS download...

    @MitjaStachowiak Good news! — Each user already has an automatically generated field in their user hash called rss_token. It is semi-private key that is used in conjunction with the uid to protect RSS feeds from uid enumeration.

    You can get a user's feed token by calling await user.auth.getFeedToken(uid) (it generates one if the user account doesn't already have one.)

    There are other places where this token can be used, although right now it is only used in the RSS functionality. It will not go away (not without ample warning, anyway.) In the future, we may rename rss_token to something more generic.


    When I say that rss_token is "semi-private" I mean that it is sent to the browser in plain text (you can see it if you investigate the URL for this topic's RSS feed). It's hidden from other users insomuch that you can't easily find out someone else's rss_token, but that's about it.


Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.