Replies
- calu on March 26, 2020 at 11:16 pm in reply to: [Resolved] Remove the subject line requirement in messages? #28380
Hi Brajesh, thanks for the code, which works once, on the first new message but not on following new message?
- calu on March 26, 2020 at 11:04 pm in reply to: [Resolved] Remove the subject line requirement in messages? #28378
Hi, I can see I have got a syntax error here?
Uncaught SyntaxError: Invalid or unexpected token
jQuery(document).ready(function() {
jQuery(‘#send_message_form’).submit( function() {
jQuery(‘#subject’).val(“Some message subject”);
});
}); - calu on March 26, 2020 at 10:57 pm in reply to: [Resolved] Remove the subject line requirement in messages? #28377
My theme also supports setting in custom hooks like one of the BP action hooks
- calu on March 26, 2020 at 10:53 pm in reply to: [Resolved] Remove the subject line requirement in messages? #28376
Hi Brajesh, thanks for your quick reply, actually it is my theme developer who is asking, if if this script can be added using the wp_footer hook, which my theme supports
- calu on March 26, 2020 at 9:51 pm in reply to: [Resolved] Remove the subject line requirement in messages? #28370
Hi Brajesh, turning back to core BP Messages, it is relevant for me again to get a solution to the auto fill out the Subject field. I never got it to work in Legacy.
Earlier you wrote:
“Since it is just 2 lines of code, My suggestion will be to put it in one of the js file provided by theme. Look for a file named buddypress.js and you can put the code inside the dom ready section there. If you are using a custom theme, you may ask there(or check their documents) to see if there is any custom js file supported.”I have got an answer from the theme developer about where to add the js:
“Definitely wouldn’t suggest adding that to the theme’s file as it will be erased during updates.
Can you check with them to see if it can be added using wp_footer hook?”As I understand, this is not done by adding the code to a js folder with a buddypress.js file in my childtheme to solv the erasure issue.
Would it be possible to add the code using the wp_footer hook as suggested, or which hook should I use?
Regards
Carsten - calu on March 11, 2020 at 10:07 am in reply to: Why does bp members directory reload every time – revisited #28237
Hi Brajesh, could I ask you to run through my Members Loop for errors which could cause the pagination no-ajax issue in my members directory?
Thanks in advance!
<?php /** * BuddyPress - Members Loop * * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter() * * @package BuddyPress * @subpackage bp-legacy * @version 3.0.0 */ /** * Fires before the display of the members loop. * * @since 1.2.0 */ do_action( 'bp_before_members_loop' ); ?> <?php if ( bp_get_current_member_type() ) : ?> <p class="current-member-type"><?php bp_current_member_type_message() ?></p> <?php endif; ?> <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?> <div id="pag-top" class="pagination no-ajax"> <div class="pag-count" id="member-dir-count-top"> <?php bp_members_pagination_count(); ?> </div> <div class="pagination-links" id="member-dir-pag-top"> <?php bp_members_pagination_links(); ?> </div> </div> <?php /** * Fires before the display of the members list. * * @since 1.1.0 */ do_action( 'bp_before_directory_members_list' ); ?> <ul id="members-list" class="item-list" aria-live="assertive" aria-relevant="all"> <?php while ( bp_members() ) : bp_the_member(); ?> <li <?php bp_member_class(); ?>> <div class="item-avatar"> <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a> </div> <div class="item"> <div class="item-title"> <a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a> <?php if ( bp_get_member_latest_update() ) : ?> <span class="update"> <?php bp_member_latest_update(); ?></span> <?php endif; ?> </div> <div class="item-meta"><span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_member_last_active( array( 'relative' => false ) ) ); ?>"><?php bp_member_last_active(); ?></span></div> <?php /** * Fires inside the display of a directory member item. * * @since 1.1.0 */ do_action( 'bp_directory_members_item' ); ?> <?php /*** * If you want to show specific profile fields here you can, * but it'll add an extra query for each member in the loop * (only one regardless of the number of fields you show): * * bp_member_profile_data( 'field=the field name' ); */ ?> </div> <div class="action"> <?php /** * Fires inside the members action HTML markup to display actions. * * @since 1.1.0 */ do_action( 'bp_directory_members_actions' ); ?> </div> <div class="clear"></div> </li> <?php endwhile; ?> </ul> <?php /** * Fires after the display of the members list. * * @since 1.1.0 */ do_action( 'bp_after_directory_members_list' ); ?> <?php bp_member_hidden_fields(); ?> <div id="pag-bottom" class="pagination no-ajax"> <div class="pag-count" id="member-dir-count-bottom"> <?php bp_members_pagination_count(); ?> </div> <div class="pagination-links" id="member-dir-pag-bottom"> <?php bp_members_pagination_links(); ?> </div> </div> <?php else: ?> <div id="message" class="info"> <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p> </div> <?php endif; ?> <?php /** * Fires after the display of the members loop. * * @since 1.2.0 */ do_action( 'bp_after_members_loop' );
- calu on March 11, 2020 at 8:57 am in reply to: Why does bp members directory reload every time – revisited #28236
Hi Brajesh, yes there must be something else going on, the directory defiantly gets updated, the activity updates as well, despite the pagination no-ajax has been added.
What happens in relation to future updates of BP, when members-loop.php has been added to my child theme, I guess updates could involve changes to the members-loop.php file as well?
Should I then update the file in my child theme manually, or how does that work?
Regards
Carsten - calu on March 10, 2020 at 10:09 pm in reply to: The 'Active' text in the span.activity has gone. #28216
Hi Brajesh, I don’t remember it has always been like this.
This is the activity displayed:
before:
8 hours agoduring page refresh:
Active 8 hours ago, 26 minutes agoafter:
8 hours ago Please disregard this topic, my fault, everything is working fine. I was trying to change email to an existing email. Also the notifications seems to be fine
- calu on March 8, 2020 at 10:32 pm in reply to: The 'Active' text in the span.activity has gone. #28164This reply has been marked as private.