Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change user color


  • sopliar
    Participant

    @sopliar

    Hello BBPRESS community,

    I really want to change color of my usergroups in my forum made by bbpress.
    I have the standard role (keymaster, moderator, blocked ecc) but with names modified by editing the file functions.php in my theme folder.

    Now I would like to change the color in the status bar and in the topic/threads, example Administrator in the red, moderators in blue ecc.
    I tried a insert this code in bbpress/templates/default/css/bbpress.css:

    .bbp-author-role-keymaster {
    background:blue;
    color:white;
    padding:0 5px;
    }

    but it does not change anything, why?
    I want to change color here

    View post on imgur.com


    and in threads/topic discussion.
    How I do?
    Thank you very much.

Viewing 10 replies - 1 through 10 (of 10 total)

  • Robin W
    Moderator

    @robin-w

    it is not good practise to amend bbpress (or any plugin) files.

    The code should go in the custom css area of your there if it has one, or via a plugin such as https://en-gb.wordpress.org/plugins/simple-custom-css/

    for the threads are, the simplest would be to use my style pack plugin

    bbp style pack

    and change the roles in

    dashboard>settings>bbp style pack>forum roles

    for your specific area, we would need the code you added in your functions file, but that should be able to then use the plugin settings above


    sopliar
    Participant

    @sopliar

    Thank you very much.
    I solved for the threads, but for status legend not yet.

    I don’t understand how apply the color in status legend, can you explain better please?


    Robin W
    Moderator

    @robin-w

    you will need to post the code you put in your functions file that does the status legend


    sopliar
    Participant

    @sopliar

    Hello @robin-w, this is the code

    add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
    function ntwb_bbpress_custom_role_names() {
    	return array(
    		// Keymaster
    		bbp_get_keymaster_role() => array(
    			'name'         => 'Amministratore',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    		),
    		// Moderator
    		bbp_get_moderator_role() => array(
    			'name'         => 'Moderatore',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
    		),
    		// Participant
    		bbp_get_participant_role() => array(
    			'name'         => 'Utente',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    		),
    		// Spectator
    		bbp_get_spectator_role() => array(
    			'name'         => 'Visitatore',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
    		),
    		// Blocked
    		bbp_get_blocked_role() => array(
    			'name'         => 'Bannato',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
    		)
    	);
    }
    

    Robin W
    Moderator

    @robin-w

    that code alters the names, but doesn’t help me in the ‘status legend’ – how is that legend created ?


    sopliar
    Participant

    @sopliar


    Robin W
    Moderator

    @robin-w

    ask their support desk for help


    sopliar
    Participant

    @sopliar

    Thank you very much, I try to ask the plugin support.

    Last thing, could you tell me how to make the name appear to tag users on the forum? Because there are a nick and name display, I would like to show which nick to use to tag, making it appear just like here.
    @robin-w

    View post on imgur.com


    sopliar
    Participant

    @sopliar

    I solved with bbp style pack!


    Robin W
    Moderator

    @robin-w

    great – glad you are fixed

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar