How To Add Together Multiple Disqus Threads On Same Page Using Codeigniter ?
Recently, I came some a occupation amongst the Disqus comment organisation piece I needed multiple disqus comment threads on 1 page. I convey solved my occupation using next method.
You tin laissez passer on the sack add together multiple or several disqus threads on same page using footling trick. You tin laissez passer on the sack read nearly reset method inward Using Disqus on AJAX sites
Let's start amongst the command laid for loading the Disqus module inward a shape of a "show comments" link below each private postal service that would betoken to some business office exterior too transcend away all the necessary attributes for loading Disqus for the kickoff fourth dimension or resetting it amongst novel parameters if it was already loaded.
We take away disqus_identifier that tells Disqus how to uniquely position the electrical current page too disqus_url that tells Disqus the place of the page for permalinking purposes.
Both variables this.page.identifier too this.page.URL
Full hashbang #!
Source: http://mystrd.at/articles/multiple-disqus-threads-on-one-page/
http://help.disqus.com/customer/portal/articles/472107-using-disqus-on-ajax-sites Sumber http://developer-paradize.blogspot.com
You tin laissez passer on the sack add together multiple or several disqus threads on same page using footling trick. You tin laissez passer on the sack read nearly reset method inward Using Disqus on AJAX sites
Let's start amongst the command laid for loading the Disqus module inward a shape of a "show comments" link below each private postal service that would betoken to some business office exterior too transcend away all the necessary attributes for loading Disqus for the kickoff fourth dimension or resetting it amongst novel parameters if it was already loaded.
We take away disqus_identifier that tells Disqus how to uniquely position the electrical current page too disqus_url that tells Disqus the place of the page for permalinking purposes.
<div class="wrapper-1"> <a onclick="loadDisqus(jQuery(this), 'upcoming', '<?php echo base_url()."#!upcomingEvents"; ?>');"> Show comments</a> </div> <div class="wrapper-2"> <a onclick="loadDisqus(jQuery(this), 'future', '<?php echo base_url()."#!futureTrends"; ?>');"> Show comments</a> </div>Armed amongst the controls, let's practise a generic exterior business office that seals the deal. Put that inward a file somewhere, inward the page header or anywhere y'all like.
<script type="text/javascript"> var disqus_shortname = 'your-sites-short-name-in-disqus'; var disqus_identifier; var disqus_url; business office loadDisqus(source, identifier, url) { if (window.DISQUS) { jQuery('#disqus_thread').insertAfter(source); /** if Disqus exists, telephone telephone it's reset method amongst novel parameters **/ DISQUS.reset({ reload: true, config: business office () { this.page.identifier = identifier.toString(); //important to convert it to string this.page.url = url; } }); } else { //insert a wrapper inward HTML afterwards the relevant "show comments" link jQuery('<div id="disqus_thread"></div>').insertAfter(source); disqus_identifier = identifier; //set the identifier declaration disqus_url = url; //set the permalink declaration //append the Disqus embed script to HTML var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; jQuery('head').append(dsq); } };While using DISQUS.reset method, y'all must follow next requirements</script>
Both variables this.page.identifier too this.page.URL
Full hashbang #!
Source: http://mystrd.at/articles/multiple-disqus-threads-on-one-page/
http://help.disqus.com/customer/portal/articles/472107-using-disqus-on-ajax-sites Sumber http://developer-paradize.blogspot.com
Comments
Post a Comment