Back to vBulletin 3.0 Template Modifications

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

This modification is in the archives.
vB Version: 3.0.8 Rating: (0 vote - 0 average) Installs: 6
Released: 29 Jul 2005 Last Update: Never Downloads: 18
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 -------------------------------------------
//////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

This hack was originally made for 3.5, however, Erwin gave me the OK to post it here as well, due to the fact that it also works on this version of vb :-D

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.

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 Username Font/Color Posts vBulletin 3.5 Template Modifications

vblts.ru supports vBulletin®, 2022-2024