[nodebb-plugin-blog-comments] Blog Commenting Engine (Ghost, Wordpress widget)


  • Admin

    @Ezra-Sharp What error is shown in NodeBB when you try to publish a comment?


  • Admin

    hey, did you remember to set up the blog's URL in the ACP? Also, what version of NodeBB are you running?



  • @julian there is no error in NodeBB as Nginx just drops the 502 error, the request seems not to make it to Node.. which is really weird. I mean the article wont actually publish to NodeBB from the blog. SO I can't exactly test any comments yet.

    @psychobunny yes, I setup the blogs URL and category ID. And running v4.3.

    When I try and simulate the request, I get a 403 {
    "error" : "Forbidden"
    }

    out of express.

    All is well! πŸ™‚ had some JSON issues getting the blog deets, once I got that right it worked! πŸ˜„



  • @psychobunny said:

    Wordpress integration is finally here πŸ˜‰ Check out the repo for setup instructions. Go for a test drive on my blog:

    For me, the WordPress integration does not work. e.g.:

    WordPress: example.com
    NodeBB: sub.example.com
    Console: XMLHttpRequest cannot load http://sub.example.com/comments/get/XXX/0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not allowed access.

    I'll try to add the 'Access-Control-Allow-Origin' header with nginx.



  • @nodecode said:

    @psychobunny said:

    Wordpress integration is finally here πŸ˜‰ Check out the repo for setup instructions. Go for a test drive on my blog:

    For me, the WordPress integration does not work. e.g.:

    WordPress: example.com
    NodeBB: sub.example.com
    Console: XMLHttpRequest cannot load http://sub.example.com/comments/get/XXX/0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not allowed access.

    I'll try to add the 'Access-Control-Allow-Origin' header with nginx.

    Okay, I think I've found the error. The posts were not loaded into the forum, therefore, returns the URL http://sub.example.org/comments/get/XXX/0 "502 Bad Gateway", and sets, unlike the plugin is written, no Access-Control-Allow-Origin header.



  • So now that the permissions system is more or less rocking, does this mean something like this will be possible? πŸ˜€

    https://github.com/psychobunny/nodebb-plugin-blog-comments/issues/2


  • Admin

    When I revamped the groups and permissions system, I did have plugins in mind when I did it. Right now it's not possible for a plugin to introduce permissions, although at a later date, possibly.



  • Integrated with Ghost and is working well πŸ™‚



  • @julian Don't know how I missed your post here. πŸ˜†

    Would it be possible for a plugin to check what group a user is in? Similar to the if isAdmin currently. Or is this what you were referring to?

    My plan is to have a group, with everyone who can post using this plugin inside that group. πŸ™‚ (Once it supports multiple sites)


  • Admin

    @a_5mith, it depends on the hook, but in general, if you have the uid, you'll be able to make a call to the Groups library to check for group membership, yes.

    Where did you want to have this done?



  • @julian No idea. πŸ˜†

    The plan was to have multiple Wordpress powered sites using my forum as a comments platform, anyone in a certain group could use the comments system on their site. It's going back to this post that I made back when it only supported Ghost.

    @psychobunny liked the idea and was added as an issue on github.


  • Admin

    Okay so just to recap, I've updated this plugin:

    you can add multiple blogs to your forum. You can have all blogs posting to one category, or you can set a unique category for each separate blog.

    Also, it doesn't have to be of the same blog type, so you can do WP and Ghost, for example.

    It now supports:

    • Multiple blogs
    • Allow users in a publishers group to gain access to publishing rights


  • This is really lovely.

    I was just wondering though whether Google would impose a duplicate content penalty if the comments are both on the blog post and in the forum.

    Any thoughts?



  • @art it only posts a snippet, there's a link to read more after the first paragraph or so.



  • Can't seem to get this working. 😞 Not getting any option to post it from my wordpress install over on koding.


  • Admin

    Hmm, are you logged in as admin on your NodeBB? Also check your console when you refresh your WP article, and let me know if you run into any errors



  • @psychobunny
    Ok, realised my error... πŸ˜†

    Didn't change your.nodebb.org to my own website, now I have.

    Think it may be because Koding can't write to apache.

    New Errors:

    Uncaught TypeError: Cannot assign to read only property 'className' of 0 wordpress.js:89
    GET http://a5mith.kd.io/api/get_post/?post_id=1 404 (Not Found) wordpress.js:166XHR.onload wordpress.js:166
    Unable to access API. Please install the JSON API plugin located at: http://wordpress.org/plugins/json-api 
    

    I have the plugin installed.

    As an additional bit of feedback, comma delimited may run into issues further down the line, as it's not abundantly clear that if I have 10 blogs, but only 1 of them should go into a different category. If I'd have to do 9 comma delimited categories of where the first 9 go, then 1 for the last, or if it will post to them both. May be worth using a similar form to baris RSS plugin. So each blog has it's own fields.

    When I click Publish anyway, i get

    Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:689:11)
    at ServerResponse.header (/home/a_5mith/35hz/node_modules/express/lib/response.js:595:10)
    at ServerResponse.send (/home/a_5mith/35hz/node_modules/express/lib/response.js:143:12)
    at ServerResponse.json (/home/a_5mith/35hz/node_modules/express/lib/response.js:229:15)
    at /home/a_5mith/35hz/node_modules/nodebb-plugin-blog-comments/library.js:153:10
    at Object.Topics.post (/home/a_5mith/35hz/src/topics/create.js:89:11)
    at /home/a_5mith/35hz/node_modules/nodebb-plugin-blog-comments/library.js:135:11
    at /home/a_5mith/35hz/node_modules/async/lib/async.js:592:17
    at done (/home/a_5mith/35hz/node_modules/async/lib/async.js:135:19)
    at /home/a_5mith/35hz/node_modules/async/lib/async.js:32:16

  • Admin

    The second error is happening because it can't access data found at:
    http://a5mith.kd.io/api/get_post/?post_id=1

    You said you installed the JSON API plugin, but did you activate it? (I'm actually not sure if you need to activate it)



  • @psychobunny Yepp, activated, even went in and activated all the parts of the plugin, to make sure it wasn't that. πŸ˜•

    I'll delete it and try again. It's possibly koding at fault. I'll throw together a quick droplet and test that way.

    Ok, got this working on Digital Ocean, had the same error. But this plugin won't work if you use post_id rather than pretty permalinks. I couldn't change this on koding as wordpress didn't have write access to htaccess. However this now works on Digital Ocean.

    Thanks a lot.


  • Admin

    I'm working on a new version that will be cross-compatible with any CMS, etc. It won't be for a while because I'm a bit busy with the new theme and stuff, but yeah, I'm glad that you figured it out πŸ™‚

    EDIT: I'm not 100% sure what you mean tbh, I only had a chance to test it out on my own WP blog. So if you don't use pretty permalinks, this will not work?


 

| |