Back to vBulletin 3.5 Template Modifications

Users Choose Username Font/Color Posts
Mod Version: 1.00, by Gio~Logist

This modification is in the archives.
vB Version: 3.5.0 RC1 Rating: (1 vote - 5.00 average) Installs: 26
Released: 29 Jul 2005 Last Update: 29 Jul 2005 Downloads: 58
Not Supported Template Edits  

//////////////////////// Users Choose Color/Font Of Username In Posts \\\\\\\\\\\\\\\\\\\\\\\\
////////////////////////////////////////////////// by gio~logist \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
------------------- Allow users to change what color their username is in posts --------------------
------------------------------------------ Via UserCP -------------------------------------------
//////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Want members to be able to choose the font color of their usernames in posts?

Step 1
Go to User Profile Fields >> Add New User Profile Field

Choose A "Single-Line Text Box"

Title: "Color of Your Username"

Description: Type in the color in which you will like your username to be. Keep in mind that writing the colors in text does not always work, so try and format it like this: #ff0000 (that code is for red).

Display Size: 11

Max length of allowed user input: 7

HIT SAVE

Step 2
Now go to edit your postbit template and search for this code:

HTML Code:
$post[musername]
Replace it with this

HTML Code:
<if condition="$post['fieldx'] != '' ">
<font style="color:$post[fieldx]">$post[musername]</font>
	<else />
$post[musername]
</if>
X will be the id for the field in which you created. To view the id of the field created go to the "Profile Field Manager" and find the field ID of the field you made. (This appears under the "Name" column). It should show as fieldx where x is the ID.

HIT SAVE

Want them to be able to choose the font as well?

Step 1
Go to User Profile Fields >> Add New User Profile Field

Choose A "Single-Line Text Box"

Title: "Font of Your Username"

Description: Type in the font in which you will like. For example for tahoma, type in "Tahoma", without the quotations.

Display Size: 15

Max length of allowed user input: 20

HIT SAVE

Step 2
Now go to edit your postbit template and search for this code:

HTML Code:
$post[musername]
Replace it with this

HTML Code:
<if condition="$post['fieldx'] != '' ">
<font style="font-family:$post[fieldx]">$post[musername]</font>
	<else />
$post[musername]
</if>
The X in font-family will be the id for the field in which you created. To view the id of the field created go to the "Profile Field Manager" and find the field ID of the field you made. (This appears under the "Name" column). It should show as fieldx where x is the ID.

HIT SAVE

AND WE'RE DONE!

If you want them to be able to choose both color AND font, only do step 1 in each part, and then replace:

HTML Code:
$post[musername]
with

HTML Code:
<if condition="$post['fieldx'] != '' ">
<font style="font-family:$post[fieldx]; color:$post[fieldx];">$post[musername]</font>
	<else />
$post[musername]
</if>
The X in font-family will be the id for the field in which you created. The X in font-color will be the id for the field in which you created before. To view the id of the field created go to the "Profile Field Manager" and find the field ID of the field you made. (This appears under the "Name" column). It should show as fieldx where x is the ID.

Current Add-Ons
Exclude Certain Colors

Spoiler (click to open)


Exclude Certain Colors Add-On

Change
HTML Code:
<if condition="$post['fieldx'] != '' ">
<font style="color:$post[fieldx]">$post[musername]</font>
	<else />
$post[musername]
</if>
To

HTML Code:
<if condition="$post['fieldx'] != '' ">
<if condition="$post['fieldx'] == 'COLORCODE1' OR $post['fieldx'] == 'COLORCODE2' OR $post['fieldx'] == 'COLORCODE3' OR $post['fieldx'] == 'COLORCODE4'  ">
<else />
<font style="font-family:$post[fieldx]">$post[musername]</font>
</if>
	<else />
$post[musername]
</if>
Replace COLORCODE1, COLORCODE2, ETC. with the codes you want to excluce.

Close


Planned For Next Version (So Far)
- Have a pop up that allows you to pick a color and then shows the code for that color.

If you have any other ideas feel free to post them!

Download

This modification is archived and cannot be downloaded.

Supporters / CoAuthors

  • gio~logist

Similar Mods

Users Choose Color/Font Of Username In Posts vBulletin 3.0 Template Modifications

vblts.ru supports vBulletin®, 2022-2024