• Resolved khunmax

    (@khunmax)


    Hey

    Nice plugin. Thanks for all your hard work.

    I have a few styling related questions:

    1. I am running my own functionality plugin. I would be very grateful if you could send me a code snippet that I can run to edit the wording of the “Send username a message” link that appears under a users topic avatar. I have a very narrow forum and so need to shorten it to “Send a PM” or something like that.

    2. What is the unique identifier so that I can also style the the above mentioned send message link with CSS.

    3. What is the unique identifier for your “send” button. I want to add radius in css to match my other site buttons.

    Thanks in advance for your assistance.

    Kind Regards

    Max

    https://wordpress.org/plugins/bbp-messages/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ismail

    (@elhardoum)

    Hello khunmax,

    I am very sorry for the delay here. I was quite busy recently with some plugin projects and maintenance..

    1. You can hook into it, and feel free to change the output in wp8517607_bbpm_send_message_link function:

    add_filter("bbpm_bbp_template_after_user_profile", "__return_false");
    add_filter("bbpm_bbp_theme_after_reply_author_details", "__return_false");
    
    add_filter( "bbp_template_after_user_profile", function() {
    	wp8517607_bbpm_send_message_link( bbp_get_displayed_user_id() );
    });
    
    add_filter( "bbp_theme_after_reply_author_details", function() {
    	wp8517607_bbpm_send_message_link( bbp_get_reply_author_id() );
    });
    
    function wp8517607_bbpm_send_message_link( $user_id ) {
    	global $current_user;
    
    	if( empty( $current_user->ID ) || !get_userdata( $user_id ) || $user_id == $current_user->ID )
    		return;
    
    	?>
    		<p>
    			<a href="<?php echo bbpm_get_conversation_permalink( '', $user_id ); ?>" class="bbpm-send-message-link">Send a PM</a>
    		</p>
    	<?php
    }

    Add that code to your child theme’s functions file.

    2. Selector:

    div.bbpm-input input[name="_bbpm_send"] {
    	// Your CSS tweaks here
    }

    3. Selector:

    a.bbpm-send-message-link {
    	// Your CSS tweaks here
    }

    Thanks and hope that helps.

    Regards,
    Samuel

Viewing 1 replies (of 1 total)
  • The topic ‘functionality snippet and CSS request’ is closed to new replies.