View Full Version : Color username in post
OcR Envy
07-30-2008, 11:45 AM
Wonderinf if there is a mod/option so that if someone were to post and include a username it will colorize it based on the usergroup html markup.
IE:
Hi OcR Envy
Would auto change based on my usergroup too
Hi OcR Envy
Lynne
07-30-2008, 02:13 PM
That is available by going to Usergroups > Usergroup Manager > select the usergroup to Edit > Username HTML Markup (Specify an opening and closing HTML tag with which to display the names of users in this group. This applies to names that appear on Logged-in Users, Who's Online, Users Browsing Forum, Users Browsing Thread, Posts, Member List etc.)
Username HTML Markup
The first field is the opening tag. The second field is the closing tag. These tags will be inserted around the user's username like this:
[opening tag]username[closing tag]
Some HTML tags you might want to use here include:
<span style="font-weight: bold;">username</span> = username
<span style="font-style: italic;">username</span> = username
<span style="text-decoration: underline;">username</span> = username
<span style="color: red;">username</span> = username
<span style="font: 20px verdana;">username</span> = username
You can also do combinations by using more than one attribute in the style property:
<span style="font: 20px verdana; color: red;">username</span> = username
OcR Envy
07-30-2008, 02:32 PM
You misunderstood Lynne, I know how to accomplish this for the postbit etc..
I want this to work for a new thread or a new reply. As in if someone posts text that includes a username it will colorize the username in their post.
Quillz
07-30-2008, 02:37 PM
Something like that would likely require quite a few edits in the SHOWTHREAD templates.
Lynne
07-30-2008, 02:41 PM
You misunderstood Lynne, I know how to accomplish this for the postbit etc..
I want this to work for a new thread or a new reply. As in if someone posts text that includes a username it will colorize the username in their post.
Ahhh, sorry about misunderstanding. As Quillz said, that would require quite a bit of modification. You would be wanting to check every word in a post to see if it's a username. That would be quite server intensive I would think. I suppose if it's just for a new post and if you have a small userbase, it would be doable, but I know I couldn't do something like that on my site!
OcR Envy
07-30-2008, 04:11 PM
How about if the names where placed inside a bbcode. Think that would be more server friendly?
Lynne
07-30-2008, 05:54 PM
How about if the names where placed inside a bbcode. Think that would be more server friendly?
Yes, that sounds much more server friendly. Unfortunately, I'm not the one to write the bbcode for that. I know I've seen bbcode that is actual code, not just css, but I've never written it.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.