Forum Replies Created
-
Thank you so much!
And for the activity comments:
add_filter(‘bp_activity_comment_date_recorded’, ‘bp_activity_comment_date_recorded_newformat’, 10, 2);
function bp_activity_comment_date_recorded_newformat( $date_recorded ) {
global $activities_template;$timestamp_now = time();
$timestamp_comment_date_recorded = strtotime( $activities_template->activity->current_comment->date_recorded );if (abs($timestamp_now – $timestamp_comment_date_recorded) > 60 * 60 * 24 ) {
$date_recorded = date_i18n( “j F Y H:i”, $timestamp_comment_date_recorded );
}
return $date_recorded;
}Oke, thanks.
Could you tell me, what I need to change here than?<td class=”thread-from”>
<?php bp_message_thread_avatar( array( ‘width’ => 25, ‘height’ => 25 ) ); ?>
<span class=”to”><?php _e( ‘To:’, ‘buddypress’ ); ?></span> <?php bp_message_thread_to(); ?><span class=”activity”><?php bp_message_thread_last_post_date(); ?></span>
</td>Found the solution here:
https://gist.github.com/messaoudi-mounir/8707661Hi,
The form is not in settings:
<?php
/**
* BuddyPress – Members Settings Notifications
*
* @package BuddyPress
* @subpackage bp-legacy
* @version 3.0.0
*/
/** This action is documented in bp-templates/bp-legacy/buddypress/members/single/settings/profile.php */
do_action( ‘bp_before_member_settings_template’ ); ?>
<h2 class=”bp-screen-reader-text”><?php
/* translators: accessibility text */
_e( ‘Notification settings’, ‘buddypress’ );
?></h2>
<form action=”<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . ‘/notifications’; ?>” method=”post” class=”standard-form” id=”settings-form”>
<p><?php _e( ‘Send an email notice when:’, ‘buddypress’ ); ?></p>
<?php
/**
* Fires at the top of the member template notification settings form.
*
* @since 1.0.0
*/
do_action( ‘bp_notification_settings’ ); ?>
<?php
/**
* Fires before the display of the submit button for user notification saving.
*
* @since 1.5.0
*/
do_action( ‘bp_members_notification_settings_before_submit’ ); ?>
<div class=”submit”>
<input type=”submit” name=”submit” value=”<?php esc_attr_e( ‘Save Changes’, ‘buddypress’ ); ?>” id=”submit” class=”auto” />
</div>
<?php
/**
* Fires after the display of the submit button for user notification saving.
*
* @since 1.5.0
*/
do_action( ‘bp_members_notification_settings_after_submit’ ); ?>
<?php wp_nonce_field(‘bp_settings_notifications’ ); ?>
</form>
<?php
/** This action is documented in bp-templates/bp-legacy/buddypress/members/single/settings/profile.php */
do_action( ‘bp_after_member_settings_template’ );
Solved it:
function bpex_hide_profile_menu_tabs() {if( bp_is_active( ‘xprofile’ ) ) :
if ( !bp_is_my_profile() ) {
bp_core_remove_subnav_item( ‘forums’, ‘favorites’ );
bp_core_remove_subnav_item( ‘forums’, ‘subscriptions’ );}
endif;
}
add_action( ‘bp_setup_nav’, ‘bpex_hide_profile_menu_tabs’, 15 );Or better: how can I hide favorite forums and favorite topics for other members, and make it visible only for myself?
Hi Venutius,
Thank you very much.
This is what I was looking for!Oke, thanks.
But that would mean the image in the members list also becomes a lightbox?
Could you please tell me what I need to change here? I don’t know how to do this.<li <?php bp_member_class(); ?>> <div class="item-avatar"> <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a> </div>
Oké, I see.
Could it be something like in this example?function gototab(reload)
{
window.location.hash = ‘#tab2’;
window.location.reload(true);
}