Colored b/ strong text in postbody  Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
5 posters

    Colored b/ strong text in postbody

    the60s
    the60s
    New Member


    Posts : 23
    Reputation : 1
    Language : English, Polish

    In progress Colored b/ strong text in postbody

    Post by the60s April 2nd 2022, 12:57 am

    Hello! I'm trying my best at designing CSS for my forum in #ModernBB style. I'd like to know what code should I use for colouring bold text in posts by groups.

    For example:
    Group A have colour green so bold text in Group A post is green
    Group B have colour blue - bold text in Group B post is blue

    Code:
    .GroupAGroup .postbody strong {color: #colorcode;}
    Doesn't work or am I missing something?

    Niko likes this post

    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15350
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    In progress Re: Colored b/ strong text in postbody

    Post by skouliki April 2nd 2022, 12:11 pm

    hello

    did you see this feature to another forumotion forum ?

    the60s
    the60s
    New Member


    Posts : 23
    Reputation : 1
    Language : English, Polish

    In progress Re: Colored b/ strong text in postbody

    Post by the60s April 2nd 2022, 12:42 pm

    skouliki wrote:hello

    did you see this feature to another forumotion forum ?

    Hi! I know that the code above was used in other forums and it worked but it was on phpBB2 if I remember well. That's why I'm curious is there another code or way to make it works on ModernBB too.
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19358
    Reputation : 2006
    Language : fluent in dork / mumbojumbo & English haha

    In progress Re: Colored b/ strong text in postbody

    Post by Ape April 2nd 2022, 4:20 pm

    Hello
    Please note that most codes from phpBB2 forums will never work on ModernBB forums as the coding is not the same at all.

    EDIT: You can do the following to find out the code needed to use in the group.

    Using your browser hover over the group at the bottom of your forum.
    Colored b/ strong text in postbody  Captu534
    Then right click on one of them go down and click on inspect
    it should then open up something like this then look for this part of the code.
    Colored b/ strong text in postbody  Captu535
    if you see the part that has the text
    Code:
    href-''/g4-gurpa1
    that will be the part that you would use to pin point each group.



    Colored b/ strong text in postbody  Left1212Colored b/ strong text in postbody  Center11Colored b/ strong text in postbody  Right112
    Colored b/ strong text in postbody  Ape_b110
    Colored b/ strong text in postbody  Ape1010
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19358
    Reputation : 2006
    Language : fluent in dork / mumbojumbo & English haha

    In progress Re: Colored b/ strong text in postbody

    Post by Ape April 2nd 2022, 4:38 pm

    I made an edit in my last post for you to see how the codes are not the same.



    Colored b/ strong text in postbody  Left1212Colored b/ strong text in postbody  Center11Colored b/ strong text in postbody  Right112
    Colored b/ strong text in postbody  Ape_b110
    Colored b/ strong text in postbody  Ape1010

    TonnyKamper likes this post

    the60s
    the60s
    New Member


    Posts : 23
    Reputation : 1
    Language : English, Polish

    In progress Re: Colored b/ strong text in postbody

    Post by the60s April 2nd 2022, 5:28 pm

    Ape wrote:Hello
    Please note that most codes from phpBB2 forums will never work on ModernBB forums as the coding is not the same at all.

    EDIT: You can do the following to find out the code needed to use in the group.

    Using your browser hover over the group at the bottom of your forum.
    Colored b/ strong text in postbody  Captu534
    Then right click on one of them go down and click on inspect
    it should then open up something like this then look for this part of the code.
    Colored b/ strong text in postbody  Captu535
    if you see the part that has the text
    Code:
    href-''/g4-gurpa1
    that will be the part that you would use to pin point each group.

    Thank you for your answer!
    The same part is on the forum (on phpBB2) with groups too. This is why I wonder what code could work for making the bold text in post the same group as the colour of group, in which is the author.

    I know it's enough to use code:
    Code:
    .postbody b strong: {color: #colorcode;}
    To have coloured bold text but I'm thinking about colours of groups in which authors are.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51518
    Reputation : 3523
    Language : English
    Location : United States

    In progress Re: Colored b/ strong text in postbody

    Post by SLGray April 2nd 2022, 10:56 pm

    If I understand what you want, I believe you will need a JavaScript to get the ID for each group that you want to have this ability.  You want that each group when posting bold text that it would be the color of the group, correct?



    Colored b/ strong text in postbody  Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    the60s
    the60s
    New Member


    Posts : 23
    Reputation : 1
    Language : English, Polish

    In progress Re: Colored b/ strong text in postbody

    Post by the60s April 3rd 2022, 1:44 am

    SLGray wrote:If I understand what you want, I believe you will need a JavaScript to get the ID for each group that you want to have this ability.  You want that each group when posting bold text that it would be the color of the group, correct?

    Yes, correct. If it is the only way to have a coloured bold text by a colour of the group in ModernBB then I'll need a JS.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15350
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    In progress Re: Colored b/ strong text in postbody

    Post by skouliki April 3rd 2022, 9:05 am

    i have not seen any scripts about this so i guess you have to wait for a member with javascript skills to answer your request


    Last edited by skouliki on April 3rd 2022, 11:24 am; edited 1 time in total

    the60s likes this post

    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19358
    Reputation : 2006
    Language : fluent in dork / mumbojumbo & English haha

    In progress Re: Colored b/ strong text in postbody

    Post by Ape April 3rd 2022, 11:12 am

    The best ones to help with this would be @pedxz or @Niko they are great with codes Wink



    Colored b/ strong text in postbody  Left1212Colored b/ strong text in postbody  Center11Colored b/ strong text in postbody  Right112
    Colored b/ strong text in postbody  Ape_b110
    Colored b/ strong text in postbody  Ape1010

    TonnyKamper and the60s like this post

    Niko
    Niko
    Helper
    Helper


    Male Posts : 3243
    Reputation : 252
    Language : English, Italian, French
    Location : Italy

    In progress Re: Colored b/ strong text in postbody

    Post by Niko April 4th 2022, 10:03 pm

    Coucou,

    I saw @Ape tagged me ^^
    So if I well understood, you would like that the bold text of an user becomes of the same color of his/her username?

    For example Ape's bold text would be red, skouliki's bold text would be green, etc...? Is this what you mean?
    Let me know Bow

    TonnyKamper and the60s like this post

    the60s
    the60s
    New Member


    Posts : 23
    Reputation : 1
    Language : English, Polish

    In progress Re: Colored b/ strong text in postbody

    Post by the60s April 5th 2022, 12:16 am

    Niko wrote:Coucou,

    I saw @Ape tagged me ^^
    So if I well understood, you would like that the bold text of an user becomes of the same color of his/her username?

    For example Ape's bold text would be red, skouliki's bold text would be green, etc...? Is this what you mean?
    Let me know Bow

    Hello! Yes, indeed this is what I meant Smile
    Niko
    Niko
    Helper
    Helper


    Male Posts : 3243
    Reputation : 252
    Language : English, Italian, French
    Location : Italy

    In progress Re: Colored b/ strong text in postbody

    Post by Niko April 5th 2022, 12:55 am

    @the60s Sorry for the question, Maybe I haven't properly read the previous messages... but haven't you already achieved the result?

    Cause I see the bold text colored according to the username color, and this script added to your forum:
    Code:
    $(function(){
        groupMod('#20A896','Grupa1Group');
        function groupMod(color,classname){
            $('.post:has(span[style="color:'+color+'"] strong)').addClass(classname);
        }
    });

    Am I missing something? Glasses

    skouliki and TonnyKamper like this post