使用Disqus阿贾克斯加载模态 [英] Using Disqus for ajax loaded Modal

查看:93
本文介绍了使用Disqus阿贾克斯加载模态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个加载不同的内容(想象一下产品不同的配置文件)一个模式,我想添加一个审查部分在模式的产物。我想过我自己做,但HTML标记,PHP后台处理,评论回复,图片上传一切都只是很复杂(和耗时)。所以,我决定使用Disqus。我以前用过Disqus。我知道它的工作原理pretty罚款与独立的页面。我不知道如果它是如何将装模态AJAX工作吗?例如,如何Disqus知道产品是不同的注释部分也要相应改变?

I'm having a modal that loads different content (imagine different profiles for products), and I want to add a review section for a product in the modal. I thought about making it by myself, but the HTML markup, PHP backend handling, comment reply, and image upload all that are just very complicated (and time consuming). So I decide to use Disqus. I've used Disqus before. I know it works pretty fine with stand alone pages. What I'm not sure if how it will work with ajax loaded Modal? For example, how does Disqus know the product is different and the comment section should change accordingly?

由于我使用AngularJS框架,我检查了这个漂亮的指令: https://开头的github .COM /柯尔斯坦/角disqus /维基那么,这仍然没有解释我应该怎么让disqus知道产品是不同的,它需要生成一个不同的注释部分。

Since I'm using AngularJS framework, I checked out this nice directive: https://github.com/kirstein/angular-disqus/wiki Well, this still doesn't explain how should I let disqus know the product is different, and it needs to generate a different comment section.

我可以得到任何帮助,从这里?

Can I get any help from here?

推荐答案

您的问题是,你需要设置唯一的 Disqus标识符

Your problem is you need to set the unique Disqus identifier

更多关于它的<一个href=\"http://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables#disqus_identifier\"相对=nofollow>这里

例如:

下面使用一个唯一的ID(也许你的产品ID)作为标识符。

The following uses a unique id (maybe your product ID) as an identifier.

var disqus_identifier = '2583573';

这篇关于使用Disqus阿贾克斯加载模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆