[nodebb-plugin-blog-comments] Blog Commenting Engine (Ghost, Wordpress widget)
-
@julian said:
Yes, you can do this with the blog-comments plugin. Instructions are in that plugin's readme.
Are you talking about the same plugin? The
psychobunny
plugin?
Or is there another generic comments plugin elsewhere?
Because this one is for Wordpress and Ghost ..
Or, do you mean that the instructions for Ghost will work for everything? -
@sanatisharif @Jacob-Moen The plugin did support generic websites before, although perhaps I am mistaken.
Please wait for @psychobunny to return and answer
-
I'm also interested in a more generic integration with our sites for commenting-part.
Guess I could use the rest-plugin but that only takes me half of the way (publishing).
-
@hek @Jacob-Moen @julian please look at this :
https://github.com/psychobunny/nodebb-plugin-blog-comments/pull/36With a little copy and paste the code Mr. Sohrab, this feature was added to the plugin.
The plugin, by sending a xhs request received information from Wordpress or ghost as json file, now we have our information directly from the server initialization.
-
A couple of things I don't get.
- Will the post/tags/etc be updated in NodeBB every time someone views the commenting sections on the external site?
- Who will be the author of the post in NodeBB?
-
Hello,
As I posted almost a month a go I have a blog running on ghost and I am trying to use this plugin as a commenting engine on it. I can enable the plugin on few of the posts but not all of them. When is not working I am getting on the browser side the following:
and on the logs I can see the following message:
16/12 15:28 [1593] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me
Is there anything I can do to get this work?
Regards and thanks in advance.
Peter -
@Peter-Zoltan-Keresztes yes you should set
resp.http.Access-Control-Allow-Origin = "http://z0z0.me";
in your web server ( Nginx or ht-access of Apache ) or vcl_backed of varnish -
set resp.http.Access-Control-Allow-Origin = "http://z0z0.me";
That is syntax in varnish vcl for others googlehow set Access Control Allow Origin
-
@sanatisharif said:
resp.http.Access-Control-Allow-Origin = "http://z0z0.me";
nginx does not seam to like it.
-
@sanatisharif said:
set resp.http.Access-Control-Allow-Origin = "http://z0z0.me";
That is syntax in varnish vcl for others googlehow set Access Control Allow Origin
@Peter-Zoltan-Keresztes in Nginx you should use different syntax for setting allow origin.
-
My nginx config looks like this:
server { listen 80; server_name z0z0.me; #charset koi8-r; access_log /var/log/nginx/z0z0/access.log main; error_log /var/log/nginx/z0z0/error_log; location / { add_header 'Acces-Control-Allow-Origin' '*'; proxy_set_header X-Real-IP $remote_addr; proxy_set_header HOST $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:2369; proxy_redirect off; } location /comments { proxy_set_header X-Real-IP $remote_addr; proxy_set_header HOST $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567; proxy_redirect off; } }
I am still getting the same error message.
-
@Peter-Zoltan-Keresztes said:
add_header 'Acces-Control-Allow-Origin' '*';
change this
add_header 'Acces-Control-Allow-Origin' '*';
to
add_header 'Acces-Control-Allow-Origin' 'http://z0z0.me';
-
@sanatisharif I did that. the Access-Control has to be on the location / which is the blog or /comments which is the nodebb?
-
@sanatisharif because developer of plugin set a filed
true
to usecookie
of forum foruser authentication
so you can't set*
asAllow grigin
. -
@Peter-Zoltan-Keresztes blog because blog send a request to forum!
-
I did the change to:
location / { add_header 'Access-Control-Allow-Origin' "http://z0z0.me"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header HOST $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:2369; proxy_redirect off; }
But still not able to get it working.
-
@Peter-Zoltan-Keresztes said:
I did the change to:
location / { add_header 'Access-Control-Allow-Origin' "http://z0z0.me"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header HOST $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:2369; proxy_redirect off; }
But still not able to get it working.
please give me
your forum url
andyour blog url
and completeerror on console
-
blog url is http://z0z0.me nodebb url http://z0z0.me/comments
Full error on the console:
16/12 18:22 [1593] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me 16/12 18:26 [1593] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me 16/12 18:28 [1593] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me 16/12 18:28 [1593] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me 16/12 18:30 [1593] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me 16/12 18:30 [1593] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me 16/12 18:32 [1593] - warn: [nodebb-plugin-blog-comments] Origin (undefined) does not match hostUrls: http://z0z0.me
Full nginx config:
server { listen 80; server_name z0z0.me; #charset koi8-r; access_log /var/log/nginx/z0z0/access.log main; error_log /var/log/nginx/z0z0/error_log; location / { add_header 'Acess-Control-Allow-Origin' 'http://z0z0.me'; # add_header 'Access-Control-Allow-Credentials' 'true'; # add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; # add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type, DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With'; proxy_set_header X-Real-IP $remote_addr; proxy_set_header HOST $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:2369; proxy_redirect off; } location /comments { # set $cors ''; # if ($cors = 'true') { # add_header 'Access-Control-Allow-Origin' "*"; # add_header 'Access-Control-Allow-Credentials' 'true'; # add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; # add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type, DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With'; # } # if ($request_method = 'OPTIONS') { # return 204; # } proxy_set_header X-Real-IP $remote_addr; proxy_set_header HOST $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567; proxy_redirect off; } }