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.

Colored b/ strong text in postbody

5 posters

Go down

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?

the60s
the60s
New Member

Posts : 23
Reputation : 1
Language : English, Polish

View user profile http://the60s.forumpolish.com

Niko likes this post

Back to top Go down

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 ?
skouliki
skouliki
Manager
Manager

Female Posts : 12343
Reputation : 1519
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

Back to top Go down

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.
the60s
the60s
New Member

Posts : 23
Reputation : 1
Language : English, Polish

View user profile http://the60s.forumpolish.com

Back to top Go down

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  Keep_s10
Colored b/ strong text in postbody  Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 17655
Reputation : 1884
Language : fluent in dork / mumbojumbo & English haha

View user profile http://chatworld.forumotion.co.uk/

Back to top Go down

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  Keep_s10
Colored b/ strong text in postbody  Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 17655
Reputation : 1884
Language : fluent in dork / mumbojumbo & English haha

View user profile http://chatworld.forumotion.co.uk/

TonnyKamper likes this post

Back to top Go down

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.
the60s
the60s
New Member

Posts : 23
Reputation : 1
Language : English, Polish

View user profile http://the60s.forumpolish.com

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 50162
Reputation : 3458
Language : English
Location : United States

View user profile https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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.
the60s
the60s
New Member

Posts : 23
Reputation : 1
Language : English, Polish

View user profile http://the60s.forumpolish.com

Back to top Go down

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
skouliki
skouliki
Manager
Manager

Female Posts : 12343
Reputation : 1519
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

the60s likes this post

Back to top Go down

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  Keep_s10
Colored b/ strong text in postbody  Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 17655
Reputation : 1884
Language : fluent in dork / mumbojumbo & English haha

View user profile http://chatworld.forumotion.co.uk/

TonnyKamper and the60s like this post

Back to top Go down

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
Niko
Niko
Hyperactive

Male Posts : 2462
Reputation : 127
Language : English, Italian, French
Location : Italy

View user profile https://www.fmcodes.net/

TonnyKamper and the60s like this post

Back to top Go down

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
the60s
the60s
New Member

Posts : 23
Reputation : 1
Language : English, Polish

View user profile http://the60s.forumpolish.com

Back to top Go down

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
Niko
Niko
Hyperactive

Male Posts : 2462
Reputation : 127
Language : English, Italian, French
Location : Italy

View user profile https://www.fmcodes.net/

skouliki and TonnyKamper like this post

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum