Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private'

Viewing 25 results - 951 through 975 (of 3,865 total)
  • Author
    Search Results
  • theacademicperson
    Participant

    I am using WordPress 4.6.1 and BuddyPress 2.6.2 for a week. To create a new discussion forum with functionalities of community websites (e.g. private message, member friendship etc.) for the members I installed bbPress 2.5.10 plugin today and was reading the BuddyPress documentations to use bbPress within BuddyPress. In this article the authors suggested to migrate the forum within BuddyPress to bbPress and in the (3) paragraph they suggested to go to settings > BuddyPress > Pages > Discusssion forums.

    I followed the path but couldn’t find “discussion forums” option within “page” or any other tabs in BuddyPress settings.

    My question may seem silly, but still I request for your help as I have just started using BuddyPress and haven’t published my website yet…I don’t have much knowledge about this plugins.

    one of the reasons that I think can be possible is that I haven’t created a forum yet using BuddyPress. Please guide me in this matter and if you know suggest any resources where I can find the step-by-step process to include bbPress forum within BuddyPress.

    #259175
    Venutius
    Moderator

    What you can do is hide that menu option option from non-logged in users. To do this, you need to install the WPFront User Role Editor plugin and it gives the the ability to choose who can see each menu option. It’s quick and dirty but also easy. Obviously is any not logged in user knows the address of the activity page they can still see it, but you could also set that page to private.

    #259174
    danbp
    Participant

    Please note that you don’t need to add your site url in each of your topic. It’s useless and considered as a bad practice when nobody asked specifically for it.

    About privacy, read here

    Making a WordPress & BuddyPress Site Private, the Right Way

    #259168
    danbp
    Participant

    Hi,

    Which group menu are you talking about ?
    How do you add the link ? And why ? Because, you haven’t to do that on a standard MS install, even for private groups. Sorry, but this point is a bit unclear.

    Review your forum settings:

    Installing Group and Sitewide Forums

    Group Settings and Roles

    #259164
    giaschel
    Participant

    Hi,

    I’m adding a bbpress forum to a private group one day, but the next day, the forum is no longer linked to the group. I have to re-link it.

    I have a multisite installation. I make sure to add the forum in both the Groups menu in the network settings as well as within the group management tab.

    Does anyone know why it does this?

    Thanks!

    #259116
    comunidadcrm
    Participant

    it always redirects to protected content page.
    Cannot find out where to unlock that.
    Any clue?
    thanks.

    BexxBl
    Participant

    I have this very specific problem I need to solve. The thing is I have this BuddyPress-Setup that is linked to my WP and WC Vendors. What I’m trying to achive is a sidebar/seller info tab displaying the BuddyPress-Profil informations from the Vendor. Something like this when the User is logged in:

    • Profile name (BuddyPress/WP)
    • Storename (from WC Vendors)
    • phone number
    • email-address
    • Button to send Private Message to Seller

    If the User is not logged in there should be a Button with the meassgae to please login. I already know how to do that button.
    I already linked my BuddyPress Profile with the WC Vendors store. So that the “Visit-Store”-Button is displayed on the BuddyPress profile of my Users (from knowledge Base of WC Vendors)

    How is the best way to approche this problem?

    I’m not looking for a fullywritten out solution just some suggestions where to start.

    I’m running the current versions of WP, BuddyPress, WooCommerce and WC Vendors(free) with the Socialize Theme. Also posted the question on the WC Vendors Support Site.

    Thank you for your help.

    bikerwp000
    Participant
    <?php
    /**
     * Plugin Name:       BP Loop Filters
     * Plugin URI:        https://codex.buddypress.org/add-custom-filters-to-loops-and-enjoy-them-within-your-plugin
     * Description:       Plugin example to illustrate loop filters
     * Version:           1.0
     * Author:            imath
     * Author URI:        http://imathi.eu
     * License:           GPL-2.0+
     * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     */
    
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    class BP_Loop_Filters {
    
    	/**
    	 * Constructor
    	 */
    	public function __construct() {
    		$this->setup_actions();
    		$this->setup_filters();
    	}
    
    	/**
    	 * Actions
    	 *
    	 * @uses bp_is_active()
    	 * @uses is_multisite()
    	 */
    	private function setup_actions() {
    		/**
    		 * Adds the random order to the select boxes of the Members, Groups and Blogs directory pages
    		 */
    		// Members component is core, so it will be available
    		add_action( 'bp_members_directory_order_options', array( $this, 'random_order' ) );
    
    		// You need to check Groups component is available
    		if ( bp_is_active( 'groups' ) ) {
    			add_action( 'bp_groups_directory_order_options',  array( $this, 'random_order' ) );
    		}
    
    		// You need to check WordPress config and that Blogs Component is available
    		if ( is_multisite() && bp_is_active( 'blogs' ) ) {
    			add_action( 'bp_blogs_directory_order_options',   array( $this, 'random_order' ) );
    		}
    
    		/**
    		 * Registers the Activity actions so that they are available in the Activity Administration Screen
    		 */
    		// You need to check Activity component is available
    		if ( bp_is_active( 'activity' ) ) {
    
    			add_action( 'bp_register_activity_actions', array( $this, 'register_activity_actions' ) );
    
    			// Adds a new filter into the select boxes of the Activity directory page,
    			// of group and member single items activity screens
    			add_action( 'bp_activity_filter_options',        array( $this, 'display_activity_actions' ) );
    			add_action( 'bp_member_activity_filter_options', array( $this, 'display_activity_actions' ) );
    
    			// You need to check Groups component is available
    			if ( bp_is_active( 'groups' ) ) {
    				add_action( 'bp_group_activity_filter_options', array( $this, 'display_activity_actions' ) );
    			}
    
    	        // You're going to output the favorite count after action buttons
    			add_action( 'bp_activity_entry_meta', array( $this, 'display_favorite_count' ) );
    		}
    
    	}
    
    	/**
    	 * Displays a new option in the Members/Groups & Blogs directories
    	 *
    	 * @return string html output
    	 */
    	public function random_order() {
    		?>
    		<option value="random"><?php _e( 'Random', 'buddypress' ); ?></option>
    		<?php
    	}
    
    	/**
    	 * Registering the Activity actions for your component
    	 *
    	 * The registered actions will also be available in Administration
    	 * screens
    	 *
    	 * @uses bp_activity_set_action()
    	 * @uses is_admin()
    	 */
    	public function register_activity_actions() {
    		/* arguments are :
    		- 'component_id', 'component_action_type' to use in {$wpdb->prefix}bp_activity database
    		- and 'caption' to display in the select boxes */
    		bp_activity_set_action( 'bp_plugin', 'bpplugin_action', __( 'BP Plugin Action' ) );
    
    		/* Activity Administration screen does not use bp_ajax_querystring
    		Moreover This action type is reordering instead of filtering so you will only
    		use it on front end */
    		if ( ! is_admin() ) {
    			bp_activity_set_action( 'bp_plugin', 'activity_mostfavs', __( 'Most Favorited' ) );
    		}
    	}
    
    	/**
    	 * Building an array to loop in from our display function
    	 *
    	 * Using bp_activity_get_types() will list all registered activity actions
    	 * but you need to get the ones for your plugin, and this particular function
    	 * directly returns an array of key => value. As you need to filter activity
    	 * with your component id, the global buddypress()->activity->actions will be
    	 * more helpful.
    	 *
    	 * @uses buddypress()
    	 * @return array the list of your plugin actions.
    	 */
    	private function list_actions() {
    
    		$bp_activity_actions = buddypress()->activity->actions;
    
    		$bp_plugin_actions = array();
    
    		if ( !empty( $bp_activity_actions->bp_plugin ) ) {
    			$bp_plugin_actions = array_values( (array) $bp_activity_actions->bp_plugin );
    		}
    
    		return $bp_plugin_actions;
    	}
    
    	/**
    	 * Displays new actions into the Activity select boxes
    	 * to filter activities
    	 * - Activity Directory
    	 * - Single Group and Member activity screens
    	 *
    	 * @return string html output
    	 */
    	public function display_activity_actions() {
    		$bp_plugin_actions = $this->list_actions();
    
    		if ( empty( $bp_plugin_actions ) ) {
    			return;
    		}
    
    		foreach ( $bp_plugin_actions as $type ):?>
    			<option value="<?php echo esc_attr( $type['key'] );?>"><?php echo esc_attr( $type['value'] ); ?></option>
    		<?php endforeach;
    	}
    
    	/**
    	 * Displays a mention to inform about the number of time the activity
    	 * was favorited.
    	 *
    	 * @global BP_Activity_Template $activities_template
    	 * @return string html output
    	 */
    	public function display_favorite_count() {
    		global $activities_template;
    
    		// BuddyPress < 2.0 or filtering bp_use_legacy_activity_query
    		if ( ! empty( $activities_template->activity->favorite_count ) ) {
    			$fav_count = $activities_template->activity->favorite_count;
    		} else {
    			// This meta should already have been cached by BuddyPress :)
    			$fav_count = (int) bp_activity_get_meta( bp_get_activity_id(), 'favorite_count' );
    		}
    
    		if ( ! empty( $fav_count ) ): ?>
    			<a name="favorite-<?php bp_activity_id();?>" class="button bp-primary-action">Favorited <span><?php printf( _n( 'once', '%s times', $fav_count ), $fav_count );?></span></a>
    		<?php endif;
    	}
    
    	/**
    	 * Filters
    	 */
    	private function setup_filters() {
    		add_filter( 'bp_ajax_querystring',              array( $this, 'activity_querystring_filter' ), 12, 2 );
    		add_filter( 'bp_activity_get_user_join_filter', array( $this, 'order_by_most_favorited' ),     10, 6 );
    		add_filter( 'bp_activity_paged_activities_sql', array( $this, 'order_by_most_favorited'),      10, 2 );
    
    		// Maybe Fool Heartbeat Activities!
    		add_filter( 'bp_before_activity_latest_args_parse_args', array( $this, 'maybe_fool_heartbeat' ), 10, 1 );
    	}
    
    	/**
    	 * Builds an Activity Meta Query to retrieve the favorited activities
    	 *
    	 * @param  string $query_string the front end arguments for the Activity loop
    	 * @param  string $object       the Component object
    	 * @uses   wp_parse_args()
    	 * @uses   bp_displayed_user_id()
    	 * @return array()|string $query_string new arguments or same if not needed
    	 */
    	public function activity_querystring_filter( $query_string = '', $object = '' ) {
    		if ( $object != 'activity' ) {
    			return $query_string;
    		}
    
    		// You can easily manipulate the query string
    		// by transforming it into an array and merging
    		// arguments with these default ones
    		$args = wp_parse_args( $query_string, array(
    			'action'  => false,
    			'type'    => false,
    			'user_id' => false,
    			'page'    => 1
    		) );
    
    		/* most favorited */
    		if ( $args['action'] == 'activity_mostfavs' ) {
    			unset( $args['action'], $args['type'] );
    
    			// on user's profile, shows the most favorited activities for displayed user
    			if( bp_is_user() ) {
    				$args['user_id'] = bp_displayed_user_id();
    			}
    
    			// An activity meta query :)
    			$args['meta_query'] = array(
    				array(
    					/* this is the meta_key you want to filter on */
    					'key'     => 'favorite_count',
    					/* You need to get all values that are >= to 1 */
    					'value'   => 1,
    					'type'    => 'numeric',
    					'compare' => '>='
    				),
    			);
    
    			$query_string = empty( $args ) ? $query_string : $args;
            }
    
            return apply_filters( 'bp_plugin_activity_querystring_filter', $query_string, $object );
    	}
    
    	/**
    	 * Ninja Warrior trick to reorder the Activity Loop
    	 * regarding the activities favorite count
    	 *
    	 * @param  string $sql        the sql query that will be run
    	 * @param  string $select_sql the select part of the query
    	 * @param  string $from_sql   the from part of the query
    	 * @param  string $where_sql  the where part of the query
    	 * @param  string $sort       the sort order (leaving it to DESC will be helpful!)
    	 * @param  string $pag_sql    the offset part of the query
    	 * @return string $sql        the current or edited query
    	 */
    	public function order_by_most_favorited( $sql = '', $select_sql = '', $from_sql = '', $where_sql = '', $sort = '', $pag_sql = '' ) {
    		if ( apply_filters( 'bp_use_legacy_activity_query', false ) ) {
    			preg_match( '/\'favorite_count\' AND CAST\((.*) AS/', $where_sql, $match );
    
    			if ( ! empty( $match[1] ) ) {
    				$new_order_by = 'ORDER BY '. $match[1] .' + 0';
    				$new_select_sql = $select_sql . ', '. $match[1] .' AS favorite_count';
    
    				$sql = str_replace(
    					array( $select_sql, 'ORDER BY a.date_recorded' ),
    					array( $new_select_sql, $new_order_by ),
    					$sql
    				);
    			}
    
    		// $select_sql is carrying the requested argument since BuddyPress 2.0.0
    		} else {
    			$r = $select_sql;
    
    			if ( empty( $r['meta_query'] ) || ! is_array( $r['meta_query'] ) ) {
    				return $sql;
    			} else {
    				$meta_query_keys = wp_list_pluck( $r['meta_query'], 'key' );
    
    				if ( ! in_array( 'favorite_count', $meta_query_keys ) ) {
    					return $sql;
    				}
    
    				preg_match( '/\'favorite_count\' AND CAST\((.*) AS/', $sql, $match );
    
    				if ( ! empty( $match[1] ) ) {
    					$sql = str_replace( 'ORDER BY a.date_recorded', 'ORDER BY '. $match[1] .' + 0', $sql );
    				}
    			}
    		}
    
    		return $sql;
    	}
    
    	/**
    	 * Cannot pass the favorite data for now so just fool heartbeat activities
    	 */
    	public function maybe_fool_heartbeat( $r = array() ) {
    		if ( empty( $r['meta_query'] ) ) {
    			return $r;
    		}
    
    		$meta_query_keys = wp_list_pluck( $r['meta_query'], 'key' );
    
    		if ( ! in_array( 'favorite_count', $meta_query_keys ) ) {
    			return $r;
    		} else {
    			$r['since'] = '3000-12-31 00:00:00';
    		}
    
    		return $r;
    	}
    }
    
    // 1, 2, 3 go !
    function bp_loop_filters() {
    	return new BP_Loop_Filters();
    }
    
    add_action( 'bp_include', 'bp_loop_filters' );
    
    
    #259043
    danbp
    Participant

    Hi,

    To get the link to a user profile:
    $link = bp_get_loggedin_user_link();

    Many use examples can be found on the forum. Ie:

    [Resolved] BuddyPress Links URLs

    Is it possible to make Activity and Forum profile tabs private?

    #259033
    ositive
    Participant

    Thank you Shanebp
    I tried the following steps (below is the final code):
    -I started from the basic random code
    -I introduced the function to create and pass #sql (like Ninja Warrior trick code)
    but it seems not working.. Can you help me please (I’m really trying everithing..)?
    Thanks

    <?php
     
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
     
    class BP_Loop_Filters {
     
        
        public function __construct() {
            $this->setup_actions();
        }
     
        private function setup_actions() {
            /**
             * Adds the Rating order to the select boxes of the Members directory pages
             */
            // Members component is core, so it will be available
            add_action( 'bp_members_directory_order_options', array( $this, 'rating_order' ) );
     
        }
     
        public function rating_order() {
           
    	global $wpdb;
    
    	$sql = "SELECT
                     a.ID as id, a.user_nicename AS name, a.display_name AS displayname, AVG(star) AS rating, COUNT(star) AS reviews
                 FROM {$wpdb->prefix}users AS a
                 LEFT JOIN {$wpdb->prefix}bp_activity AS b ON a.ID = b.usercheck
                 WHERE (b.is_activated is null or b.is_activated=1)
                 GROUP BY id
                 ORDER BY rating DESC";
        var_dump( $sql );
    
    	return $sql;
    
        }
     
    }
     
    function bp_loop_filters() {
        return new BP_Loop_Filters();
    }
     
    add_action( 'bp_include', 'bp_loop_filters' );
    #259030
    bdollin
    Participant

    Thanks but I should be more specific. I want to show a default subject field in a private message that the user is composing. I want to avoid changing the core compose.php and use an add_filter instead if possible

    http://mywebsite.com/profiles/username/messages/compose/?r=recipientname&_wpnonce=a4a33412e1

    It would be easy if we could add something like subject=”message’ but not possible

    #259029
    Chosker
    Participant

    Hello,

    I’m adding TinyMCE support to my front end at bbpress and buddypress.
    so far so good, most of what I want is working except one thing: on the Private Messages reply form I can’t send a message because I get the following error:
    There was a problem sending that reply. Please try again.

    It works fine for the Compose page, just not on replying to another message.
    it’s basically this, like @bossataxiatogether describes at the bottom. but that thread is closed so I had to make this new one.

    I’m calling wp_editor like this:
    wp_editor( '', 'message_content', $settings );
    and my settings have this:
    'textarea_name' => 'message_content',

    I’ve already tried changing ‘message_content’ to just ‘content’ (I have it as ‘content’ in my compose page and it works there)
    also tried having and not having the original textarea (in my compose page its removed and it works there)
    just fyi: this is all in new php files under my template/buddypress folder

    so I don’t know what to try anymore
    any suggestions?

    thanks πŸ™‚

    Earl_D
    Participant

    So the last few weeks search engine crawls have brought my BP site to its knees even with a 2gig of ram on my VPS

    Wondering if anyone has tips for dealing with search engines on a private BP network. Really the only pages I want then to index are the homepage and about pages everything else should be indexed.

    Thanks in advance for any help

    Brajesh Singh
    Participant

    Please put this code in your bp-custom.php

    
    function buddydev_hide_members_directory_from_all_except_admin() {
    
    	if ( bp_is_members_directory() && ! is_super_admin() ) {
    		//should we add a message too?
    		//bp_core_add_message( 'Private page.', 'error' );
    		bp_core_redirect( site_url('/') );
    	}
    }
    add_action( 'bp_template_redirect', 'buddydev_hide_members_directory_from_all_except_admin' );
    

    That should do it. Hoe it helps.

    danbp
    Participant

    @fearthemoose, @rezbiz,

    Here “the best guarded secret” finally revealed !
    But it’s not a secret, is part of Codex and a multi handled topic subject on this forum.

    What we want to do: remove access possibility.
    Where: on BuddyBar navigation menu (the one below the profile header).
    Specifics: make the activity and forum tabs only visible to the logged in user.

    NOTE: The activity tab is shown by default when you visit a profile.

    As we are going to hide/remove this tab to visitors, we need to define as first another default tab. If we won’t do that, the visitor will get a Page not found error. Which is not exactly the case here, the page exist but the visitor can’t access it.

    Let’s define arbitrary Profile as the new default tab. You can of course define what ever other existing tab on your BuddyBar as default.

    Add this line to bp-custom.php
    define( 'BP_DEFAULT_COMPONENT','profile' );

    Now the mega “open secret” !

    The folowing snippet contains almost any BP menu items you can have on a BuddyBar, and includes also the Forum item, in case you use bbPress.
    You can remove or comment out those you don’t want to use.
    Note also that it is only an example – you have to play with it to fit your need. But at least you have the right syntax to use.
    Note also that some profile menu items are user only, such as message or notice. In other words, these are always private.

    This function goes preferably to bp-custom.php

    function bpfr_hide_tabs() {
    global $bp;
    	 /**
    	 * class_exists() & bp_is_active are recommanded to avoid problems during updates 
    	 * or when Component is deactivated
    	 */
    
    	if( class_exists( 'bbPress' ) || bp_is_active ( 'groups' ) ) :
            
            /** here we fix the conditions. 
            * Are we on a profile page ? | is user site admin ? | is user logged in ?
            */
    	if ( bp_is_user() && !is_super_admin() && !is_user_logged_in() ) {
    
            /* and here we remove our stuff ! */
    		bp_core_remove_nav_item( 'activity' );
    		bp_core_remove_nav_item( 'friends' );
    		bp_core_remove_nav_item( 'groups' );
    		bp_core_remove_nav_item( 'forums' );
    	}
    	endif;
    }
    add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );

    Some other hints for privacy
    if you want to allow only the profile owner to view some tabs, replace
    !is_user_logged_in by !bp_is_my_profile() – this scenario doesn’t need a check for logged in users as it is made by bp_is_my_profile.

    If you want only to make a profile private, read here.

    If you want to remove a sub-nav item (ie. View on Profile), you use something like:
    bp_core_remove_subnav_item( 'profile', 'view' );

    Many other possibilities for navigation are also available, including for groups. Several examples are given on Codex, here.

    And if not enough, RTFM and search the forum ! πŸ™‚

    Have fun !

    #258761
    tizianopitisci
    Participant

    I would like to have on my website the same solution of buddydev.com. See this examples please:

    BUDDYPRESS: https://buddypress.org/members/tizianopitisci/notifications/
    BUDDYDEV: https://buddydev.com/members/tizianopitisci/notifications/

    In buddydev users:
    1. Recive a notification by email with a link inside;
    2. Follow the link;
    3. Make the log-in;
    4. Access the private area

    I wuold like to have the same solution. Do you think is possible?

    Thanks for your help
    Tiziano

    #258752
    ico33
    Participant

    Hi,

    i can’t understand how to solve this 3 questions. I am not expert, i’m not a programmer and I can’t use code.

    1) Logout: when a user logs out from a private page (message, for example) using the Buddypress-Access-Widget, it says “404 error page not found”. It’s obvious. How can i redirect the logout to the Home Page, solving the problem? Is there a solution without using code?

    2) Lost password: in Buddypress Access Widget you can Log-In and Register. No more. If you put a wrong password, the user is redirect to wp-login and this “loses” my site’s look, because it goes to a WordPress branded page. Is there a solution?

    #258742
    tizianopitisci
    Participant

    Thank you Henry, I’ve just made the following test:
    -no plugin exept Buddypress
    -defauolt wordpress theme “twenty fifteen”

    but we still have the issue. The point is that the message private as well as the notification area return a “not found page” message instead a “log-in required” message. I’m running the last buddypress version (italian located website).

    Is that a bug?

    jaumearagay
    Participant

    As admin or not, in the groups list page the membership request button works properly. When clicked, it stays on the same page, changes it’s name and the request is done to the group BUT the same button in the group’s front page instead of staying on the same page, changing it’s name and doing the request it tries to move to the new page on the link and shows the 404 error.

    #258726
    ashlealanier
    Participant

    Currently we have a site using BuddyPress with Groups enabled. When a user is logged in, in the directory, they SHOULD see all groups that are Private or Public, but currently they are only able to see the groups in which they are members. Is this a known glitch, or do I have a setting off somewhere?

    Thanks!

    #258712
    SrGato29
    Participant

    Buddypress VersiΓ³n 2.6.1.1
    Wordpress Version 4.5.4

    My problem is that when 2 users begin a conversation using the buddypress messages component, the email goes to theirs emails, but if they press reply instead of going to the website, they send the message to the administrator, so How I can stop the reply to the admin? or maybe a way to stop the emails outside the website, so that way the only way that they can communicate is with buddypress.

    #258659
    jaumearagay
    Participant

    It’s a PRIVATE group I talk about, not a HIDDEN one. My fault! πŸ˜‰

    #258655
    Webbaku
    Participant

    I hope that I used the right section and that this is not been signaled before, I looked for it but I have found anything.

    Pratical explanation:

    1. User A create “Group 1” and “Group 2”, both private groups.
    2. User B make a request for both groups
    3. User A receive this notification: 2 new membership requests for the group “Group 1”

    The line should be splitted in:

    1 new membership requests for the group "Group 1"
    1 new membership requests for the group "Group 2"

    Or if this is not possible, just use somethign like “2 new membership requests for some of your groups”.

    #258653
    jaumearagay
    Participant

    Has anyboby tried this, please?
    Can you join a private group either being an admin or not?
    Is this a bug or is this something that affects only my install?

    Thanks for your time! πŸ˜‰

Viewing 25 results - 951 through 975 (of 3,865 total)
Skip to toolbar