gpt4 book ai didi

javascript - 导入登录用户disqus评论

转载 作者:搜寻专家 更新时间:2023-11-01 04:11:35 28 4
gpt4 key购买 nike

我已经为 mysite 设置了一个 openid 登录系统和著名的disqus commenting system .

我如何整合这两者,即在 disqus 评论系统中检索已登录的用户信息,以防止用户在同一站点上输入他们的详细信息两次,否则简化登录任务有什么用。

disqus 是否有任何 api,以便我可以自动自动填充用户信息?

像这样的是 django_template:

{%if requet.user.is_active %}
<!--Check if any user is logged in and if someone is then add this in the html output:-->
var disqus_email = {{ user.email }};
var disqus_name = {{ user.username }};
<!--Or as in my case if active user have an openid-->
var disqus_openid = {{ user.openid }};
{% endif %}

有一个类似的帖子:Disqus and retrieving logged in user但看着回复,我决定为我的问题开始一个新问题。

最佳答案

http://help.disqus.com/entries/100880-configure-and-override-comment-system-behaviors 找到解决方案.
正如我在问题中已经想到的那样,必须为当前登录的用户定义以下内容:

var disqus_def_name = "{{ user.get_full_name}}";
var disqus_def_email = "{{ user.email }}";

关于javascript - 导入登录用户disqus评论,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4177397/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com