Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add custom colors for each Role ?


  • –Q–Shadows
    Participant

    @-q-shadows

    Hey fellas,

    After going through these forums for over 3 days and even thou I can across topics similar to this, the solution provided there just doesn’t work for me.

    What I am looking for is basically a simple way to distinguish easily between members of different roles, i.e., By allotting colors to Author names depending on their roles like Red for Admin, Blue for Participant, etc. This should not only display in a the topic/thread itself but also in the forum/topics list as well. A quick code to achieve such will be much appreciated.

    Next followup thing is to distinguish threads created by these members by highlighting the topic with in New Topics/Forums with the color assigned to the topic author. For ex: Threads created by Admin should be highlighted in Red.

    I have seen allot of folks here give their into helping out this growing community and I appreciate all that you guys are doing.

    Hoping someone could up with a quick set for this issue.

    Cheers.

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

  • Robin W
    Moderator

    @robin-w

    A quick code to achieve such will be much appreciated.

    If it was I’d give it, but it would involve a rewrite of the function bbp_reply_author_link

    It’s quite do-able, but I don’t have the time – sorry !


    –Q–Shadows
    Participant

    @-q-shadows

    No worries, you took time to even respond is good enough for me.

    Anyways, I played a little bit with css and was able to color the forum roles by adding this is my css file –

    ‘#bbpress-forums div.bbp-forum-author .bbp-author-role-admin,
    #bbpress-forums div.bbp-topic-author .bbp-author-role-admin,
    #bbpress-forums div.bbp-reply-author .bbp-author-role-admin {
    color:red;
    font-size:14px;
    font-family:lucida sans unicode, lucida grande, sans-serif;line-height:1;
    } ‘
    and different colors for different roles by adding the role name at the end (instead of admin).

    Now the issue I am running into is with this –
    ‘ #bbpress-forums div.bbp-topic-author a.bbp-author-name
    #bbpress-forums div.bbp-reply-author a.bbp-author-name {
    clear: left;
    display: block;
    color:red;
    } ‘

    Using this code I am able to change the color of Usernames too, but unfortunately its applied globally and am not much familiar with bbpress to know exactly how to make it role wise. Is there anything that can be added to the above code that would make it apply depending on the role of that author.

    And lastly, how to modify the css so that I can display the role as its displayed here on this website, ie., role covered in a box.

    Would really appreciate if you could at the very least guide me in a proper direction.

    Cheers.


    Robin W
    Moderator

    @robin-w

    Sorry, using css don’t know how to do that. As before it would I think involve a rewrite of the function bbp_reply_author_link

    And lastly, how to modify the css so that I can display the role as its displayed here on this website, ie., role covered in a box.

    just add

    background-color : green ;

    to your

    #bbpress-forums div.bbp-forum-author .bbp-author-role-admin,
     #bbpress-forums div.bbp-topic-author .bbp-author-role-admin,
     #bbpress-forums div.bbp-reply-author .bbp-author-role-admin { etc
    

    code above


    –Q–Shadows
    Participant

    @-q-shadows

    Hey,

    I meant adding a background similar to that we have here on bbpress.org forums (boxed up), the code u gave me just adds an ugly green background – http://imgur.com/ps2CL3l


    Robin W
    Moderator

    @robin-w

    an ugly green background

    it was an example not a solution !

    If you want to get into this side you should learn about developer tools

    https://developer.chrome.com/devtools

    https://msdn.microsoft.com/en-gb/library/ie/gg589507(v=vs.85).aspx

    then you can quickly see what is being used.


    Robin W
    Moderator

    @robin-w

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