Disqus插件动态标签说明
所以我使用的是 Disqus Plugin v2.65
。我正在尝试编辑 Disqus 评论顶部的 dsq-global-toolbar
。
以下标签位于 disqus-comment-system/comments.php 中,
<div id="disqus_thread">
<?php if (!get_option('disqus_disable_ssr')): ?>
<?php
// if (is_file(TEMPLATEPATH . '/comments.php')) {
// include(TEMPLATEPATH . '/comments.php');
// }
?>
<div id="dsq-content">
<ul id="dsq-comments">
但是在我的网站上,有多个标签(disqus-global-toolbar div)似乎是动态附加在 dsq 之间-content div 和 dsq-comments ul
。这是从哪里来的,我可以在哪里编辑它?任何帮助将不胜感激。
So I am using the Disqus Plugin v2.65
. I am trying to edit the dsq-global-toolbar
at the top of the Disqus comments.
The following tags are in disqus-comment-system/comments.php
<div id="disqus_thread">
<?php if (!get_option('disqus_disable_ssr')): ?>
<?php
// if (is_file(TEMPLATEPATH . '/comments.php')) {
// include(TEMPLATEPATH . '/comments.php');
// }
?>
<div id="dsq-content">
<ul id="dsq-comments">
however on my site there are mulitple tags (the disqus-global-toolbar div) that seem to be dynamically appended between the dsq-content div
and the dsq-comments ul
. Where is this coming from and where can I edit this? Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为它出现在 disqus.js 中第 3140 行附近
您可以使用此代码等待文档完全加载,然后进行更改(客户端):
可以删除 window.diqus_no_style 以及 $.getsript 包装器。
这就是您要找的吗?
像这样的东西(使用 livequery 而不是 live):
I think it is coming somewhere around line 3140 in disqus.js
You can use this code to wait for the document to finish loading completely then do your changes (client side):
window.diqus_no_style can be deleted as well as the $.getsript wrapper.
Is that what you are looking for?
Something like this (use livequery instead of live):
不确定你在说什么插件,但如果是 WordPress,我也做了同样的事情。通过添加“afterRender”事件处理程序来修改 wp-content/plug-ins/disqus-comment-system/comments.php(当内容在 DOM 中准备好但仍然隐藏时触发),例如。第70行左右:
Not sure what plug-in you're talking about, but if it's WordPress, I've done the same thing. Modify wp-content/plug-ins/disqus-comment-system/comments.php by adding an event handler for 'afterRender' (fires when the content ready in the DOM, but still hidden), eg. around line 70: