![]() |
Custom Username colours
1 Attachment(s)
This is my first posted template edit so be gentle.
It comes courtesy of the username and font hack by gio~logist. This mod will allow you to define a list of colours for your users to pick from instead of them having to use hex codes. There is also the option of just letting particular user groups use this. STEP 1 Goto User Profile Fields > Add new user profile field. Select Single Selection Menu. Title: Custom Username Colour Description: Select a custom username colour. Select your colours from the long list at http://www.w3schools.com/HTML/html_colornames.asp and enter them into the Options box. One colour per line. Once you're done, save it and make a note of the field number STEP 2 Edit your Postbit template. Find PHP Code:
PHP Code:
STEP 3 If you want to display this for certain usergroups; Go to your Styles & Templates and select the userfield_select_option template. Replace it with: PHP Code:
Select the userfield_wrapper and replace that with the following: PHP Code:
My coding abilities at best can be described as amateur but I'll try to help with any problems. |
Pictures please.
This might be useful. |
So I got it working, only problem like I said was the fact not all those colours will work. I will have to go through them to see which ones do and which ones don't. Also have to see what's the max amount of colours you can load. If you know please let me know.
Next are you able to add an option for the names to be in bold? In the screen print you will notice all names that have this are in bold. |
Quote:
To make the names bold, just replace the first $post[musername] with <b>$post[musername]</b> |
Awesome thanks man.
I think whoever does this we should compile a list of what colours work. This I think would be beneficial to everyone. I think we should compile the list and post here |
nice hack, thanks alot !
|
One thing I noticed. My regular users are still able to do it, it just wont have any effect unless they purchase the paid subscription for it. Did I do it wrong or it is not setup for it to be hidden from them until they purchase a paid subscription
|
^ you have done this part wrong
PHP Code:
|
Quote:
How do I fix it? |
Quote:
PHP Code:
|
Quote:
The following error occurred when attempting to evaluate this template: Parse error: syntax error, unexpected '*' in ********************************************'d code on line 1 This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. i blocked out the stuff with stars cuz i dont know if its private or not |
okay well i entered it and didnt get the error but its still showing it for non paying users.
below is what i entered. paid members are 9 PHP Code:
|
In his instructions it says enter your color choices in the options box.
I do not see no stinkin options box!!!!!!!!! Everytime I try to add a hack of any kind there is always a problem for me and its always me, nevermind I figured out what I was doing wrong |
It didn't work, the colors of a user name don't change.
Do you have to do STEP 3 as I didn't? |
I did follow and edit as it says and put in the right field id. I do use Version 3.8.2 but I don't see why that should matter.
Does anyone have this working if so any problems like myself? |
I just installed it and its working just fine so far.
|
Nice, but not show in forumhome, any idea?
|
I followed step 1 and 2 but it doesn't work.
I though this mod was supported? |
My bad, I forgot to edit the postbit_legacy template.
Works good now. But it doesn't show the user name colors when you hit the 'New Posts' Which template needs to be edited for this? |
Quote:
Code:
THIS_SCRIPT != 'index' Code:
<if condition="THIS_SCRIPT != 'profile' OR (!in_array($profilefield[profilefieldid], array(A, B, C)) OR is_member_of($bbuserinfo, 1, 2, 3))"> Code:
<if condition="THIS_SCRIPT != 'profile' OR THIS_SCRIPT !='index' OR (!in_array($profilefield[profilefieldid], array(A, B, C)) OR is_member_of($bbuserinfo, 1, 2, 3))"> |
thanks
how to make the color choose from dropdown menu like this https://vborg.vbsupport.ru/external/2010/08/13.jpg |
Quote:
|
nice mod, one of my users was asking for something similar, will check this out today
would this work on 4.x as well? thx |
yes it would work on vB4
|
THIS WILL NOT WORK on VB4 as is... the template code would need to be updated,
|
The "font" tag is being depreciated from HTML, you can get the same results by using "SPAN" instead.
Change: Code:
<font style="color:$post[fieldx]">$post[musername]</font> Code:
<span style="color:$post[fieldx]">$post[musername]</span> |
how do i get it to work on the homepage and in shoutbox?
|
Quote:
it would be great to get a plugin for this with zero template edits :up: |
Hey man, I installed your mod and did some tiny modifications to it, however, I was wondering if it's possible to get this to appear in the active users bit? It seems that the variable $activeusers needs to be edited, but i'm not sure how that can be done? Any help on getting this working in the active users bit would be fantastic!
Also if you can post instructions on how to get it in: -Memberlist -Forumhome/viewing a forum -Showgroups Thanks! |
This isn't working on vBulletin 3.8.7 PL3 - could someone provide me with a fix?
|
All times are GMT. The time now is 03:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|