- Posts: 11
COMMUNITY FORUM
Disqus with K2. Is this possible?
- Crystal
- Topic Author
- Offline
- New Member
Less
More
12 years 2 months ago #101417
by Crystal
Disqus with K2. Is this possible? was created by Crystal
I'm also considering to use Disqus instead of the K2 commenting system. The current plugin for Disqus isn't compatible with K2 (right?). Does anyone know how to do integrate disqus manually (maybe it can be done by editing the K2 template files?)
Please Log in or Create an account to join the conversation.
- Ryan
- Offline
- New Member
Less
More
- Posts: 8
12 years 2 months ago - 12 years 2 months ago #101418
by Ryan
Replied by Ryan on topic Re: Disqus with K2. Is this possible?
It shouldn't be hard.
If you've setup an account with disqus already, visit:
www.disqus.com/admin/universal/ (the www will get replaced with your own login name when logged in,
ie: yourusername.disqus.com/admin.universal/
Get this code, and add it to whatever content you want, ie, :
Components > com_k2 > templates > yourtemplate > item.php (if you want it to show when viewing an item)
In the default template, search for:
replace with:Ensure you replace yourusername with your actual username.
Hope this helps.
If you've setup an account with disqus already, visit:
www.disqus.com/admin/universal/ (the www will get replaced with your own login name when logged in,
ie: yourusername.disqus.com/admin.universal/
Get this code, and add it to whatever content you want, ie, :
Components > com_k2 > templates > yourtemplate > item.php (if you want it to show when viewing an item)
In the default template, search for:
<div class="itemCommentsForm">
<?php echo $this->loadTemplate('comments_form'); ?>
</div>
replace with:
<div class="itemCommentsForm">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'yourusername'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
Hope this helps.
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
12 years 2 months ago #101419
by Kannan Naidu Venugopal
K2 Rocks \m/
Replied by Kannan Naidu Venugopal on topic Re: Disqus with K2. Is this possible?
There is already a plugin developed by codesnipper here at extend K2 page. See
here
K2 Rocks \m/
Please Log in or Create an account to join the conversation.