[nodebb-plugin-calendar] Fully featured calendar plugin for NodeBB - Testers needed
-
@anodetobb what version of the plugin? What version of NodeBB? What version of Node.js?
-
@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
-
@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] - [33mwarn[39m: [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. [33m * [39mnodebb-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 |
-
@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.
-
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:node@42ab625bf06d:/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)
-
@Frozen_byte you'll really just need to wait until I release a new version. I'll try to get that done tonight.
-
New version. Please try out
[email protected]
Note: this version requires NodeBB v1.19.6 or laternpm i nodebb-plugin-calendar@latest
Changelog:
- Compatibility with NodeBB 2.0
- Norwegian translation thanks to jeffreiffers
- Russian translation thanks to Antosik
- bump dependencies
-
@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...
-
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'srss_token
, but that's about it.