Giter Club home page Giter Club logo

nodebb-plugin-blog-comments's People

Contributors

barisusakli avatar dependabot[bot] avatar djensen47 avatar fma965 avatar frandiox avatar fuzzmz avatar gasoved avatar julianlam avatar philskents avatar psychobunny avatar revir avatar sohrabafard avatar theunknownartisthour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodebb-plugin-blog-comments's Issues

Error on 0.5.0-1

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?

Duplicating Ghost Post Content After Comments

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:

no-nodebb

And here is the same post with nodebb inside the post:

yes-nodebb

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.

XMLHttpRequest denied access

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.

Capcha is not working

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?

Not saved category ID - Node BB v0.9.3

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.

Compatability with PencilBlue CMS

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?

Pushing old wp comments and post

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 !

Anonymous comments

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.

log-in

It would be great if they could just post with a chosen nickname like you usually can in regular blog comments.

Ghost installation example breaks posts with </script> closing tags

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.

Steps to reproduce:

  • Create a new post
  • Paste the embed code of an instagram photo
  • Insert some text after the embed code
  • Publish it

Expected behavior

The blog post content is displayed once and then the comment box.

Actual behavior

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.

nodebb plugin for github pages

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)?

Comments module is empty and visible after removing the topic

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.

Deleted posts in a blog comments tracked thread cause the wrong comments to show up

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.

Powered by NodeBB

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". :)

Sync tags between Ghost post and NodeBB thread

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.

Adding comments to posts randomly throws unable to post topic

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

Commenting has been disabled

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!

Wordpress - "Commenting has been disabled"

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."

NodeBB CSRF Middleware

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);

User images giving 404

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.

Threaded replies.

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.

Ghost API returns 401 Unauthorized

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

Feature Request: Auto Publish Comment System

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.

Blog Commenting Engine Feature

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

Could you support for MEANJS?

MEANJS has no supporting for the comment on articles, and some thing like the PencilBlue using AngularJS.
So could you support MeanJS?

Thanks.

MediaWiki

I would like to get that extension for mediawiki with the option OF SOME PUBLISHING PERMISSIONS.

Bad URL publication of images from Ghost to NodeBB

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

Refactor plugin to not require a unique id from each blog

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...

Ghost post JSON changed breaking comment publish

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).

Only Administrators or members of the publishers group can publish articles

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?

Guests can't comment

I am allowing guests to post in the blog posts categories, but no post button is showing up, just Login or register.

generic comments

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,

Jquery error breaking page with this on wordpress

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.

TypeError: Cannot call method 'get' of undefined

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.