Username color through out the site based on profile field selection?

  • Time
  • Show
Clear All
new posts
  • pureturk
    Senior Member
    • Jun 2007
    • 141

    [Forum] Username color through out the site based on profile field selection?

    How would I color code all usernames based on a profile field selection?

    so if i have a profile field with the 4 selections;


    How do I make the username colors automatically be that color as well?
  • Merjawy
    Senior Member
    • Sep 2002
    • 2613

    In usergroups settings, enter code in HTML markup section

    AdminCP > Usergroups >> Usergroup Manager > Edit Usergroup (of selected group)

    something like this:

    in first box

    PHP Code:

    <span style='font-weight: bold; color: #FF0000;'
    in second box

    PHP Code:

    To be or not to be... Where the hell is the question????
    My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too

    Live vBulletin 4.2.0 Multilingual * Alpha/Beta vB 4 - vB 5 Tier 1A
    CentOS 6.2 - Apache:2.2.15(Apache2Handler) - PHP:5.3.3 - MySQL:5.1.61
    Xampp/Win-XP - Apache v2.2.21(Apache2Handler) - PHP:5.3.8 - MySQL:5.5.16


    • pureturk
      Senior Member
      • Jun 2007
      • 141

      What does "Usergroups" have to do with Profile Fields" ?


      • GasMan320
        Senior Member
        • May 2006
        • 206
        • 4.2.X

        I think you would need a custom plugin that would have to hook into templates anytime a username is shown and access the SQL db to pull a users profile field and then colorized the name based on that.
        Location Import Error Fix For Facebook Connect Users


        • TheLastSuperman
          Senior Member
          • Sep 2008
          • 1799

          Custom plugin as GasMan320 mentioned OR a little elbow grease... so basically you could edit any and all templates in question that show the username, then wrap it using a conditional and make it show this or that via css based on the profile field entry.

          Former vBulletin Support Staff
          Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
          Thinking outside the box? Need modification support? Visit and have at it!


          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.