automatically preload the activity feed when the scroll reaches the view more link

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    automatically preload the activity feed when the scroll reaches the view more link

    open:
    /application/modules/Activity/views/scripts/_activityComments.tpl
    and add after:
    PHP Code:
    <?php $this->headScript()
            ->
    appendFile($this->layout()->staticBaseUrl 'application/modules/Activity/externals/scripts/core.js')
            ->
    appendFile($this->layout()->staticBaseUrl 'externals/flowplayer/flashembed-1.0.1.pack.js'?>
    this code:
    HTML Code:
    <script type = "text/javascript">
    var check_load_more_gum_clicked = new Date().getTime();;
    window.addEvent('domready', function() {
        window.addEvent('scroll', function() {
            var load_more_gum = (window.getScroll().y + window.getSize().y) > $('feed_viewmore_link').getPosition().y && $('feed_viewmore_link').offsetHeight > 1;
            var check_load_more_gum_now = new Date().getTime();
            if ((check_load_more_gum_now - check_load_more_gum_clicked) > 5000)
            {
                if (load_more_gum)
                {
                    check_load_more_gum_clicked = new Date().getTime();
                    document.getElementById("feed_viewmore_link").click();
                }
            }
        });
    });
    </script>
    Advertise your mobile site for FREE with AdTwirl


    #2
    Also try
    HTML Code:
    $(window).scroll(function() {
    if($(window).scrollTop() + $(window).height() == $(document).height()) {
    $('#feed_viewmore_link, .conversation_showmore').click();    } });
    Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

    Comment


      #3
      your code is jquery, socialengine is mootools
      Advertise your mobile site for FREE with AdTwirl

      Comment


        #4
        Oh I thought was for vbulletin lol... my bad, was on my phone
        Last edited by kevk3v; 13.02.15, 14:57.
        Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

        Comment

        Working...
        X