Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

  • peterjhead
    Participant

    @peterjhead

    Merry Christmas! Happy new year! Be safe and blessed in the holidays!


    peterjhead
    Participant

    @peterjhead

    Sorry I meant to mention this takes care of only number one of all the questions in your thread.


    peterjhead
    Participant

    @peterjhead

    Try this in bp-custom.php

    function bp_non_member_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {

    if(!is_user_logged_in()) { // not logged in user
    wp_redirect( get_option('siteurl') . '/register' );
    } // user will be redirect to any link to want
    }
    }
    add_filter('get_header','bp_non_member_redirect',1);

    NOTE: If your using sitewide forums instead of group forums you will need to remove the comment /* */ around:
    || bbp_is_single_forum()
    in the above code. Merry Christmas!


    peterjhead
    Participant

    @peterjhead

    @chrisclayton So the code above doesn’t work then. Can I get a little more guidance because I am knew to writing code and to buddypress and I obviously am not sure how to do this. Scrap the code above, I wish there was an expert that would kindly show me how to do this I will be grateful. Sorry for being a noob. Thank you again!


    peterjhead
    Participant

    @peterjhead

    Will this code work, its outdated so I changed it a little bit because it had some depreciated code, I got it on WPMU Dev? Code was not displayed properly above so I re post it using the new cool editor. Sorry!

    displayed_user->id;
    } else {
    $potential_friend_id = $friend_id;
    }

    if ( $bp->loggedin_user->id == $potential_friend_id )
    return true;

    if (friends_check_friendship_status($bp->loggedin_user->id, $potential_friend_id) == ‘is_friend’)
    return true;

    return false;
    }

    function my_denied_activity_nonfriends( $a, $activities ) {

    //if admin we want to know
    if ( is_super_admin() )
    return $activities;

    foreach ( $activities->activities as $key => $activity ) {
    /* if member of a group – we want the activity even if nonfriend */
    if ( $activity->component != ‘groups’ && $activity->user_id != 0 && !my_is_friend_check($activity->user_id) && !my_is_atme_check($activity->content) ) {

    unset( $activities->activities[$key] );

    $activities->activity_count = $activities->activity_count-1;
    $activities->total_activity_count = $activities->total_activity_count-1;
    $activities->pag_num = $activities->pag_num -1;

    }
    }

    /* Renumber the array keys to account for missing items */
    $activities_new = array_values( $activities->activities );
    $activities->activities = $activities_new;

    return $activities;
    }
    add_action(‘bp_has_activities’, ‘my_denied_activity_nonfriends’, 10, 2 );

    function my_is_atme_check( $content ) {
    global $bp;

    if ( !is_user_logged_in() )
    return false;

    if (!$content)
    return false;

    $pattern = ‘/[@]+([A-Za-z0-9-_]+)/’;
    preg_match_all( $pattern, $content, $usernames );

    error_reporting(E_ERROR | E_PARSE);

    /* Make sure there’s only one instance of each username */
    if ( !$usernames = array_unique( $usernames[1] ) )
    return false;

    if ( in_array( bp_core_get_username( $bp->loggedin_user->id ), $usernames ) )
    return true;

    return false;
    }
    ?>


    peterjhead
    Participant

    @peterjhead

    Thank you @r-a-y So is this sort of fork from buddypress? Thanks for the info! I appreciate it!


    peterjhead
    Participant

    @peterjhead

    Thanks @rogercoathup for the info even though I was really hoping there was a plugin solution. Do you know how I can accomplish this even if it does include editing core files? I know that is a big No-No but I really need this functionality and I would greatly appreciate your help. I don’t have money to hire a developer but I will be very grateful sir.


    peterjhead
    Participant

    @peterjhead

    Let me rephrase my question then. Is there anywhere within the wordpress or buddypress code that can be edited so it will allow or force it to accept more than one scope? Does anyone have the knowledge to give me some guidance in how this can be accomplished. I appreciate any help. Thank you.


    peterjhead
    Participant

    @peterjhead

    I don’t understand? I was told there was a plugin to accomplish this by someone here called friendpress or something? Its on google but not here? It should not be this hard so why is it hard? Please help I need this feature. Is their anyone that can help me please?


    peterjhead
    Participant

    @peterjhead

    This plugin is a premium plugin? I have seen there is a free plugin to do this. Shouldn’t activity privacy be built into the core. Profile privacy is so why not include activity privacy? Please help! This is important and I have no coding skills so I would be grateful in how I can accomplish this. I don’t have money so any help will be gratefully appreciated.

Viewing 10 replies - 1 through 10 (of 10 total)
Skip to toolbar