The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
|||
|
|||
Oh, yeah, I probably could have done it so that the markup from the usergroup manager was preserved. Try going to Plugins & Products > Plugin Manager, and find "Set username markup from profile field" and click on it. Then replace the code with this:
Code:
if (is_member_of($user, 9) && !empty($user['field5'])) { $user[musername] = '<span style="color:'.$user['field5'].'">'.$user[musername].'</span>'; } |
Благодарность от: | ||
TC-Jamech |
#22
|
|||
|
|||
Quote:
For instance, my admin usergroup is red, and despite having that as my primary & diplay usergroup it still has my name showing the additional userroup colour preference. |
#23
|
|||
|
|||
OK, how will you know when you want the display usergroup and when you want the profile field color?
|
#24
|
|||
|
|||
Quote:
And select "identify me as admin" it identifies you in your red username (which is within the usergroup manager for that group) whilst "identify me as VIP" would change your username to the custom colour. At the moment, the only way to get a different colour shown is if that user removes the user colour hexcode in their settings |
#25
|
|||
|
|||
Hmm...OK. So it might work out better if we take a different approach, and instead of using is_member_of() and adding markup, we could just check if the markup is the 'VIP' markup (maybe by putting an id attribute in the span tag), and if so, add the color.
I'll look at it tomorrow. ETA: oh, and they're able to enter any hexcode they want? Then the plugin also needs to check for that, otherwise the could enter something like #000000;"> followed by any html or css they wanted. |
#26
|
|||
|
|||
Quote:
|
#27
|
||||
|
||||
Try also this product (I had develope it some months ago). It is for vB4 but I test it and works fine with vB3.
After installation check vbulletin options. You can add usergroups (who can change color) and exclude colors from use. You have only to add the field ID of the profile field which use for username colors and set the usergroup IDs. Username color is changed globally. |
#28
|
|||
|
|||
Oh good, I was meaning to get back to that. Now you've saved me the trouble.
|
#29
|
|||
|
|||
Quote:
|
#30
|
||||
|
||||
Yes, this hack doesn't need template edits.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|