The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Members want custom username colors.
Ok, so I know there's that shop hack, but I only want an option in the profile field to change the color of the person's usernames. And that shop hack is a bit advanced, and a lot of the people at my site won't use any of it. So I'm wondering if someone can make a something similar to gio~logist's hack seen here: https://vborg.vbsupport.ru/showthread.php?t=93127
Shouldn't be too hard for you guys, right? |
#2
|
||||
|
||||
It's very achievable. For experiment sake, create a custom Profile Field with a single line textarea entry. Set the title to something like "Custom Username Colors". In the Description say something like "Custom user colors: Only HEX values allowed." Set max length to 7 and display size to 11. Enable it so that users can edit it. After setting the other definitions click "Save". Remember the field's ID.
In your postbit or posbit_legacy find: Code:
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> Code:
<if condition="$post[field19]"><a class="usercolor" href="member.php?$session[sessionurl]u=$post[userid]"> <span style="color:$post[field19]">$post[musername]</span></a> <else /> <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> </if> Then in Main CSS add this to Additional CSS Definitions: Code:
.usercolor { font-size:15px; font-weight:bold; text-decoration:none; } Anyway, it should work for IE, Firefox... |
#3
|
|||
|
|||
Thanks a lot, it works perfectly.
EDIT: Actually, I'd like to know if I can use the same code for the who's browsing this thread/forum, and who's online... |
#4
|
||||
|
||||
It may be possible with Usergroup conditionals. Doing that will allow users to select different colors for their Usergroups. I'll need to check into that.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|