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

Collapse
X
 
  • 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;

    Yellow
    Red
    Orange
    Blue

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

    #2
    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:

    </span
    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

    Comment

    • pureturk
      Senior Member
      • Jun 2007
      • 141

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

      Comment

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

        #4
        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

        Comment

        • TheLastSuperman
          Senior Member
          • Sep 2008
          • 1799

          #5
          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 www.vBulletin.org and have at it!

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎