Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Disqus as comment system #320

Open
refda opened this issue Mar 8, 2014 · 0 comments
Open

Using Disqus as comment system #320

refda opened this issue Mar 8, 2014 · 0 comments

Comments

@refda
Copy link

refda commented Mar 8, 2014

Thanks for your great mobile framework!

I load sections via php (ajax for example details.php?id=45). In these sections I would like to display Disqus comments. But it doesn't work.

How could I use the trigger (onload) dynamic for loading sections?

<section id="section<?php echo $id; ?>" data-transition="slide">
    <header data-title="<?php echo $title; ?>" data-back="chevron-left">
    </header>

    <article id="details<?php echo $id; ?>" class="list scroll indented">
<ul>
<li>
<img src="<?php echo $image; ?>">
</li>
<li>

<div id="disqus_thread"></div>
    <script type="text/javascript">
        var disqus_shortname = 'example';
        var disqus_identifier = 'id1';
        var disqus_url = 'http://www.example.com';

        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>

</li>
</ul>   
    </article>

</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant