Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing Member Links in Activity List


  • Roland Fauster
    Participant

    @rfauster

    This is my third Post here within 24 hours and I feel I am spamming the forums already – so sorry about this!

    I want to add a class to the member links in the activity stream so I can direct the output to an ajax layer rather than reloading the page.

    I am making progress in changing existing classes of links to my own (unfortunately the member link does not have any class so I will have to fiddle around with my preg_replace a bit futher)..

    This Code:

    <?php
    add_filter( 'bp_get_activity_content', 'add_ajax_class', 1 );

    function add_ajax_class( $content ) {

    $content = preg_replace('/class="([^"]*)"/i', 'class='AjaxDivBox_Link'', $content);

    return $content;
    }
    ?>

    is what does it for me in the bp-customs.php in the mu-plugins directory however the code changes the link on the FULL site and not only in the activity content.. Is there something I overlooked??

  • The topic ‘Changing Member Links in Activity List’ is closed to new replies.
Skip to toolbar