z0r Forums
Comments does't open. - Printable Version

+- z0r Forums (https://board.z0r.de)
+-- Forum: English (https://board.z0r.de/forumdisplay.php?fid=3)
+--- Forum: z0r general (https://board.z0r.de/forumdisplay.php?fid=23)
+--- Thread: Comments does't open. (/showthread.php?tid=2727)



Comments does't open. - Omicron - 13-11-2012

I can't open comments in Firefox and IE9. It works only in Chrome or what?


RE: Comments does't open. - eins - 13-11-2012

I only have Chrome and Opera, everything works great here. No idea whats causing the problem Sad

Edit:
Also working fine in IE8


RE: Comments does't open. - Tex - 08-12-2012

same problem here. no solution yet :/


RE: Comments does't open. - j230ns - 12-01-2013

the way i've gotten it to work on firefox is first you have to click the comment link then resize your window in any ways. hit f11, restore down, restore up, ctrl+shift+k (open web console) anything to make the text move. then it loads. weird bug,


RE: Comments does't open. - Gruselgurke - 10-06-2013

Same here, comments doesn't work in Firefox for months now... really annoying. Used FF 16-22, no change so far.


RE: Comments does't open. - SunRed - 10-06-2013

A possible solution might be loading the disqus thread once when the comment section is opened. Currently it is loaded when the page is loaded.
I have wrote a small script that could improve the current way it is loaded:

Code:
<!-- New comment section: -->

<!-- comments BEGIN -->
<div><a href="#disqus_thread" data-disqus-identifier="{Z0R LOOP NUMBER}" id="disqus_button">Loading comment counter...</a> <span class="updateThis">(click to expand)</span></div>
<div id="disqus_thread"></div>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments.</a></noscript>
<!-- comments END -->

<!-- Place for other stuff -->

...


<!-- At the bottom of the page javascripts should be loaded -->

<script>
    var disqus_shortname = 'z0r';
    var disqus_identifier = '{Z0R LOOP NUMBER}';
    var disqus_url = 'http://z0r.de/{Z0R LOOP NUMBER}';
    
    // load comment counter
    $(document).ready(function() {
        $.ajaxSetup({ cache: true });
        $.getScript('http://z0r.disqus.com/count.js');
        $.ajaxSetup({ cache: false });
    });
    
    // hide disqus placeholder
    $('#disqus_thread').hide();
    
    // Load disqus script only once
    $('#disqus_button').one('click', function() {
        $.ajaxSetup({ cache: true });
        $.getScript('http://z0r.disqus.com/embed.js');
        $.ajaxSetup({ cache: false });
    });
    
    // display placeholder with a slide effect + change text of span 'updateThis'
    $('#disqus_button').click(function() {
        $('#disqus_thread').slideToggle(1000, function() {
            if($('.updateThis').text() == '(click to expand)')
                $('.updateThis').text('(click to close)');
            else
                $('.updateThis').text('(click to expand)');
        });
        return false;
    });
</script>
</body>
</html>

I've tested it and it should work. Feel free to improve and optimize it, if you have some knowledge in this language...

Tested here.

Edit: Jquery 1.7 or greater is required for this, I recommend 1.9.1... currently there is a old and slow one in use (1.3.2)

~SunRed


RE: Comments does't open. - fishpoindexta88 - 13-06-2013

@SunRed
your example worked for me (Firefox 21.0)


RE: Comments does't open. - SunRed - 15-06-2013

(13-06-2013, 23:04)fishpoindexta88 Wrote: @SunRed
your example worked for me (Firefox 21.0)

Nice to hear that. I hope eins looks at this soon...


RE: Comments does't open. - eins - 05-11-2013

Oh shit, i kinda forgot about this. Just tried it now and it works perfectly.
Many thanks to SunRed!


RE: Comments does't open. - SunRed - 20-11-2013

It's great that it is working^^ Nice to hear that I could help you Big Grin