Skip to:
Content
Pages
Categories
Search
Top
Bottom

Additional deep links in activity streams

  • @jcollier

    Participant

    One thing that’s missing are deep links from the activity streams to the specific blog post and forum entry, so that people can navigate directly to the content of interest, rather than having to go to a topic and dig down.

    I was using a solution from bp-tricks up until recently, but it doesn’t appear to be working after the most recent upgrade:

    http://bp-tricks.com/snippets/adding-buttons-to-activity-stream-entries/

    Any possibility of having these functions in BP core?

    -Jay

    /* Add Buttons to Activity Stream Items */
    /* http://bp-tricks.com/snippets/adding-buttons-to-activity-stream-entries/ */
    function my_bp_activity_entry_content() {
    
        if ( bp_get_activity_object_name() == 'blogs' && bp_get_activity_type() == 'new_blog_post' ) {?>
            <a class="view-post view-group-blog-comment" href="<?php bp_activity_thread_permalink() ?>">View group blog</a>
        <?php }
    
        if ( bp_get_activity_object_name() == 'blogs' && bp_get_activity_type() == 'new_blog_comment' ) {?>
            <a class="view-post view-group-blog-comment" href="<?php bp_activity_thread_permalink() ?>">View group blog</a>
        <?php }
    
        if ( bp_get_activity_object_name() == 'activity' && bp_get_activity_type() == 'activity_update' ) {?>
            <a class="view-post view-group-activity" href="<?php bp_activity_thread_permalink() ?>">View status update</a>
        <?php }
    
            if ( bp_get_activity_object_name() == 'groups' && bp_get_activity_type() == 'new_forum_topic' ) {?>
            <a class="view-thread view-group-discussion-topic" href="<?php bp_activity_thread_permalink() ?>">View group discussion</a>
        <?php }
    
            if ( bp_get_activity_object_name() == 'groups' && bp_get_activity_type() == 'new_forum_post' ) {?>
            <a class="view-post view-group-discussion-post" href="<?php bp_activity_thread_permalink() ?>">View group discussion</a>
        <?php }
  • The topic ‘Additional deep links in activity streams’ is closed to new replies.
Skip to toolbar