如何以与 Wordpress 类似的方式将 Disqus 评论系统添加到 Rails 应用程序中?
在 WordPress 中,Disqus 插件允许您选择通过 RSS 或通过电子邮件订阅帖子。有没有类似于 Rails 的 WordPress 插件的插件。 Norman 的 Disqus 插件 只是使用 Disqus 站点来使其工作。我希望能在本地存储更多的东西。有关我的意思的示例,请查看此 博客条目。
我已经知道,由于 Rails(特别是这个应用程序)正在使用 Authlogic(加上 Facebook Connect),因此 Disqus 不能与身份验证系统耦合得太紧密。有没有人做过这个或想出一种方法来做到这一点?
In Wordpress, the Disqus plugin allows you to choose to subscribe to a post via RSS or via email. Is there a pluign similar to the Wordpress plugin for Rails. Norman's Disqus plugin just uses the Disqus site to make it work. I was hoping to have things more stored locally. For an example of what I mean, take a look at this blog entry.
I already know that since Rails (this application in particular) is using Authlogic (plus Facebook Connect), that Disqus cannot be too tightly coupled with the Authentication system. Has anyone ever done this or figured out a way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请原谅我,但我对你的问题有点困惑……
你说 WordPress 使用的 disqus 插件允许你通过 RSS 和电子邮件订阅……诺曼的 Disqus 插件也是如此。我正在使用它,并且可以向您保证它提供与 WordPress 使用的版本相同的功能。
其次,你说“Norman 的 Disqus 插件只是使用 Disqus 网站来使其工作”......我不是在开玩笑,但是你这是什么意思?我希望 Norman 的 Disqus 插件使用 Disqus 网站,而不是 BurgerKing 的网站.... :)
您似乎觉得 Norman 的 Disqus 插件不起作用?它工作得很好,就像女作家一样......
你还说“我希望将更多的东西存储在本地。”您是否暗示您想将您的评论存储在您自己的数据库中?当然不是吗?如果是这样的话,使用 disqus 就没有意义了......
这里有一些关于让normans disqus插件工作的提示......
如果你希望当用户点击 http://mysite.com/blog/1-test-post 然后打开 show.html.haml (或 erb(如果您不使用 haml)并在您希望注释出现的任何位置添加以下内容:\
如果您使用 erb,则执行此操作:
完成。
我可以向您保证,Norman 的插件(或 gem)的工作方式与在 Rails 中和在 Wordpress 上的工作方式相同...
祝您好运 - 如果您遇到任何问题,请告诉我,我很乐意提供帮助。
编辑:
忘记提及您需要将一些内容粘贴到“Rails::Initializer.run do |config|”内的 config/environment.rb 文件中堵塞:
Pardon me, but I'm slightly confused by your question...
You state that the disqus plugin used by Wordpress allows you to subscribe via RSS and email.... Well so does Norman's Disqus plugin. I am using it and can assure you that it offers the same functionality of the version Wordpress uses.
Secondly, you say that "Norman's Disqus plugin just uses the Disqus site to make it work"... I'm not being funny here, but what do you mean by that? I'd expect Norman's Disqus plugin to use the Disqus site, as opposed to say, BurgerKing's site.... :)
It seems that you are under the impression that Norman's Disqus plugin doesn't work? It works fine, just like the wordress one...
You also say that "I was hoping to have things more stored locally." Are you implying that you want to store your comments in your own Database? Surely not? There would be no point in using disqus if that were the case.....
Here are some tips on getting normans disqus plugin working....
If you want the comments to appear when a user hits http://mysite.com/blog/1-test-post then just open up show.html.haml (or erb if you are not using haml) and add the following wherever you want the comments to appear:\
If you are using erb then do this instead:
Done.
I can assure you that Norman's plugin (or gem) works just the same as it does in Rails as it does on Wordpress....
Good luck - let me know if you have any trouble, I'll be happy to help..
EDIT:
forgot to mention that you need to stick some things in your config/environment.rb file inside the "Rails::Initializer.run do |config|" block:
http://praaveenvr .blogspot.in/2014/05/adding-disqus-comment-system-to-rails-3.html?view=sidebar
第 1 步
gem install disqus
第 2 步
添加到 application.rb(用户应该注册才能使用服务)
step3
添加此到查看文件(例如:show.html.erb)
启动服务器并检查......
http://praaveenvr.blogspot.in/2014/05/adding-disqus-comment-system-to-rails-3.html?view=sidebar
step 1
gem install disqus
step2
add in application.rb(user should registered to consume service)
step3
add this to view file(example: show.html.erb)
start the server and check.....