{"_id":"@borodutch/nodebb-plugin-blog-comments-cryptofr","_rev":"1-c955cf1ece885372d7ddc7207aff5fa9","name":"@borodutch/nodebb-plugin-blog-comments-cryptofr","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.2":{"name":"@borodutch/nodebb-plugin-blog-comments-cryptofr","version":"1.0.2","description":"Plugin de commentaire sur la plateforme CryptoFR","main":"library.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"parcel build public/lib/main.js -d public/lib --out-file main2.js --no-minify --no-source-maps"},"repository":{"type":"git","url":"git+https://github.com/CryptoFR/nodebb-plugin-blog-comments-cryptofr.git"},"keywords":["nodebb","plugin","blog","ghost","wordpress","commenting","comments"],"author":{"name":"River","email":"revir.qing@gmail.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/CryptoFR/nodebb-plugin-blog-comments-cryptofr/issues"},"nbbpm":{"compatibility":"^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^1.0.0 || ^1.2.0 || ^1.3.0"},"dependencies":{"emojione":"^4.5.0","jquery":"^3.4.1","rm-emoji-picker":"^0.4.0","simple-recaptcha-new":"^1.1.1"},"devDependencies":{"parcel":"^1.12.4"},"gitHead":"0f5c992b63731802af64dc6d993b9cb672a63f90","homepage":"https://github.com/CryptoFR/nodebb-plugin-blog-comments-cryptofr#readme","_id":"@borodutch/nodebb-plugin-blog-comments-cryptofr@1.0.2","_nodeVersion":"13.6.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-q7VutNCsnLovt+0K5ogyhyGPR5H87TY5oNEwMCwv8DkDrXOBhOYZh4LlvBiCnO775z3EVbc7gYNbBIOScv2x4Q==","shasum":"b535097e701da81fd37502479350ae48ccad94da","tarball":"https://registry.npmjs.org/@borodutch/nodebb-plugin-blog-comments-cryptofr/-/nodebb-plugin-blog-comments-cryptofr-1.0.2.tgz","fileCount":95,"unpackedSize":5096606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/SvmCRA9TVsSAnZWagAArwkP/R8h6NCvmQf8G5GEEuZD\nqomF4X19WcZ1SaMeh/AzrXC92YlGbqTai4fxmxOKKDSRZkgb4r+Orpo+1us6\nYOzr9hfFXw/24CDJ4Jhc8soZBCICUWUMG1d7amRiNm73DnQGUiO2KQdLfRdX\nsPyogAiO5AF4aCEQCntyh2RQvD2xkYhH/w5DQTWMi8XVsWaY/FPYJiVE/6tw\nb4J2XPJx17BK6N11b4DlSCfgAbFxQHPTAozGBsAFkTDo8t4/jIp/Kcvkr8FF\nitXI1it0h1FxD0FGhzBc2SqjFrIUVeeprXSPH7wxa58hxBVoWCVmh5H2wq3H\nD9l0BP0zXQA1V/aERRnAt9v9+3xDSs8Kj/mX+x9obQ3Ts0stvjvSlIivbG/h\nubS0hyLtRDOShoessB2CvgF2n4J06r2c03tFB2S0SygQcKEaZTaVZIvXd6Y6\nMq5f1Aw2h8xMOMF1wym1WqCTUvNND9u2qBnjTZDsUvzB53c3FQBu04sMB1VA\nbf3RdsPigz5gKSqMubVPqZy2BH1SBynKTWfRRcIxVh6RzU5iE6fI179e5Xcn\nzkRfT9ueO0Spx54vBriVYVwljcZr9hQjtQNZpcccw7AuLLC3/R8qbwPC0ZZO\nXvjS24MUlwZ+rNddAan2LSVJKTjm5IAmcb+VkOlpr6XhdS+HOPVsAcibDWao\n2vM+\r\n=swo+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZ/hqF1rMWX/nEIMtxv60K3y7KzFh2xfLB8HccZIDpUAiEA1VP+H9I2DcDrsBIwWwCAIeorhfAmwb/X3ftCKvLGd4A="}]},"maintainers":[{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmUser":{"name":"borodutch","email":"nikita@borodutch.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodebb-plugin-blog-comments-cryptofr_1.0.2_1593650149502_0.5197665780195604"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-02T00:35:49.467Z","1.0.2":"2020-07-02T00:35:49.811Z","modified":"2022-04-04T20:13:13.076Z"},"maintainers":[{"name":"borodutch","email":"nikita@borodutch.com"}],"description":"Plugin de commentaire sur la plateforme CryptoFR","homepage":"https://github.com/CryptoFR/nodebb-plugin-blog-comments-cryptofr#readme","keywords":["nodebb","plugin","blog","ghost","wordpress","commenting","comments"],"repository":{"type":"git","url":"git+https://github.com/CryptoFR/nodebb-plugin-blog-comments-cryptofr.git"},"author":{"name":"River","email":"revir.qing@gmail.com"},"bugs":{"url":"https://github.com/CryptoFR/nodebb-plugin-blog-comments-cryptofr/issues"},"license":"BSD-2-Clause","readme":"This plugin is a fork from [NodeBB Blog Comments](https://github.com/psychobunny/nodebb-plugin-blog-comments), I just added some more features and fixed some bugs to it.\n\n* Support multiple blogs, use `articleID` and `blogger` to distinguish posts from different blogs, so this is kinda break change to the original nodebb-plugin-blog-comments.\n* Simple script for ghost, hugo, pelican etc, and a general script for any other blogs, just add a `<script>` node at any place of the page, will support more blog platforms later.\n* Use `siteTitle` instead of NodeBB in the `comments.tpl`.\n* Support social sites sharing plugin and upvote and bookmark actions.\n* Two css styles for comments.\n* Fixed some bugs, like escaped title and content problems, profile image display, etc.\n\nThe multiple blogs feature is great, you can see at here: https://v2mm.tech/category/46/blog\nThere are already some blogs conntected with [V2MM](https://v2mm.tech).\n\n# NodeBB Blog Comments\n\nThe original [NodeBB Blog Comments](https://github.com/psychobunny/nodebb-plugin-blog-comments) lets NodeBB act as a comments engine/widget for your blog. It supports both [Ghost](https://ghost.org/) and [WordPress](http://wordpress.org/).\n\nThe comments are exposed to any plugin you have built into the core, so it is completely possible to have emoticons, embedded video, and/or whatever else you want in the comments section of your blog.\n\nArticles are published to a forum category of your choice, and will gain a tag that links it back to the original article.\n\n\n## Screenshots\n\n* Style 1\n![style1](style1.png)\n\n* Style 2\n![style2](style2.png)\n\n\n## Installation\n\nFirst install the plugin:\n\n    npm install nodebb-plugin-blog-comments-cryptofr\n\nActivate the plugin in the ACP and reboot NodeBB. Head over to the Blog Comments section in the ACP and select the Category ID you'd like to publish your blog content to (default is Category 1). Make sure you put the correct URL to your blog.\n\n### General Use\n\nPut this script to anywhere in your blog's article page, either in head or body, fill the variables, see explanations below.\n\n```html\n<script type=\"text/javascript\">\n$(document).ready(function() {\n   var nbb = window.nbb = {};\n   nbb.url = '//yournodebb.com'; // your forum url.\n   nbb.cid = 79;   // the category where to publish.\n   nbb.blogger = 'yourname';   // the name to distingush with different blog, omit it to fallback to 'default'.\n   nbb.commentsCSS = nbb.url + '/plugins/nodebb-plugin-blog-comments-cryptofr/css/comments2.css'; // which style you prefer, omit it to fallback to the default comments.css\n   nbb.articleID = <Function to get the unique article id>   // To get the unique article id, see explations below.\n   nbb.articleTitle = document.title;                       // To get the article title, document.title is the default.\n   nbb.commentElement = document.getElementById('nodebb-comments');  // Where you put the comments widget, \"nodebb-comments\" element is the default.\n\n   nbb.articleContent = <Function to get the excerpt of the article> // Write a function to get the post content.\n\n   nbb.script = document.createElement('script');\n   nbb.script.type = 'text/javascript';\n   nbb.script.async = true;\n   nbb.script.src = nbb.url + '/plugins/nodebb-plugin-blog-comments-cryptofr/lib/general.js';  // load general.js async.\n   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb.script);\n});\n</script>\n```\n\nIf you wish, you can create `<a id=\"nodebb-comments\"></a>` to where you want to place the actual comments widget.\n\nAlso, there are some special scripts for some common blog platform. But in various blog themes, these scripts cannot guarantee to be true.\nFor example, `simple-wordpress.js` can't be used on any wordpress websites.\nIf you encounter any error, use `general.js` instead or put an issue to me.\n\n### Ghost Installation\n\nPaste this any where in `yourtheme/post.hbs`, somewhere between `{{#post}}` and `{{/post}}`. All you have to edit is line 3 (`nbb.url`) - put the URL to your NodeBB forum's home page here.\n\n```html\n<a id=\"nodebb-comments\"></a>\n<script type=\"text/javascript\">\nvar nbb = {};\nnbb.url = '//your.nodebb.com'; // EDIT THIS\nnbb.cid = 1;\t// OPTIONAL. Forces a Category ID in NodeBB.\nnbb.blogger = 'blogger_name';\t//  Omit it to fallback to 'default'.\n\n(function() {\nnbb.articleID = '{{../post.id}}';\nnbb.tags = [{{#../post.tags}}\"{{name}}\",{{/../post.tags}}];\nnbb.script = document.createElement('script'); nbb.script.type = 'text/javascript'; nbb.script.async = true;\nnbb.script.src = nbb.url + '/plugins/nodebb-plugin-blog-comments-cryptofr/lib/ghost.js';\n(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb.script);\n})();\n</script>\n<span id=\"nbb-title\" style=\"display:none\">{{../post.title}}</span>\n<span id=\"nbb-markdown\" style=\"display:none\">{{../post.markdown}}</span>\n<noscript>Please enable JavaScript to view comments</noscript>\n```\n\nIf you wish, you can move `<a id=\"nodebb-comments\"></a>` to where you want to place the actual comments widget.\n\nSee demo at [hgkat's blog](http://hgkat.com), her blog is using this script to connect with [V2MM](https://v2mm.tech).\n\n### Simple Ghost Installation\nSince some blogs might installed with docker, couldn't change the theme file, I create this simple script which can be added at any place of the html.\n\nJust add this any where on your blog's page:\n\n```\n<script id='nodebb-comments-script' ourl=\"//your.nodebb.com\" ocid=\"1\" blogger='name' src=\"//your.nodebb.com/plugins/nodebb-plugin-blog-comments-cryptofr/lib/simple-ghost.js\"></script>\n```\nNote: ocid is the category id in your NodeBB, blogger is set for distinguish posts from different blogs.\n\nSee demo at [Wave's blog](http://blog.lovejog.com), his blog is using this script to connect with [V2MM](https://v2mm.tech).\n\n### Simple Hugo Installation\n\n```\n<script id='nodebb-comments-script' ourl=\"//your.nodebb.com\" ocid=\"1\" blogger='name' src=\"//your.nodebb.com/plugins/nodebb-plugin-blog-comments-cryptofr/lib/simple-hugo.js\"></script>\n```\n\nSee demo at [Leyafo's blog](http://www.leyafo.com/), his blog is using this script to connect with [V2MM](https://v2mm.tech).\n\n### Simple Pelican Installation\n\n```\n<script id='nodebb-comments-script' ourl=\"//your.nodebb.com\" ocid=\"1\" blogger='name' src=\"//your.nodebb.com/plugins/nodebb-plugin-blog-comments-cryptofr/lib/simple-pelican.js\"></script>\n```\n\nSee demo at [Cycleuser's blog](http://blog.cycleuser.org), his blog is using this script to connect with [V2MM](https://v2mm.tech).\n\n**Wordpress plugin and any other plugins in PHP, I haven't test them yet, as I don't have those blogs.**\nIf your blog is wordpress, and would like to connect with [V2MM](https://v2mm.tech), I would be glad to set up this script for you.\n\n### Wordpress Installation\n\nFirst, install the [Wordpress JSON API](http://wordpress.org/plugins/json-api/) plugin.\n\nReplace the contents of `/wp-content/themes/YOUR_THEME/comments.php` with the following (back-up the old comments.php, just in case):\n\n```html\n<?php\nif ( post_password_required() )\n\treturn;\n?>\n\n<a id=\"nodebb-comments\"></a>\n<script type=\"text/javascript\">\nvar nodeBBURL = '//your.nodebb.com',\n\twordpressURL = '<?php echo get_site_url(); ?>',\n\tarticleID = '<?php echo the_ID(); ?>',\n\tblogger = 'name', //OPTIONAL. Assign an blogger name to disdinguish different blogger. Omit it to fallback to 'default'\n\tarticleType = '<?php echo get_post_type() ?>',\n\tcategoryID = -1; // If -1, will use category in NodeBB ACP.  Put in a category number to force that category.\n\n(function() {\nvar nbb = document.createElement('script'); nbb.type = 'text/javascript'; nbb.async = true;\nnbb.src = nodeBBURL + '/plugins/nodebb-plugin-blog-comments-cryptofr/lib/wordpress.js';\n(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb);\n})();\n</script>\n<noscript>Please enable JavaScript to view comments</noscript>\n```\n\n### Comments Counter\n\n\nYou may optionally put a \"# of comments\" counter anywhere on the page with the following code:\n\n```html\n<span id=\"nodebb-comments-count\"></span> Comments\n```\n\nA mechanism to query the number of comments on another separate page will be available in a future release.\n\n### Author and Category information\n\n![](http://i.imgur.com/NyLs4LQ.png)\n\nTo use NodeBB's category and author information (instead of using Ghost's user/tag system), there are two elements that this plugin searches for:\n\n```html\nPublished by <span id=\"nodebb-comments-author\"></span> in <span id=\"nodebb-comments-category\"></span>\n```\n\n### Publishing\n\nHead over to the article that you'd like to publish. The code will detect if you're both an administrator of your blog and NodeBB (so ensure that you're logged into both) and will display a publish button if so.\n\nYou may also create a `publishers` group in NodeBB to allow a group of regular users to have publish rights.\n","readmeFilename":"README.md"}