• Resolved atmojones

    (@atmojones)


    I’ve been trying to get the lightbox to work with images that are displayed in a buddypress feed. I’ve run in to several issues and I’m not sure which should be addressed first.

    I used the html wrapping the image on a post to try enabling it, but there is a chance I’m missing some classes that need to be on parent elements of the document for it to work correctly.

    The result is the images are linked, and when clicked they appear in the lightbox, however all images on the page are part of a gallery in the lightbox view. This happens if I put a gallery in on activity and a single image in some other activities; all of them become part of one gallery when viewing the lightbox.

    I guess my main question is what classes need to be on the image element and the parent elements for lightbox to function properly?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bradvin

    (@bradvin)

    I had a look at your page.

    The images are being grouped together because they all have the same rel attribute value of “nofollow”. If you can change the rel to be unique per section, then it will work as expected. I am not sure you will have control over the HTML through.

    There is a feature in FooBox PRO which allows you to add custom selectors, which you can use to “group” images together by targeting the containing element. But then again, if the rel’s are all the same, then you might have the same problem.

    Thread Starter atmojones

    (@atmojones)

    Thanks so much for the quick response. That was the lead I needed. It looks like buddypress has some filters that add rel=”nofollow” to all images in activity feeds, removing them with the below code has got it all working

    remove_filter( 'bp_get_activity_content',               'bp_activity_make_nofollow_filter' );
    remove_filter( 'bp_get_activity_content_body',          'bp_activity_make_nofollow_filter' );
    remove_filter( 'bp_get_activity_parent_content',        'bp_activity_make_nofollow_filter' );
    remove_filter( 'bp_get_activity_latest_update',         'bp_activity_make_nofollow_filter' );
    remove_filter( 'bp_get_activity_latest_update_excerpt', 'bp_activity_make_nofollow_filter' );
    remove_filter( 'bp_get_activity_feed_item_description', 'bp_activity_make_nofollow_filter' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘FooBox in buddypress activities’ is closed to new replies.