psychobunny / nodebb-plugin-blog-comments Goto Github PK
View Code? Open in Web Editor NEWLets NodeBB act as a comments engine/widget for your blog
License: BSD 2-Clause "Simplified" License
Lets NodeBB act as a comments engine/widget for your blog
License: BSD 2-Clause "Simplified" License
As in the subject, sorry if it's already in the works.
Just wondering whether I should downgrade back or wait.
error: Error: 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:144: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
Mo Info - When selecting submit this post to NodeBB (needs changing to site title as in #9), the forum crashes on the page of "error": "Only Administrators or members of the publishers group can publish articles"
, NodeBB itself crashes with the error above at the same time. Usernames were the same, but emails weren't. How does it check?
There seems to be an issue with the latest Ghost where the nodebb comments are replicating the content after where they are inserted. For example, here is an image of the post with nodebb comments removed:
And here is the same post with nodebb inside the post:
The code I am commenting in and out is this:
<a id="nodebb-comments"></a>
<script type="text/javascript">
var nbb = {};
nbb.url = 'myurl';
(function() {
nbb.articleID = '{{../post.id}}'; nbb.title = '{{../post.title}}';
nbb.tags = [{{#../post.tags}}"{{name}}",{{/../post.tags}}];
nbb.script = document.createElement('script'); nbb.script.type = 'text/javascript'; nbb.script.async = true;
nbb.script.src = nbb.url + '/plugins/nodebb-plugin-blog-comments/lib/ghost.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb.script);
})();
</script>
<script id="nbb-markdown" type="text/markdown">{{{../post.markdown}}}</script>
<noscript>Please enable JavaScript to view comments</noscript>
So there seems to be something weird with the nodebb insert also inserting part of the post.
I get the following error after following the instructions for installation. This error appears when viewing the ghost blog entry.
XMLHttpRequest cannot load http://forum.[domain].com/comments/get/2/0. The 'Access-Control-Allow-Origin' header contains the invalid value 'undefined'. Origin 'http://blog.[domain].com' is therefore not allowed access.
I see in the library.js you are setting the "Access-Control-Allow-Origin" headers so I am not entirely sure why it isn't working. Maybe the meta.config['blog-comments:url']
isn't being set properly.
Any help would be much appreciated.
The cactcha is not working when trying to register a new account through this plugin (including on Nodebb.org).
(We see the same behaviour on mysensors.org after upgrading NodeBB to latest)
Trying to grasp how the captcha javascript get initialised and loaded but fail.. Do you have any quick fix for this @psychobunny?
Currently, whatever I entered in the categoryId in setting page not has any effect.
It's still posting articles to catID 1 which is "Announcement" for me. I want it to post into "Comments" category so I changed the category id to 4 but no change. I entered another id which is 2 for example. Still post to the categoryid 1.
The JSON API wordpress addon recommended by this plugin (https://wordpress.org/plugins/json-api/) is rather outdated, and does not work on some blogs running WordPress 4.0+. Is this plugin compatible with the WordPress JSON API bundled with Jetpack:
http://jetpack.me/support/json-api/
I tried using the Jetpack bundled JSON API module, but it fails to pull or push comments. This plugin (https://wordpress.org/plugins/json-api/) is obsolete as of WordPress 3.9.
Hi there
was just wondering if you had any plans to try and make this compatible with the pencilblue cms
or
is it already compatible and im just being stupid?
Hi,
Is there a way to either show old comments OR import wp comments into nodebb and use nodebb comments as default ?
Because if i do this, i will end not showing my old comments on blog which is really helpful for readers !
Hi this is a feature request to allow posting to different categories depending on the wordpress source category.
Is this something that is in the works?
Thanks.
Is it compatible with the nodebb 1.x ?
Would it be possible to allow anonymous visitors (users not logged in to nodeBB serving comments) to post comments?
I'm using the plugin with a Ghost instance and have enabled (in nodeBB) replying to topics by guests for the category in which the blog comment threads are posted, even allowed guests to choose a handle, but on the blog they're still prompted to either log in or register when adding a comment.
It would be great if they could just post with a chosen nickname like you usually can in regular blog comments.
On the readme file installation instructions the code contains this:
<script id="nbb-markdown" type="text/markdown">{{{../post.markdown}}}</script>
But on posts that have external embeds such as twitter tweet embeds, github code embeds, instagram embeds and possible others, the code from the post breaks the page rendering because the script tag will be closed sooner that was suppose to, causing a HTML dump after the commenting box.
The blog post content is displayed once and then the comment box.
The blog post content is displayed once then the comment box, then a markdown dump of everything after the closing script tag is presented in the page.
Hello, I was wondering if there is any support for a nodebb plugin to use for comments in github pages (static pages hosted via github)?
Hi, I'm suddenly purge one of topics that is for my blog, so I can't publish it again and I don't have topic with that id.
When removing a topic used by this plugin, the comments module will still appear as activated but empty in the blog. I think it should display again the "Publish this article to NodeBB" button instead. The way to do it manually is removing the keys stored in blog-comments
hash in Redis (HDEL blog-comments key
).
Usually there is no need to remove a topic and all its comments but I was testing in localhost and had some troubles with it.
via this report:
I've got the blog comments plugin integrated on my ghost blog and have some unexpected behavior in http://blogs.tapestrymaker.net/welcome-to-tapestrymaker/
Things were fine when I first posted it; I left a couple comments and it looked great. Since then I deleted a comment and edited the post in both ghost and nodebb. Now, The blog's text is getting echoed back as a comment. But when I go directly to the nodebb forum at http://forums.tapestrymaker.net:4567/topic/3/welcome#4 there is no such comment.
take a look at https://github.com/revir/nodebb-plugin-blog-comments2
is it possible make it work with NodeBB v1.4.1. and ghost 0.11.3
in my setup only the button "publish this article" works well
but login and registration button does not show and also the comments count show zero even there are comments in nodeBB
thanks
This could confuse people using the comments, thinking they'd be taken to NodeBB, then original topic taking them to another website. Perhaps it should be Powered by "site title". :)
Seeing as NodeBB now supports tags we can make it so the comment thread created by the plugin automagically contains the tags used in the Ghost blog post.
This will be a clean room implementation seeing as the required Ghost APIs are not yet public, but it should provide the basis on which further smaller changes might be done when the API stabilizes.
Hello, I am trying to enable comments using this plugin on my blog running on ghost and it randomly throws the following error:
{
"error": "Unable to post topic"
}
in the nodebb log I can see the following:
25/11 11:41 [22175] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me
hi, i would like to use nodebb’s comment in the ghost post, but it show the Commenting has been disabled.
, what’s the problem?
Thanks!
Hi,
"A mechanism to query the number of comments on another separate page will be available in a future release.".
In fact, the comments counter is very useful on the frontpage on the metadata of each summary post. For the Casper theme, the related files are partials/loop.hbs and default.hbs. As you could see here for Disqus: https://help.disqus.com/customer/portal/articles/1454924-ghost-installation-instructions
When you create a post in Wordpress topic is not automatically created in the NodeB. Therefore, for all users except the administrator, it is impossible to leave a message.
"Commenting has been disabled."
Hi,
I needed to make some changes to get the CSRF token working with the middleware in the current version of NodeBB. Thought you'd like to know.
Changes were pretty basic in library.js:
token: res.locals.csrf_token,
becomes:
token: req.csrfToken(),
and:
app.get('/comments/get/:id/:pagination?', Comments.getCommentData);
becomes:
app.get('/comments/get/:id/:pagination?', middleware.applyCSRF, Comments.getCommentData);
Hi,
My nodebb is in a subdirectory, https://domain.org/forum
. For whatever reason the user images next to blog comments in ghost are going 404 as it appears that the plugin is putting too many "forums" in.
Failed to load resource: the server responded with a status of 404 (Not Found) https://domain.org/forum/forum/uploads/profile/2-profileimg.png
Any ideas on how to fix this? Everything else appears to be working and I'm loving the NodeBB/Ghost combo.
https://github.com/tommy351/hexo Just in case anyone can do it before I can put some effort on it.
Hi,
I got this issue with the last version of your plugin:
Uncaught TypeError: Cannot assign to read only property 'className' of 1
on plugins/nodebb-plugin-blog-comments/lib/ghost.js:99
Im not sure how well this would work on the NodeBB side, but a threaded-reply feature on each comment like Disqus would be awesome. :)
And upvote support.
I'm having two issues using Firefox and Safari
Chrome works flawlessly. I've implemented this on our blog: https://blog.panther-mpc.com/
Looks like something changed in the Ghost API for version 0.5 because I am stuck on the "sign in to Ghost to enable the publish button." page.
The GET call to /ghost/api/v0.1/posts/22/
returns a 401 Unauthorized, with the response {"type":"error","message":"Please Sign In","status":"passive"}
I guess the Authorization header isn't sent on request (see TryGhost/Ghost/issues/3177) as well as TryGhost/Ghost/issues/3748
Is there a way to set it so commenting is automatic instead of having to publish to NodeBB? Love this system but I keep forgetting to publish and then it causes blog posts to be ignored.
originally posted by @a5mith at NodeBB/NodeBB#1244
Continuing on from http://community.nodebb.org/topic/810/nodebb-plugin-blog-comments-blog-commenting-engine-ghost-wordpress-widget#7785 at some point, it would be great to integrate nodebb comments into multiple websites/blogs using Wordpress or Ghost etc.
The script gets installed onto each wordpress install. The site URLs can then be added to NodeBB admin panel, new posts in Wordpress or Ghost creates a new thread in NodeBB for people to comment on from the forum or the blog.
The only issue I can see is with site admins having different usernames on their blog to what they use on forums. So that may need to be addressed. Perhaps linking any posts from a site URL to a specific user in the NodeBB Admin Area
MEANJS has no supporting for the comment on articles, and some thing like the PencilBlue using AngularJS.
So could you support MeanJS?
Thanks.
I would like to get that extension for mediawiki with the option OF SOME PUBLISHING PERMISSIONS.
Hi,
With Ghost, when we publish the post to the NodeBB platform, if there are images in the summary post published on NodeBB, the URL of these images are not well converted in Markdown: it could give:
![pièces de monnaie](/content/images/2015/01/images.jpg)
and then, it lacks the URL of the Ghost blog
![pièces de monnaie](https://mysampledomain.fr/content/images/2015/01/images.jpg)
Please solve it.
Thanks
Use URLs as the canonical identifier
Though URLs do change, so perhaps also build in the functionality to do a "mapping", so if http://siteA.com/blog
changes to https://blog.siteB.com
, the topics don't lose their reference to the downstream post...
The JSON reply to /ghost/api/v0.1/posts/:id
has changed between v0.4.x and v0.5.x.
The new reply is {posts: [result.toJSON()]}
versus the old one which just returned result.toJSON()
. This means that the code for parsing the reply (line 154 in /public/lib/embed.js) won't work correctly.
Also note that the actual content returned by the API call has changed, but nothing that breaks the comments plugin (at least so far).
Hi,
I'm having a few problems getting Ghost/Nodebb integration to work. To make things more complicated, I'm running both software on two different hosts.
I've installed the latest version of Ghost (0.5.3), NodeBB (0.6.0) and the integration plugin from npm. Both sites are proxies through NGINX. I login using my administrator account in both ghost in nodebb. When I look at an article, I can need the Publish this Article to NodeBB button. However, if I press it, I receive the following message :
{"error":"Only Administrators or members of the publishers group can publish articles"
I can confirmed that I am properly logged in, as I can just go back to the root of NodeBB and the administration menu. I've confirmed that I am using the proper categorie in my plugin configuration, and that administrator has the proper rights to post to that category.
I've integrated in Ghost using the following code
<a id="nodebb/comments"></a>
<script type="text/javascript">
var nodeBBURL = 'http://forums.technodabbler.com',
articleID = '{{post.id}}';
(function() {
var nbb = document.createElement('script'); nbb.type = 'text/javascript'; nbb.as
ync = true;
nbb.src = nodeBBURL + '/plugins/nodebb-plugin-blog-comments/lib/embed.min.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body
')[0]).appendChild(nbb);
})();
</script>
<noscript>Please enable JavaScript to view comments</noscript>
Any ideas?
I am allowing guests to post in the blog posts categories, but no post button is showing up, just Login or register.
Which version of nodebb-plugin-blog-comments should I use for NodeBB v0.4.3? The latest version 0.1.16?
Hi, We have a site in php and have many pages that do not use any CMS.
To comment on this site, JavaScript code Disqus system is placed at the end of each page.
Now we want a forum with "nodebb" be added to the site (as a sub-domain), which is our forum and cover site commenting systems, so we can eliminate Disqus!
I'm wondering if we can add nodeBB to php site, something like disqus.
Best regards,
Sorry I dont have the error from the logs. I actually been meaning to report this for at least two months now but never got around to it. I figured I better do it now while its on my mind 😉
Hi, when the id was "nodebb/comments" my jquery/scripts was making the page not load and giving me a undefined error in console, now i know this is specifc to my site but my suggestion is to redo it as #nodebb-comments instead of #nodebb/comments. i manually changed all refferences to this and now it works fine. i don't even know if a / in a id tag is valid is it?
Hope you consider this change. Thanks.
I got this issue when I want to run nodebb.
2014-12-12T00:43:31.824Z - error: TypeError: Cannot call method 'get' of undefined
at Object.Comments.init (/var/www/nodebb/node_modules/nodebb-plugin-blog-comments/library.js:222:7)
at /var/www/nodebb/src/plugins.js:489:23
at /var/www/nodebb/node_modules/async/lib/async.js:125:13
at Array.forEach (native)
at _each (/var/www/nodebb/node_modules/async/lib/async.js:46:24)
at Object.async.each (/var/www/nodebb/node_modules/async/lib/async.js:124:9)
at Object.Plugins.fireHook (/var/www/nodebb/src/plugins.js:487:12)
at Plugins.reloadRoutes (/var/www/nodebb/src/plugins.js:135:11)
at /var/www/nodebb/node_modules/async/lib/async.js:656:23
at fn (/var/www/nodebb/node_modules/async/lib/async.js:641:34)
TypeError: Cannot call method 'get' of undefined
at Object.Comments.init (/var/www/nodebb/node_modules/nodebb-plugin-blog-comments/library.js:222:7)
at /var/www/nodebb/src/plugins.js:489:23
at /var/www/nodebb/node_modules/async/lib/async.js:125:13
at Array.forEach (native)
at _each (/var/www/nodebb/node_modules/async/lib/async.js:46:24)
at Object.async.each (/var/www/nodebb/node_modules/async/lib/async.js:124:9)
at Object.Plugins.fireHook (/var/www/nodebb/src/plugins.js:487:12)
at Plugins.reloadRoutes (/var/www/nodebb/src/plugins.js:135:11)
at /var/www/nodebb/node_modules/async/lib/async.js:656:23
at fn (/var/www/nodebb/node_modules/async/lib/async.js:641:34)
2014-12-12T00:43:31.825Z - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
2014-12-12T00:43:31.826Z - info: [app] Database connection closed.
net.js:1236
throw new Error('Not running');
^
Error: Not running
at Server.close (net.js:1236:11)
at shutdown (/var/www/nodebb/app.js:344:36)
at process.<anonymous> (/var/www/nodebb/app.js:181:7)
at process.emit (events.js:95:17)
at process._fatalException (node.js:272:26)
Instead of the handrolled function in embed.js, will save on space.
... just so I don't forget about it (not that I would, I really want this feature as well, since my blog is powered by WP :p)
http://burnaftercompiling.com, btw :D
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.