![]() |
Allow users to change user title color
1 Attachment(s)
Hi all, this is my first release, I'm not sure if this has been released before but I thought of this the other day and implemented it onto a forum of mine.
About: This template modification allows users of your forum community to change the color and font weight of their user title by entering a color HEX code in the Edit Profile in UserCP. How to do this: First Step: What you're going to do is go to your AdminCP and find 'User Profile Fields' and select 'Add New Profile Field'. You're going to need to create two separate fields: Code:
First one needs to be - Single-Line Text Box with a title of Custom User title color or what ever you want it to be Go to Styles & Templates > Style Manager > {Your Theme Name} > Edit Templates > Posbit > Postbit_Legacy Search for: Code:
<span class="usertitle"> {vb:raw post.usertitle} </span> Code:
<span class="usertitle"> Replace the Green X in my code with the field number in your admincp for the Bold and Normal field. users should be able to edit the color of their user title and font-weight in UserCP > Edit Profile and scroll to the bottom. Version 2: Added 3 more styling options, Glow, Marquee Scroll and Ability to add sparkle image(note: doesnt look good with a scroll) You need to add 5 user profile fields. First one needs to be - Single-Line Text Box with a title of Custom User title color or what ever you want it to be Second one needs to be - Single-Selection Radio Buttons with a title of Bold or Normal or what ever u want it, for options on this one you need it to be bold and normal like dis Third one needs to be Single-Line Text Box with the title of Sparkle Image or what ever you want lol Fourth one needs to be Single-Line Text Box with the title of Glow. Fifth needs to be a Single-Selection Menu with the title or Marquee or Scroll w.e, when setting this one up where it says Set Default, have it to None Go to Styles & Templates > Style Manager > { your theme name} > Edit Templates > Posbit > Postbit_Legacy Search for: Code:
<span class="usertitle"> Code:
Green X - Bold or Normal Field Number Blue X - Sparkle Image Field Number Orange X - Glow Field Number Purple X - Marquee Scroll Field Number Thanks for reading and I hope this is useful to some people and I'm sorry if this is done before. |
First of all thanks for sharing, it is what makes this place work! :)
Note - This is not a criticism, just a bit of awareness to those that might use the code. In order for this to be minimally safe the field entries in the ACP should have a regular expression set for the user input and a field length. Otherwise I could simple add my own CSS to the template, or possibly something worse. Additional validity testing can also be added by using plugin/hook. Again thanks for sharing. |
All times are GMT. The time now is 09:13 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:
|