Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private'

Viewing 25 results - 526 through 550 (of 3,819 total)
  • Author
    Search Results
  • #279424
    zatrox
    Participant

    Hi,

    First of all I’m sorry for my newbie question.

    I want to create a networking web page for users to create private spaces for their companies. For eg. a user will create XYZ Company space and only @xyx.com mail owners will be able to see content. And another user will create ABC Company space and only @abc.com users will be able to see its content.

    Can I do this with buddypress?

    shanebp
    Moderator

    It’s okay to place a call for devs here.
    It’s nice to see the occasional person who doesn’t want free work.

    Because there is no way to do a private message on these forums, typically we make sure the OP includes a method to contact them.
    Then we close the thread so that any discussion takes place elsewhere.


    @elichersky333
    – how can you be contacted ?

    #279193
    mrditt
    Participant

    Could anyone give experiences or comparisons between iFlyChat and BP Better Messages? I need a solution that gives users the ability to have private chats and group chats with the ability to send attachments. Iflychat is expensive (if including the group chat option) and I’m concerned about the logging of private information, BP Better Messages seems like a good option but I wanted to get feedback first. Alternatively, if anyone has experience with any other solutions, that would be really appreciated too.

    donniewalden
    Participant

    I am de-bugging a new client’s old website. They have over 3k active paying users so this is a bit of a sensitive job.

    The issue: I have the buddypress private message system activated and have a php file located: buddypress/members/single/message/single.php

    This all works correctly except for the “message” variable. When the user gets a private message it shows up appropriately in their inbox with the “highlight” tag displaying the email and excerpt (which is basically the whole message if it’s short).

    I understand the the $message variable is packaged into a $content variable which is served as that highlight. So the excerpt displays the actual private message that is sent in the inbox list, but when you open that actual message, the massage that was in the excerpt is replaced with “[deleted]”

    It might be helpful to note these are messages sent from non-users of the website. These people sending the messages are not logged in and should be able to simply leave a message to this persons inbox. The user comes back as “Deleted User” since they aren’t logged in, but all I need to find out is how to make the content from the excerpt show up in the actual message. It’s just saying [deleted].

    Thank you in advancce!

    I have a screenshot if it’s helpful but don’t think I can attach it here.

    #279061
    Anonymous User 16484011
    Inactive

    Hi !

    Prashant,

    Today I see your profile and some how I go to this page where you post this plugin and I see that on WordPress plugin official page “https://wordpress.org/plugins/bp-custom-functionalities/” and here has the developer name is yours !

    Congrats ! to you man for making this plugin. I installed and it’s very useful me. Specially it’s one feature “Private profile – that means one member can not see other members profile.”

    Thanks man,

    Keep it up !

    Regards

    Anonymous User 16484011
    Inactive

    I am not using any buddy press template I use Youzer plugin. I think this plugin gives me this template. as you can see in the video path.

    By the way …

    1. I can’t understand your above answer.

    2. What can I do wrong in the video ?

    3. What can I do now for preventing users other than admin to delete the private conversation.

    4. Can I put your above code in plugin’s directory’s path “\wp-content\plugins\youzer\includes\public\templates\members\single\messages” single.php file ?

    5. Is any other way or plugin to prevent users other than admin to delete private message ?

    Thanks

    randomuser2000
    Participant

    Short story:
    How can i migrate my users from Ultimate Member to BuddyPress?

    Long story:
    I was really get frauded by this Ultimate Member guys claiming their plugin is the Ultimate solution and BuddyPress is a bloated hard to configure ancient relic. I payed for hundreds of dollars for their complete bundle and a bug from their plugin which i discovered very lately killed site (they create a record in wp-options table for every damn user!) And that was eating my server’s 8 GB of ram and them system were forced to kill MySQL for extra ram. This also caused a corrupted database etc..

    Anyway i have around 40k users now in Ultimate Member and my license expired so i can’t use Private Messaging (they charge 45$ for just PM!!) so i want to use BuddyPress (which i should have done from the beginining).

    So is there a way to migrate to BuddyPress keeping all users?

    #278887

    In reply to: Site Wide Activity

    Prashant Singh
    Participant

    Private group activities are by default excluded from the sitewide activity so this plugin already excludes them. No need to do any settings, it works out of the box.

    Thanks

    #278875

    In reply to: Site Wide Activity

    mrditt
    Participant

    I did look at it, but it doesn’t seem to give an option to exclude private group activity, I’m I correct? If so, is there any work around? Thank you!

    jg4dg6
    Participant

    I’d like to make BP private messages more akin to Facebook messenger. Is there a plugin for this? If not is there a chat plugin separate from BP you’d recommend?

    shanebp
    Moderator

    When I click on “private message” in another users profile I am redirected to my general “messages” page…

    Yes that is BP behavior. And I agree that it doesn’t make much sense.
    This plugin opens a pop-up instead: BuddyProfileMessageUX Free

    jg4dg6
    Participant

    When I click on “private message” in another users profile I am redirected to my general “messages” page instead of directly to message composition. Is this normal or should i be landing on the page where you compose a message towards said user like any other website?

    #278519
    John
    Participant

    I have taken on development of a site which currently uses buddypress 2.9.4, although really only uses the members profile functionality, so no groups, activity streams, notifications, friendships, private messaging etc.

    In truth, I don’t think the BP was the right choice for the site but it’s so baked into the site now that changing to something different just isn’t an option.

    I’m currently in the process of developing a new theme for the site and so now would be a good time to upgrade from 2.9.4 to 3.2 (current latest).

    The only add-on plugin for BP on the site is BuddyPress Xprofile Custom Fields Type, for which I see development has now ceased but that there is a replacement for.

    Is there anything that I should be aware of, gotchas etc, in making the upgrade? I’m quite wary of making the upgrades as the existing codebase isn’t mine and I am new to BP development, although a very experienced WP dev.

    I’ve read the release notes and nothing leaps out at me as being a massive problem but I am anticipating some, deprecated functions being one.

    So, any general or specific advice from others who have gone through the upgrade would be appreciated!

    Thanks,

    John

    Prashant Singh
    Participant
    <?php
    /**
     * BP Nouveau Messages main template.
     *
     * This template is used to inject the BuddyPress Backbone views
     * dealing with user's private messages.
     *
     * @since 3.0.0
     * @version 3.1.0
     */
    ?>
    <div class="subnav-filters filters user-subnav bp-messages-filters" id="subsubnav"></div>
    
    <div class="bp-messages-feedback"></div>
    <div class="bp-messages-content"></div>
    
    <script type="text/html" id="tmpl-bp-messages-feedback">
    	<div class="bp-feedback {{data.type}}">
    		<span class="bp-icon" aria-hidden="true"></span>
    		<p>{{{data.message}}}</p>
    	</div>
    </script>
    
    <?php
    /**
     * This view is used to inject hooks buffer
     */
    ?>
    <script type="text/html" id="tmpl-bp-messages-hook">
    	{{{data.extraContent}}}
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-form">
    	<?php bp_nouveau_messages_hook( 'before', 'compose_content' ); ?>
    
    	<label for="send-to-input"><?php esc_html_e( 'Send @Username', 'buddypress' ); ?></label>
    	<input type="text" name="send_to" class="send-to-input" id="send-to-input" />
    
    	<label for="subject"><?php _e( 'Subject', 'buddypress' ); ?></label>
    	<input type="text" name="subject" id="subject"/>
    
    	<div id="bp-message-content"></div>
    
    	<?php bp_nouveau_messages_hook( 'after', 'compose_content' ); ?>
    
    	<div class="submit">
    		<input type="button" id="bp-messages-send" class="button bp-primary-action" value="<?php echo esc_attr_x( 'Send', 'button', 'buddypress' ); ?>"/>
    		<input type="button" id="bp-messages-reset" class="text-button small bp-secondary-action" value="<?php echo esc_attr_x( 'Reset', 'form reset button', 'buddypress' ); ?>"/>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-editor">
    	<?php
    	// Add a temporary filter on editor buttons
    	add_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 );
    
    	wp_editor(
    		'',
    		'message_content',
    		array(
    			'textarea_name' => 'message_content',
    			'teeny'         => false,
    			'media_buttons' => false,
    			'dfw'           => false,
    			'tinymce'       => true,
    			'quicktags'     => false,
    			'tabindex'      => '3',
    			'textarea_rows' => 5,
    		)
    	);
    
    	// Remove the temporary filter on editor buttons
    	remove_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 );
    	?>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-paginate">
    	<# if ( 1 !== data.page ) { #>
    		<button id="bp-messages-prev-page"class="button messages-button">
    			<span class="dashicons dashicons-arrow-left"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Previous page', 'link', 'buddypress' ); ?></span>
    		</button>
    	<# } #>
    
    	<# if ( data.total_page !== data.page ) { #>
    		<button id="bp-messages-next-page"class="button messages-button">
    			<span class="dashicons dashicons-arrow-right"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Next page', 'link', 'buddypress' ); ?></span>
    		</button>
    	<# } #>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-filters">
    	<li class="user-messages-search" role="search" data-bp-search="{{data.box}}">
    		<div class="bp-search messages-search">
    			<?php bp_nouveau_message_search_form(); ?>
    		</div>
    	</li>
    	<li class="user-messages-bulk-actions"></li>
    </script>
    
    <script type="text/html" id="tmpl-bp-bulk-actions">
    	<input type="checkbox" id="user_messages_select_all" value="1"/>
    	<label for="user_messages_select_all"><?php esc_html_e( 'All Messages', 'buddypress' ); ?></label>
    	<div class="bulk-actions-wrap bp-hide">
    		<div class="bulk-actions select-wrap">
    			<label for="user-messages-bulk-actions" class="bp-screen-reader-text">
    				<?php esc_html_e( 'Select bulk action', 'buddypress' ); ?>
    			</label>
    			<select id="user-messages-bulk-actions">
    				<# for ( i in data ) { #>
    					<option value="{{data[i].value}}">{{data[i].label}}</option>
    				<# } #>
    			</select>
    			<span class="select-arrow" aria-hidden="true"></span>
    		</div>
    		<button class="messages-button bulk-apply bp-tooltip" type="submit" data-bp-tooltip="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>">
    			<span class="dashicons dashicons-yes" aria-hidden="true"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Apply', 'button', 'buddypress' ); ?></span>
    		</button>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-thread">
    	<div class="thread-cb">
    		<input class="message-check" type="checkbox" name="message_ids[]" id="bp-message-thread-{{data.id}}" value="{{data.id}}">
    		<label for="bp-message-thread-{{data.id}}" class="bp-screen-reader-text"><?php esc_html_e( 'Select message:', 'buddypress' ); ?> {{data.subject}}</label>
    	</div>
    
    	<# if ( ! data.recipientsCount ) { #>
    		<div class="thread-from">
    			<a class="user-link" href="{{data.sender_link}}">
    				<img class="avatar" src="{{data.sender_avatar}}" alt="" />
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'From:', 'buddypress' ); ?></span>
    				<span class="user-name">{{data.sender_name}}</span>
    			</a>
    		</div>
    	<# } else {
    		var recipient = _.first( data.recipients );
    		#>
    		<div class="thread-to">
    			<a class="user-link" href="{{recipient.user_link}}">
    				<img class="avatar" src="{{recipient.avatar}}" alt="" />
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'To:', 'buddypress' ); ?></span>
    				<span class="user-name">{{recipient.user_name}}</span>
    			</a>
    
    			<# if ( data.toOthers ) { #>
    				<span class="num-recipients">{{data.toOthers}}</span>
    			<# } #>
    		</div>
    	<# } #>
    
    	<div class="thread-content" data-thread-id="{{data.id}}">
    		<div class="thread-subject">
    			<span class="thread-count">({{data.count}})</span>
    			<a class="subject" href="../view/{{data.id}}/">{{data.subject}}</a>
    		</div>
    		<p class="excerpt">{{data.excerpt}}</p>
    	</div>
    	<div class="thread-date">
    		<time datetime="{{data.date.toISOString()}}">{{data.display_date}}</time>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-preview">
    	<# if ( undefined !== data.content ) { #>
    
    		<h2 class="message-title preview-thread-title"><?php esc_html_e( 'Active conversation:', 'buddypress' ); ?><span class="messages-title">{{{data.subject}}}</span></h2>
    		<div class="preview-content">
    			<header class="preview-pane-header">
    
    				<# if ( undefined !== data.recipients ) { #>
    					<dl class="thread-participants">
    						<dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt>
    						<dd>
    							<ul class="participants-list">
    								<# for ( i in data.recipients ) { #>
    									<li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li>
    								<# } #>
    							</ul>
    						</dd>
    					</dl>
    				<# } #>
    
    				<div class="actions">
    					<?php if(current_user_can('manage_options')){ ?>
    
    					<button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>">
    						<span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span>
    					</button>
    				<?php }?>
    
    					<# if ( undefined !== data.star_link ) { #>
    
    						<# if ( false !== data.is_starred ) { #>
    							<a role="button" class="message-action-unstar bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="unstar" aria-pressed="true" data-bp-tooltip="<?php esc_attr_e( 'Unstar Conversation', 'buddypress' ); ?>">
    								<span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Conversation', 'buddypress' ); ?></span>
    							</a>
    						<# } else { #>
    							<a role="button" class="message-action-star bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="star" aria-pressed="false" data-bp-tooltip="<?php esc_attr_e( 'Star Conversation', 'buddypress' ); ?>">
    								<span class="bp-screen-reader-text"><?php esc_html_e( 'Star Conversation', 'buddypress' ); ?></span>
    							</a>
    						<# } #>
    
    					<# } #>
    
    					<a href="../view/{{data.id}}/" class="message-action-view bp-tooltip bp-icons" data-bp-action="view" data-bp-tooltip="<?php esc_attr_e( 'View full conversation and reply.', 'buddypress' ); ?>">
    						<span class="bp-screen-reader-text"><?php esc_html_e( 'View full conversation and reply.', 'buddypress' ); ?></span>
    					</a>
    
    					<# if ( data.threadOptions ) { #>
    						<span class="bp-messages-hook thread-options">
    							{{{data.threadOptions}}}
    						</span>
    					<# } #>
    				</div>
    			</header>
    
    			<div class='preview-message'>
    				{{{data.content}}}
    			</div>
    
    			<# if ( data.inboxListItem ) { #>
    				<table class="bp-messages-hook inbox-list-item">
    					<tbody>
    						<tr>{{{data.inboxListItem}}}</tr>
    					</tbody>
    				</table>
    			<# } #>
    		</div>
    	<# } #>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single-header">
    	<h2 id="message-subject" class="message-title single-thread-title">{{{data.subject}}}</h2>
    	<header class="single-message-thread-header">
    		<# if ( undefined !== data.recipients ) { #>
    			<dl class="thread-participants">
    				<dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt>
    				<dd>
    					<ul class="participants-list">
    						<# for ( i in data.recipients ) { #>
    							<li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li>
    						<# } #>
    					</ul>
    				</dd>
    			</dl>
    		<# } #>
    
    		<div class="actions">
    					<?php if(current_user_can('manage_options')){ ?>
    
    			<button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>">
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span>
    			</button>
    <?php }?>
    		</div>
    	</header>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single-list">
    	<div class="message-metadata">
    		<# if ( data.beforeMeta ) { #>
    			<div class="bp-messages-hook before-message-meta">{{{data.beforeMeta}}}</div>
    		<# } #>
    
    		<a href="{{data.sender_link}}" class="user-link">
    			<img class="avatar" src="{{data.sender_avatar}}" alt="" />
    			<strong>{{data.sender_name}}</strong>
    		</a>
    
    		<time datetime="{{data.date.toISOString()}}" class="activity">{{data.display_date}}</time>
    
    		<div class="actions">
    			<# if ( undefined !== data.star_link ) { #>
    
    				<button type="button" class="message-action-unstar bp-tooltip bp-icons <# if ( false === data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="unstar" data-bp-tooltip="<?php esc_attr_e( 'Unstar Message', 'buddypress' ); ?>">
    					<span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Message', 'buddypress' ); ?></span>
    				</button>
    
    				<button type="button" class="message-action-star bp-tooltip bp-icons <# if ( false !== data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="star" data-bp-tooltip="<?php esc_attr_e( 'Star Message', 'buddypress' ); ?>">
    					<span class="bp-screen-reader-text"><?php esc_html_e( 'Star Message', 'buddypress' ); ?></span>
    				</button>
    
    			<# } #>
    		</div>
    
    		<# if ( data.afterMeta ) { #>
    			<div class="bp-messages-hook after-message-meta">{{{data.afterMeta}}}</div>
    		<# } #>
    	</div>
    
    	<# if ( data.beforeContent ) { #>
    		<div class="bp-messages-hook before-message-content">{{{data.beforeContent}}}</div>
    	<# } #>
    
    	<div class="message-content">{{{data.content}}}</div>
    
    	<# if ( data.afterContent ) { #>
    		<div class="bp-messages-hook after-message-content">{{{data.afterContent}}}</div>
    	<# } #>
    
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single">
    	<?php bp_nouveau_messages_hook( 'before', 'thread_content' ); ?>
    
    	<div id="bp-message-thread-header" class="message-thread-header"></div>
    
    	<?php bp_nouveau_messages_hook( 'before', 'thread_list' ); ?>
    
    	<ul id="bp-message-thread-list"></ul>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_list' ); ?>
    
    	<?php bp_nouveau_messages_hook( 'before', 'thread_reply' ); ?>
    
    	<form id="send-reply" class="standard-form send-reply">
    		<div class="message-box">
    			<div class="message-metadata">
    
    				<?php bp_nouveau_messages_hook( 'before', 'reply_meta' ); ?>
    
    				<div class="avatar-box">
    					<?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?>
    
    					<strong><?php esc_html_e( 'Send a Reply', 'buddypress' ); ?></strong>
    				</div>
    
    				<?php bp_nouveau_messages_hook( 'after', 'reply_meta' ); ?>
    
    			</div><!-- .message-metadata -->
    
    			<div class="message-content">
    
    				<?php bp_nouveau_messages_hook( 'before', 'reply_box' ); ?>
    
    				<label for="message_content" class="bp-screen-reader-text"><?php _e( 'Reply to Message', 'buddypress' ); ?></label>
    				<div id="bp-message-content"></div>
    
    				<?php bp_nouveau_messages_hook( 'after', 'reply_box' ); ?>
    
    				<div class="submit">
    					<input type="submit" name="send" value="<?php echo esc_attr_x( 'Send Reply', 'button', 'buddypress' ); ?>" id="send_reply_button"/>
    				</div>
    
    			</div><!-- .message-content -->
    
    		</div><!-- .message-box -->
    	</form>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_reply' ); ?>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_content' ); ?>
    </script>

    Please use this file.

    Thanks

    Anonymous User 16484011
    Inactive

    Hey !

    It’s not working or I can’t do properly. Can you please see my file and make a changes to delete only administrator users only show delete private message button ?

    <?php
    /**
     * BP Nouveau Messages main template.
     *
     * This template is used to inject the BuddyPress Backbone views
     * dealing with user's private messages.
     *
     * @since 3.0.0
     * @version 3.1.0
     */
    ?>
    <div class="subnav-filters filters user-subnav bp-messages-filters" id="subsubnav"></div>
    
    <div class="bp-messages-feedback"></div>
    <div class="bp-messages-content"></div>
    
    <script type="text/html" id="tmpl-bp-messages-feedback">
    	<div class="bp-feedback {{data.type}}">
    		<span class="bp-icon" aria-hidden="true"></span>
    		<p>{{{data.message}}}</p>
    	</div>
    </script>
    
    <?php
    /**
     * This view is used to inject hooks buffer
     */
    ?>
    <script type="text/html" id="tmpl-bp-messages-hook">
    	{{{data.extraContent}}}
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-form">
    	<?php bp_nouveau_messages_hook( 'before', 'compose_content' ); ?>
    
    	<label for="send-to-input"><?php esc_html_e( 'Send @Username', 'buddypress' ); ?></label>
    	<input type="text" name="send_to" class="send-to-input" id="send-to-input" />
    
    	<label for="subject"><?php _e( 'Subject', 'buddypress' ); ?></label>
    	<input type="text" name="subject" id="subject"/>
    
    	<div id="bp-message-content"></div>
    
    	<?php bp_nouveau_messages_hook( 'after', 'compose_content' ); ?>
    
    	<div class="submit">
    		<input type="button" id="bp-messages-send" class="button bp-primary-action" value="<?php echo esc_attr_x( 'Send', 'button', 'buddypress' ); ?>"/>
    		<input type="button" id="bp-messages-reset" class="text-button small bp-secondary-action" value="<?php echo esc_attr_x( 'Reset', 'form reset button', 'buddypress' ); ?>"/>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-editor">
    	<?php
    	// Add a temporary filter on editor buttons
    	add_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 );
    
    	wp_editor(
    		'',
    		'message_content',
    		array(
    			'textarea_name' => 'message_content',
    			'teeny'         => false,
    			'media_buttons' => false,
    			'dfw'           => false,
    			'tinymce'       => true,
    			'quicktags'     => false,
    			'tabindex'      => '3',
    			'textarea_rows' => 5,
    		)
    	);
    
    	// Remove the temporary filter on editor buttons
    	remove_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 );
    	?>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-paginate">
    	<# if ( 1 !== data.page ) { #>
    		<button id="bp-messages-prev-page"class="button messages-button">
    			<span class="dashicons dashicons-arrow-left"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Previous page', 'link', 'buddypress' ); ?></span>
    		</button>
    	<# } #>
    
    	<# if ( data.total_page !== data.page ) { #>
    		<button id="bp-messages-next-page"class="button messages-button">
    			<span class="dashicons dashicons-arrow-right"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Next page', 'link', 'buddypress' ); ?></span>
    		</button>
    	<# } #>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-filters">
    	<li class="user-messages-search" role="search" data-bp-search="{{data.box}}">
    		<div class="bp-search messages-search">
    			<?php bp_nouveau_message_search_form(); ?>
    		</div>
    	</li>
    	<li class="user-messages-bulk-actions"></li>
    </script>
    
    <script type="text/html" id="tmpl-bp-bulk-actions">
    	<input type="checkbox" id="user_messages_select_all" value="1"/>
    	<label for="user_messages_select_all"><?php esc_html_e( 'All Messages', 'buddypress' ); ?></label>
    	<div class="bulk-actions-wrap bp-hide">
    		<div class="bulk-actions select-wrap">
    			<label for="user-messages-bulk-actions" class="bp-screen-reader-text">
    				<?php esc_html_e( 'Select bulk action', 'buddypress' ); ?>
    			</label>
    			<select id="user-messages-bulk-actions">
    				<# for ( i in data ) { #>
    					<option value="{{data[i].value}}">{{data[i].label}}</option>
    				<# } #>
    			</select>
    			<span class="select-arrow" aria-hidden="true"></span>
    		</div>
    		<button class="messages-button bulk-apply bp-tooltip" type="submit" data-bp-tooltip="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>">
    			<span class="dashicons dashicons-yes" aria-hidden="true"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Apply', 'button', 'buddypress' ); ?></span>
    		</button>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-thread">
    	<div class="thread-cb">
    		<input class="message-check" type="checkbox" name="message_ids[]" id="bp-message-thread-{{data.id}}" value="{{data.id}}">
    		<label for="bp-message-thread-{{data.id}}" class="bp-screen-reader-text"><?php esc_html_e( 'Select message:', 'buddypress' ); ?> {{data.subject}}</label>
    	</div>
    
    	<# if ( ! data.recipientsCount ) { #>
    		<div class="thread-from">
    			<a class="user-link" href="{{data.sender_link}}">
    				<img class="avatar" src="{{data.sender_avatar}}" alt="" />
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'From:', 'buddypress' ); ?></span>
    				<span class="user-name">{{data.sender_name}}</span>
    			</a>
    		</div>
    	<# } else {
    		var recipient = _.first( data.recipients );
    		#>
    		<div class="thread-to">
    			<a class="user-link" href="{{recipient.user_link}}">
    				<img class="avatar" src="{{recipient.avatar}}" alt="" />
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'To:', 'buddypress' ); ?></span>
    				<span class="user-name">{{recipient.user_name}}</span>
    			</a>
    
    			<# if ( data.toOthers ) { #>
    				<span class="num-recipients">{{data.toOthers}}</span>
    			<# } #>
    		</div>
    	<# } #>
    
    	<div class="thread-content" data-thread-id="{{data.id}}">
    		<div class="thread-subject">
    			<span class="thread-count">({{data.count}})</span>
    			<a class="subject" href="../view/{{data.id}}/">{{data.subject}}</a>
    		</div>
    		<p class="excerpt">{{data.excerpt}}</p>
    	</div>
    	<div class="thread-date">
    		<time datetime="{{data.date.toISOString()}}">{{data.display_date}}</time>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-preview">
    	<# if ( undefined !== data.content ) { #>
    
    		<h2 class="message-title preview-thread-title"><?php esc_html_e( 'Active conversation:', 'buddypress' ); ?><span class="messages-title">{{{data.subject}}}</span></h2>
    		<div class="preview-content">
    			<header class="preview-pane-header">
    
    				<# if ( undefined !== data.recipients ) { #>
    					<dl class="thread-participants">
    						<dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt>
    						<dd>
    							<ul class="participants-list">
    								<# for ( i in data.recipients ) { #>
    									<li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li>
    								<# } #>
    							</ul>
    						</dd>
    					</dl>
    				<# } #>
    
    				<div class="actions">
    
    					<button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>">
    						<span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span>
    					</button>
    
    					<# if ( undefined !== data.star_link ) { #>
    
    						<# if ( false !== data.is_starred ) { #>
    							<a role="button" class="message-action-unstar bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="unstar" aria-pressed="true" data-bp-tooltip="<?php esc_attr_e( 'Unstar Conversation', 'buddypress' ); ?>">
    								<span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Conversation', 'buddypress' ); ?></span>
    							</a>
    						<# } else { #>
    							<a role="button" class="message-action-star bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="star" aria-pressed="false" data-bp-tooltip="<?php esc_attr_e( 'Star Conversation', 'buddypress' ); ?>">
    								<span class="bp-screen-reader-text"><?php esc_html_e( 'Star Conversation', 'buddypress' ); ?></span>
    							</a>
    						<# } #>
    
    					<# } #>
    
    					<a href="../view/{{data.id}}/" class="message-action-view bp-tooltip bp-icons" data-bp-action="view" data-bp-tooltip="<?php esc_attr_e( 'View full conversation and reply.', 'buddypress' ); ?>">
    						<span class="bp-screen-reader-text"><?php esc_html_e( 'View full conversation and reply.', 'buddypress' ); ?></span>
    					</a>
    
    					<# if ( data.threadOptions ) { #>
    						<span class="bp-messages-hook thread-options">
    							{{{data.threadOptions}}}
    						</span>
    					<# } #>
    				</div>
    			</header>
    
    			<div class='preview-message'>
    				{{{data.content}}}
    			</div>
    
    			<# if ( data.inboxListItem ) { #>
    				<table class="bp-messages-hook inbox-list-item">
    					<tbody>
    						<tr>{{{data.inboxListItem}}}</tr>
    					</tbody>
    				</table>
    			<# } #>
    		</div>
    	<# } #>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single-header">
    	<h2 id="message-subject" class="message-title single-thread-title">{{{data.subject}}}</h2>
    	<header class="single-message-thread-header">
    		<# if ( undefined !== data.recipients ) { #>
    			<dl class="thread-participants">
    				<dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt>
    				<dd>
    					<ul class="participants-list">
    						<# for ( i in data.recipients ) { #>
    							<li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li>
    						<# } #>
    					</ul>
    				</dd>
    			</dl>
    		<# } #>
    
    		<?php if(current_user_can('manage_options')){ ?>
    			<button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>">
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span>
    			</button>
    		<?php }?>
    		</div>
    	</header>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single-list">
    	<div class="message-metadata">
    		<# if ( data.beforeMeta ) { #>
    			<div class="bp-messages-hook before-message-meta">{{{data.beforeMeta}}}</div>
    		<# } #>
    
    		<a href="{{data.sender_link}}" class="user-link">
    			<img class="avatar" src="{{data.sender_avatar}}" alt="" />
    			<strong>{{data.sender_name}}</strong>
    		</a>
    
    		<time datetime="{{data.date.toISOString()}}" class="activity">{{data.display_date}}</time>
    
    		<div class="actions">
    			<# if ( undefined !== data.star_link ) { #>
    
    				<button type="button" class="message-action-unstar bp-tooltip bp-icons <# if ( false === data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="unstar" data-bp-tooltip="<?php esc_attr_e( 'Unstar Message', 'buddypress' ); ?>">
    					<span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Message', 'buddypress' ); ?></span>
    				</button>
    
    				<button type="button" class="message-action-star bp-tooltip bp-icons <# if ( false !== data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="star" data-bp-tooltip="<?php esc_attr_e( 'Star Message', 'buddypress' ); ?>">
    					<span class="bp-screen-reader-text"><?php esc_html_e( 'Star Message', 'buddypress' ); ?></span>
    				</button>
    
    			<# } #>
    		</div>
    
    		<# if ( data.afterMeta ) { #>
    			<div class="bp-messages-hook after-message-meta">{{{data.afterMeta}}}</div>
    		<# } #>
    	</div>
    
    	<# if ( data.beforeContent ) { #>
    		<div class="bp-messages-hook before-message-content">{{{data.beforeContent}}}</div>
    	<# } #>
    
    	<div class="message-content">{{{data.content}}}</div>
    
    	<# if ( data.afterContent ) { #>
    		<div class="bp-messages-hook after-message-content">{{{data.afterContent}}}</div>
    	<# } #>
    
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single">
    	<?php bp_nouveau_messages_hook( 'before', 'thread_content' ); ?>
    
    	<div id="bp-message-thread-header" class="message-thread-header"></div>
    
    	<?php bp_nouveau_messages_hook( 'before', 'thread_list' ); ?>
    
    	<ul id="bp-message-thread-list"></ul>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_list' ); ?>
    
    	<?php bp_nouveau_messages_hook( 'before', 'thread_reply' ); ?>
    
    	<form id="send-reply" class="standard-form send-reply">
    		<div class="message-box">
    			<div class="message-metadata">
    
    				<?php bp_nouveau_messages_hook( 'before', 'reply_meta' ); ?>
    
    				<div class="avatar-box">
    					<?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?>
    
    					<strong><?php esc_html_e( 'Send a Reply', 'buddypress' ); ?></strong>
    				</div>
    
    				<?php bp_nouveau_messages_hook( 'after', 'reply_meta' ); ?>
    
    			</div><!-- .message-metadata -->
    
    			<div class="message-content">
    
    				<?php bp_nouveau_messages_hook( 'before', 'reply_box' ); ?>
    
    				<label for="message_content" class="bp-screen-reader-text"><?php _e( 'Reply to Message', 'buddypress' ); ?></label>
    				<div id="bp-message-content"></div>
    
    				<?php bp_nouveau_messages_hook( 'after', 'reply_box' ); ?>
    
    				<div class="submit">
    					<input type="submit" name="send" value="<?php echo esc_attr_x( 'Send Reply', 'button', 'buddypress' ); ?>" id="send_reply_button"/>
    				</div>
    
    			</div><!-- .message-content -->
    
    		</div><!-- .message-box -->
    	</form>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_reply' ); ?>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_content' ); ?>
    </script>
    

    Thanks

    #278449

    In reply to: Private Blogs

    Prashant Singh
    Participant

    Hi,

    Please put this snippet in child theme’s functions.php file:

    function ps_private_posts( $query ) {
    	if(is_user_logged_in()){
    	    if ( $query->is_archive() && $query->is_main_query() ) {
    	        $query->set( 'author', get_current_user_id());
    	    }
    	}
    }
    add_action( 'pre_get_posts', 'ps_private_posts' );

    Hopefully, it will help you.

    Thanks

    Anonymous User 16484011
    Inactive

    Hi ! Prashant !

    Thanks for your time. But I am zero in buddypress & coding. So, As per your path I find the index file but I can’t get where can I use your above code and where can I add role name administrator ? I put my file here ! Can you please edit it for me ?

    <?php
    /**
     * BP Nouveau Messages main template.
     *
     * This template is used to inject the BuddyPress Backbone views
     * dealing with user's private messages.
     *
     * @since 3.0.0
     * @version 3.1.0
     */
    ?>
    <div class="subnav-filters filters user-subnav bp-messages-filters" id="subsubnav"></div>
    
    <div class="bp-messages-feedback"></div>
    <div class="bp-messages-content"></div>
    
    <script type="text/html" id="tmpl-bp-messages-feedback">
    	<div class="bp-feedback {{data.type}}">
    		<span class="bp-icon" aria-hidden="true"></span>
    		<p>{{{data.message}}}</p>
    	</div>
    </script>
    
    <?php
    /**
     * This view is used to inject hooks buffer
     */
    ?>
    <script type="text/html" id="tmpl-bp-messages-hook">
    	{{{data.extraContent}}}
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-form">
    	<?php bp_nouveau_messages_hook( 'before', 'compose_content' ); ?>
    
    	<label for="send-to-input"><?php esc_html_e( 'Send @Username', 'buddypress' ); ?></label>
    	<input type="text" name="send_to" class="send-to-input" id="send-to-input" />
    
    	<label for="subject"><?php _e( 'Subject', 'buddypress' ); ?></label>
    	<input type="text" name="subject" id="subject"/>
    
    	<div id="bp-message-content"></div>
    
    	<?php bp_nouveau_messages_hook( 'after', 'compose_content' ); ?>
    
    	<div class="submit">
    		<input type="button" id="bp-messages-send" class="button bp-primary-action" value="<?php echo esc_attr_x( 'Send', 'button', 'buddypress' ); ?>"/>
    		<input type="button" id="bp-messages-reset" class="text-button small bp-secondary-action" value="<?php echo esc_attr_x( 'Reset', 'form reset button', 'buddypress' ); ?>"/>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-editor">
    	<?php
    	// Add a temporary filter on editor buttons
    	add_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 );
    
    	wp_editor(
    		'',
    		'message_content',
    		array(
    			'textarea_name' => 'message_content',
    			'teeny'         => false,
    			'media_buttons' => false,
    			'dfw'           => false,
    			'tinymce'       => true,
    			'quicktags'     => false,
    			'tabindex'      => '3',
    			'textarea_rows' => 5,
    		)
    	);
    
    	// Remove the temporary filter on editor buttons
    	remove_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 );
    	?>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-paginate">
    	<# if ( 1 !== data.page ) { #>
    		<button id="bp-messages-prev-page"class="button messages-button">
    			<span class="dashicons dashicons-arrow-left"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Previous page', 'link', 'buddypress' ); ?></span>
    		</button>
    	<# } #>
    
    	<# if ( data.total_page !== data.page ) { #>
    		<button id="bp-messages-next-page"class="button messages-button">
    			<span class="dashicons dashicons-arrow-right"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Next page', 'link', 'buddypress' ); ?></span>
    		</button>
    	<# } #>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-filters">
    	<li class="user-messages-search" role="search" data-bp-search="{{data.box}}">
    		<div class="bp-search messages-search">
    			<?php bp_nouveau_message_search_form(); ?>
    		</div>
    	</li>
    	<li class="user-messages-bulk-actions"></li>
    </script>
    
    <script type="text/html" id="tmpl-bp-bulk-actions">
    	<input type="checkbox" id="user_messages_select_all" value="1"/>
    	<label for="user_messages_select_all"><?php esc_html_e( 'All Messages', 'buddypress' ); ?></label>
    	<div class="bulk-actions-wrap bp-hide">
    		<div class="bulk-actions select-wrap">
    			<label for="user-messages-bulk-actions" class="bp-screen-reader-text">
    				<?php esc_html_e( 'Select bulk action', 'buddypress' ); ?>
    			</label>
    			<select id="user-messages-bulk-actions">
    				<# for ( i in data ) { #>
    					<option value="{{data[i].value}}">{{data[i].label}}</option>
    				<# } #>
    			</select>
    			<span class="select-arrow" aria-hidden="true"></span>
    		</div>
    		<button class="messages-button bulk-apply bp-tooltip" type="submit" data-bp-tooltip="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>">
    			<span class="dashicons dashicons-yes" aria-hidden="true"></span>
    			<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Apply', 'button', 'buddypress' ); ?></span>
    		</button>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-thread">
    	<div class="thread-cb">
    		<input class="message-check" type="checkbox" name="message_ids[]" id="bp-message-thread-{{data.id}}" value="{{data.id}}">
    		<label for="bp-message-thread-{{data.id}}" class="bp-screen-reader-text"><?php esc_html_e( 'Select message:', 'buddypress' ); ?> {{data.subject}}</label>
    	</div>
    
    	<# if ( ! data.recipientsCount ) { #>
    		<div class="thread-from">
    			<a class="user-link" href="{{data.sender_link}}">
    				<img class="avatar" src="{{data.sender_avatar}}" alt="" />
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'From:', 'buddypress' ); ?></span>
    				<span class="user-name">{{data.sender_name}}</span>
    			</a>
    		</div>
    	<# } else {
    		var recipient = _.first( data.recipients );
    		#>
    		<div class="thread-to">
    			<a class="user-link" href="{{recipient.user_link}}">
    				<img class="avatar" src="{{recipient.avatar}}" alt="" />
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'To:', 'buddypress' ); ?></span>
    				<span class="user-name">{{recipient.user_name}}</span>
    			</a>
    
    			<# if ( data.toOthers ) { #>
    				<span class="num-recipients">{{data.toOthers}}</span>
    			<# } #>
    		</div>
    	<# } #>
    
    	<div class="thread-content" data-thread-id="{{data.id}}">
    		<div class="thread-subject">
    			<span class="thread-count">({{data.count}})</span>
    			<a class="subject" href="../view/{{data.id}}/">{{data.subject}}</a>
    		</div>
    		<p class="excerpt">{{data.excerpt}}</p>
    	</div>
    	<div class="thread-date">
    		<time datetime="{{data.date.toISOString()}}">{{data.display_date}}</time>
    	</div>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-preview">
    	<# if ( undefined !== data.content ) { #>
    
    		<h2 class="message-title preview-thread-title"><?php esc_html_e( 'Active conversation:', 'buddypress' ); ?><span class="messages-title">{{{data.subject}}}</span></h2>
    		<div class="preview-content">
    			<header class="preview-pane-header">
    
    				<# if ( undefined !== data.recipients ) { #>
    					<dl class="thread-participants">
    						<dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt>
    						<dd>
    							<ul class="participants-list">
    								<# for ( i in data.recipients ) { #>
    									<li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li>
    								<# } #>
    							</ul>
    						</dd>
    					</dl>
    				<# } #>
    
    				<div class="actions">
    
    					<button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>">
    						<span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span>
    					</button>
    
    					<# if ( undefined !== data.star_link ) { #>
    
    						<# if ( false !== data.is_starred ) { #>
    							<a role="button" class="message-action-unstar bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="unstar" aria-pressed="true" data-bp-tooltip="<?php esc_attr_e( 'Unstar Conversation', 'buddypress' ); ?>">
    								<span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Conversation', 'buddypress' ); ?></span>
    							</a>
    						<# } else { #>
    							<a role="button" class="message-action-star bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="star" aria-pressed="false" data-bp-tooltip="<?php esc_attr_e( 'Star Conversation', 'buddypress' ); ?>">
    								<span class="bp-screen-reader-text"><?php esc_html_e( 'Star Conversation', 'buddypress' ); ?></span>
    							</a>
    						<# } #>
    
    					<# } #>
    
    					<a href="../view/{{data.id}}/" class="message-action-view bp-tooltip bp-icons" data-bp-action="view" data-bp-tooltip="<?php esc_attr_e( 'View full conversation and reply.', 'buddypress' ); ?>">
    						<span class="bp-screen-reader-text"><?php esc_html_e( 'View full conversation and reply.', 'buddypress' ); ?></span>
    					</a>
    
    					<# if ( data.threadOptions ) { #>
    						<span class="bp-messages-hook thread-options">
    							{{{data.threadOptions}}}
    						</span>
    					<# } #>
    				</div>
    			</header>
    
    			<div class='preview-message'>
    				{{{data.content}}}
    			</div>
    
    			<# if ( data.inboxListItem ) { #>
    				<table class="bp-messages-hook inbox-list-item">
    					<tbody>
    						<tr>{{{data.inboxListItem}}}</tr>
    					</tbody>
    				</table>
    			<# } #>
    		</div>
    	<# } #>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single-header">
    	<h2 id="message-subject" class="message-title single-thread-title">{{{data.subject}}}</h2>
    	<header class="single-message-thread-header">
    		<# if ( undefined !== data.recipients ) { #>
    			<dl class="thread-participants">
    				<dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt>
    				<dd>
    					<ul class="participants-list">
    						<# for ( i in data.recipients ) { #>
    							<li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li>
    						<# } #>
    					</ul>
    				</dd>
    			</dl>
    		<# } #>
    
    		<div class="actions">
    			<button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>">
    				<span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span>
    			</button>
    		</div>
    	</header>
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single-list">
    	<div class="message-metadata">
    		<# if ( data.beforeMeta ) { #>
    			<div class="bp-messages-hook before-message-meta">{{{data.beforeMeta}}}</div>
    		<# } #>
    
    		<a href="{{data.sender_link}}" class="user-link">
    			<img class="avatar" src="{{data.sender_avatar}}" alt="" />
    			<strong>{{data.sender_name}}</strong>
    		</a>
    
    		<time datetime="{{data.date.toISOString()}}" class="activity">{{data.display_date}}</time>
    
    		<div class="actions">
    			<# if ( undefined !== data.star_link ) { #>
    
    				<button type="button" class="message-action-unstar bp-tooltip bp-icons <# if ( false === data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="unstar" data-bp-tooltip="<?php esc_attr_e( 'Unstar Message', 'buddypress' ); ?>">
    					<span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Message', 'buddypress' ); ?></span>
    				</button>
    
    				<button type="button" class="message-action-star bp-tooltip bp-icons <# if ( false !== data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="star" data-bp-tooltip="<?php esc_attr_e( 'Star Message', 'buddypress' ); ?>">
    					<span class="bp-screen-reader-text"><?php esc_html_e( 'Star Message', 'buddypress' ); ?></span>
    				</button>
    
    			<# } #>
    		</div>
    
    		<# if ( data.afterMeta ) { #>
    			<div class="bp-messages-hook after-message-meta">{{{data.afterMeta}}}</div>
    		<# } #>
    	</div>
    
    	<# if ( data.beforeContent ) { #>
    		<div class="bp-messages-hook before-message-content">{{{data.beforeContent}}}</div>
    	<# } #>
    
    	<div class="message-content">{{{data.content}}}</div>
    
    	<# if ( data.afterContent ) { #>
    		<div class="bp-messages-hook after-message-content">{{{data.afterContent}}}</div>
    	<# } #>
    
    </script>
    
    <script type="text/html" id="tmpl-bp-messages-single">
    	<?php bp_nouveau_messages_hook( 'before', 'thread_content' ); ?>
    
    	<div id="bp-message-thread-header" class="message-thread-header"></div>
    
    	<?php bp_nouveau_messages_hook( 'before', 'thread_list' ); ?>
    
    	<ul id="bp-message-thread-list"></ul>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_list' ); ?>
    
    	<?php bp_nouveau_messages_hook( 'before', 'thread_reply' ); ?>
    
    	<form id="send-reply" class="standard-form send-reply">
    		<div class="message-box">
    			<div class="message-metadata">
    
    				<?php bp_nouveau_messages_hook( 'before', 'reply_meta' ); ?>
    
    				<div class="avatar-box">
    					<?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?>
    
    					<strong><?php esc_html_e( 'Send a Reply', 'buddypress' ); ?></strong>
    				</div>
    
    				<?php bp_nouveau_messages_hook( 'after', 'reply_meta' ); ?>
    
    			</div><!-- .message-metadata -->
    
    			<div class="message-content">
    
    				<?php bp_nouveau_messages_hook( 'before', 'reply_box' ); ?>
    
    				<label for="message_content" class="bp-screen-reader-text"><?php _e( 'Reply to Message', 'buddypress' ); ?></label>
    				<div id="bp-message-content"></div>
    
    				<?php bp_nouveau_messages_hook( 'after', 'reply_box' ); ?>
    
    				<div class="submit">
    					<input type="submit" name="send" value="<?php echo esc_attr_x( 'Send Reply', 'button', 'buddypress' ); ?>" id="send_reply_button"/>
    				</div>
    
    			</div><!-- .message-content -->
    
    		</div><!-- .message-box -->
    	</form>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_reply' ); ?>
    
    	<?php bp_nouveau_messages_hook( 'after', 'thread_content' ); ?>
    </script>
    

    Thanks

    #278423

    In reply to: Private Blogs

    raghav2417
    Participant

    Hi Its a buddypress members dashboard, Where in one of the tabs I have added a page that allows members to write a post, Now these posts are saved as private and I want only the member writing that post to be able to view it, no other members of the website should be able to view it, However when we click on the view post button, It shows all the posts even though they are private but still it shows.
    I want the member clicking on view your post should see only posts written by himself/herself.
    Below is a link to the video describing the issue.
    https://drive.google.com/file/d/1BUNazNHAC7b_3yvXs79GmLHSwSG3uXJU/view?usp=sharing

    Thanks alot

    #278384
    raghav2417
    Participant

    Hi
    I need help with my Buddypress website, My website requires a functionality where a user can post the blog using the frontend. This I have achieved, However I want when a user clicks on view blogs, they should be able to see only the blogs written by themselves and any blog of which the current user is not an author should not be visible to the user.

    I am struggling with this right now and need help.
    All I want is the blogs to be private at frontend.

    Thanks in advance

    Anonymous User 16484011
    Inactive

    Hi !

    It is possible in buddy press to private message delete permission to only admin. Not even the person who sent message.

    For example if any role’s user sent private message to anyone but after sending message they can’t see the sent message delete option.

    Thanks

    Prashant Singh
    Participant
    add_action( 'messages_message_before_save', 'ps_manage_sending_of_private_message',10,1 );
    function ps_manage_sending_of_private_message( $message_object ) {
    	$receivers = $message_object->recipients;
    	foreach($receivers as $receiver){
    		$receiver_id = $receiver->user_id;
    		$user = get_userdata( $receiver_id );
    		$user_roles = $user->roles;
    		if ( !in_array( 'your_role_here', $user_roles ) ) {
    			$message_object->recipients = false;
    		}
    	}
    }

    Another solution is that, if the user added in the recipient list is not of the role that you want then do not send/save messages.

    Please try this also, if do not want the first one.

    Thanks

    Prashant Singh
    Participant
    function ps_remove_private_message_button( $button ) {
            $user = bp_displayed_user_id();
    	if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
    		if ( $role != 'your_role_here') {
    			$button = '';
    		}
    	}
         return $button;
    }
    add_filter( 'bp_get_send_message_button', 'ps_remove_private_message_button', 10 , 1 );

    Hi,

    One solution is to hide private message button from any other user roles and just leave on support user role. Please try the above-given code for the same.

    Thanks

    Anonymous User 16484011
    Inactive

    Hi !

    Is it possible in buddypress that users only sent message to support person’s role. OR Specific person’s name already added to massage’s sent to field. Users can’t change it or just direct type subject and message than sent.

    Regards

    #278289
    micheleestes
    Participant

    @shanebp Thanks for your tip. Will BP Simple Private plugin allow me to make non-BuddyPress pages private, for example, an existing content page that is not part of BuddyPress?

    #278248
    shanebp
    Moderator
Viewing 25 results - 526 through 550 (of 3,819 total)
Skip to toolbar