Cara Menggunakan Komentar Disqus di Template Infastio
"Tutorial Cara Memasang Sistem Komentar dari Disqus di Template Infastio."
image: wordpress.org/plugins/disqus-comment-system/ |
Edit HTML
- Cari
<b:defaultmarkup type='Common'>
- Paste kode ini dibawahnya
<b:includable id='disqus-comment' var='post'> <script> var disqus_blogger_current_url = "<data:blog.canonicalUrl/>"; if (!disqus_blogger_current_url.length) { disqus_blogger_current_url = "<data:blog.url/>"; } var disqus_blogger_homepage_url = "<data:blog.homepageUrl/>"; var disqus_blogger_canonical_homepage_url = "<data:blog.canonicalHomepageUrl/>"; </script> </b:includable>
- Cari dan ubah
Menjadi<b:include data='post' name='commentPicker'/>
Paste kode ini dibawahnya<!-- <b:include data='post' name='commentPicker'/> -->
Perhatikan load_disqus("catatandroid"), ganti catatandroid dengan username disqus kalian.<b:if cond='data:view.isSingleItem'> <div id='disqus_thread'> <div id='disqus_empty'/></div> <b:if cond='data:blog.isMobileRequest == "true"'><b:include data='post' name='disqus-comment'/></b:if> <script> //<![CDATA[ function load_disqus(e){var t=document.getElementById("disqus_empty"),d=document.getElementById("disqus_thread"),n=document.createElement("script"),s=document.createElement("script"),o=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];d&&t&&(n.type="text/javascript",n.async=!0,n.src="//"+e+".disqus.com/embed.js",o.appendChild(n),s.type="text/javascript",s.async=!0,s.src="//"+e+".disqus.com/blogger_item.js",o.appendChild(s),t.remove())}window.addEventListener("scroll",function(e){var t=document.scrollingElement.scrollTop,d=document.getElementById("disqus_thread");d&&t>d.getBoundingClientRect().top-150&&(load_disqus("catatandroid"),console.log("Disqus loaded."))},!1); //]]> </script> </b:if>
- Cari dan ubah
Menjadi<i><data:post.numberOfComments/></i>
<!-- <i><data:post.numberOfComments/></i> -->
- Cari dan ubah
Menjadi<b:include name="ic-chat"/><b:message name='messages.numberOfComments'> <b:param expr:value='data:post.numberOfComments' name='numComments'/> </b:message>
<b:include name="ic-chat"/><data:messages.postAComment/>
Widget Layout
- Pada infastio settings ubah var recentComment menjadi false. var recentComment = false;
- Tambahkan css ini di widget additional css
.comment-info { display: none; }
Perhatian
- Widget Disqus ini berjalan secara lazy on scroll, akan muncul jika ada aktifitas scroll pada layar.
- Widget Disqus ini tidak termasuk fitur recentComment dan totalComment
How to add like this
ReplyDeleteNice
ReplyDelete