[nodebb-plugin-calendar] Fully featured calendar plugin for NodeBB - Testers needed
-
@pitaj Okay, removed and reinstalled your latest from git.
It loads now and translates, but the day is still NaN and events don't appear on the calendar.
I am getting an error now:
TypeError: calendar.days[y] is undefined cal.js:339:12
Also, events do appear on the forum in the correct category, but they're not parsed correctly.
-
Alright, is this hosted publicly somewhere? I need to figure out what is actually going on. I know about the parsing thing with the posts.
I can't figure out why you're getting
NaN
. The only thing I can think of is that the appropriate data isn't being sent to the template. -
@pitaj It's just my personal site. yaricraft.com
I can make you a ftp/ssh account if you want.
AHH, I figured it out. It has something to do with widgets. I removed all my widgets and suddenly everything works now.
Any widget I use, even just plain text, breaks it. Widgets must mess up the template somehow.
-
Okay, only side widgets cause the error.
Here's the finished dom with header/footer widgets: (the cal works and the widgets disappear.)
<div id="content" class="container-fluid"> <div class="row"> <div class="col-xs-12" widget-area="header"></div> </div> <noscript></noscript> <div class="nodebb-plugin-calendar"></div> </div>
and with side widgets: (The widgets appear and the cal doesn't work.)
<div id="content" class="container-fluid"> <div class="row"> <div class="col-lg-9 col-xs-12"> <noscript></noscript> <div class="nodebb-plugin-calendar"></div> </div> <div class="col-lg-3 col-xs-12" widget-area="sidebar"></div> </div> </div>
-
Alright. I think it's fixed. Try it now.
-
@pitaj Almost
It works on cold load, but not on ajaxing.
Looks like it's because the widget areas are not loaded yet at the time you do the detach/append:
console.log('Widget Area Exists: ' + !!$('[widget-area="sidebar"]').length); var cal = $("#nodebb-plugin-calendar").detach(); $("#content").empty().append(cal);
"Successfully loaded initial data" nodebb.min.js:979:8 "Widget Area Exists: false" nodebb.min.js:1009:0 "Calendar templates loaded" nodebb.min.js:1002:8
-
@yariplus that must be because the document ready event is allready done when ajaxify does stuff.
Hmmmm...
-
@rhistina you're supposed to configure the correct category in the settings page in the ACP
-
@pitaj Thanks! Also do you have any screenshots of what it should look like when it auto posts to the category you want? Mine looks like below. Also note that I'm a total noob to NodeBB and I have no idea what I'm doing :D! So I apologize in advanced for asking questions that may seem otherwise obvious.
-
@rhistina yeah, right now it just looks like that. I'm working on getting that to work.
Do you have this on a publicly available server?
Also, about that cut off thing. Can you tell me what theme you're using and the output of typing the following command in the JavaScript console:
$("#content").children()
Thanks
-
Can you explain how the privledges work, it seems a bit confusing to me, can anyone create an event or only the group you assign in the admin panel? I can't create an event even though i've assigned the moderator group access.. I just get "no privledge" error in nodebb dev
Maybe i have done something wrong... looks good though
-
@chas the global privileges are set up in the plugin settings page in the ACP. I tried to make that setup the category permissions automatically, but it may not work perfectly. Check the permissions for the category, and make sure the use has permissions to post in it.
-
I think anything i put into the ACP calendar permissions crashes. I add the "Staff" group i made to all three Global privledges, and choose 4 as the category i want to post the event under.
Im running latest Master pulled today. and as soon as i click "Save Changes" on the Calendar settings i get this in the dev log
15/5 12:28 [23010] - warn: Route requested but not found: /uploads/av-1323.png
15/5 12:30 [23010] - error: TypeError: Cannot call method 'replace' of undefined
at parse (/home/chas/nbb/nodebb/node_modules/nodebb-plugin-emoji-extended/index.js:1:6612)
at Object.module.exports.parse [as method] (/home/chas/nbb/nodebb/node_modules/nodebb-plugin-emoji-extended/index.js:1:7006)
at /home/chas/nbb/nodebb/src/plugins/hooks.js:89:12
at /home/chas/nbb/nodebb/node_modules/async/lib/async.js:272:13
at iterate (/home/chas/nbb/nodebb/node_modules/async/lib/async.js:149:13)
at /home/chas/nbb/nodebb/node_modules/async/lib/async.js:160:25
at /home/chas/nbb/nodebb/node_modules/async/lib/async.js:274:17
at Object.Markdown.parseRaw [as method] (/home/chas/nbb/nodebb/node_modules/nodebb-plugin-markdown/index.js:105:5)
at /home/chas/nbb/nodebb/src/plugins/hooks.js:89:12
at /home/chas/nbb/nodebb/node_modules/async/lib/async.js:272:13
[cluster] Child Process (23010) has exited (code: 1, signal: null)
[cluster] Spinning up another process... -
@chas the emoji extended plugin is causing an error for you. Try disabling that plugin and trying again.
-
Somehow I forgot to respond to this. Very cool. This intrigues me:
Support for (optionally) using arasbm's Whoisin plugin to power the response system
Did you create your own hook or something?
action:plugins.calendar.add
or something like that? -
@psychobunny no, I just detect if the who is in plugin exists, and if the user wants to use it, then I use it.
The who is in plugin has an external method, so when I require it in the init method, I check for that and use it to do stuff.
Come to think of it, I might not have it implemented yet in v0.2.0
-
It'd be cool to have a hook like that so you personally don't have to maintain the code (and others can easily tap into your plugin)
-