Skip to:
Content
Pages
Categories
Search
Top
Bottom

Need help with activity stream

  • @alex80ks

    Participant

    Im not programmer so i ask for help about easy fancybox plugin and here is why
    I have some weird problem so i wanted to ask maybe someone can help me.
    Buddypress activity stream on my page here looks ok and images are shown ok but when i press Read more on some article there on that page, content of the article gets expanded as it should be but when i click on image from that article fancybox effect doesnt work just for that article.
    Does somebody have same problem?

    I found out this
    this is the code of element before i press Read more

    <div id="attachment_3120" class="wp-caption alignleft" style="width: 160px">
    <a class="fancybox" rel="gallery" href="http://www.xxx.com/wp-content/uploads/2014/07/iphone-6.jpg">
    <img class="size-thumbnail wp-image-3120" width="150" height="150" alt="Ajfon 6" src="http://www.xxx.com/wp-content/uploads/2014/07/iphone-6-150x150.jpg">
    </a>
    <p class="wp-caption-text">Ajfon 6</p>
    </div>

    and this is after i click Read more on Activity stream

    <div id="attachment_3120" class="wp-caption alignleft" style="width: 160px">
    <a rel="nofollow" href="http://www.xxx.com/wp-content/uploads/2014/07/iphone-6.jpg">
    <img class="size-thumbnail wp-image-3120" width="150" height="150" alt="Ajfon 6" src="http://www.xxx.com/wp-content/uploads/2014/07/iphone-6-150x150.jpg">
    </a>
    <p class="wp-caption-text">Ajfon 6</p>
    </div>

    It is missing fancybox class after clicking Read more.
    Does anybody have same problem?

    i get answer by author
    the problem here is new content being loaded via Ajax. For FancyBox to ‘know’ which links it should bind itself to, it needs an event trigger. The plugin uses currenty two events: “document ready” which happens right at page load, and “post-load” which is an event fired by Jetpack Infinite Scroll after loading new posts via ajax on scrolling down a category page for example…

    I’m surprised that BuddyPress does not use the same “post-load” event. If you can find out if BuddyPress fires an event at all and what its handle/name is, then I can update Easy FancyBox to start listening for this event too.

    Can someone tell me what event is that so that author can fix that?

    Thanks 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • @alex80ks

    Participant

    Is it possible to link Read more in Activity stream to related post instead of expanding it?
    maybe that is easier instead looking for trigger event

    @alex80ks

    Participant

    Author of plugin find solution and i want to suggest change of existing code for combatibility reasons. Where can i post solution for testing?
    P.S
    i already tryed and it is working.
    Thanks

    @mercime

    Participant

    @alex80ks feel free to post at pastebin.com and then post the generated URL here. Or create a ticket in BP’s https://buddypress.trac.wordpress.org/newticket using the same login info as you used here

    @alex80ks

    Participant

    here is pastebin
    on line 367 added .trigger('post-load')

    but same problem happens after i click Load more so we will try to solve that too.
    Thank you

    @alex80ks

    Participant

    Hello,
    i tryed to solve showing fancybox effect on images after clicking Load more and i add same trigger on line 342
    jq("#content ul.activity-list").append(response.contents).trigger('post-load');

    but still doesnt work. When i press Load more content gets expanded then i click on image and fancybox doesnt work.
    Any advice where i can put this trigger to test on my live website to make it working?
    Thank you 🙂

    @alex80ks

    Participant

    Read More problem solved
    here is pastebin
    on line 367 added .trigger('post-load') in file wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js

    Im sorry i have made mistake. this last post linked to Load more problem is working when i add same trigger .trigger('post-load') to line 342 in wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js

    Pastebin of Load more

    so you can test it by yourself and add if you want.
    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Need help with activity stream’ is closed to new replies.
Skip to toolbar