Control User Post Font via Profile Options
Control User Post Font via Profile Options - vBulletin.org Forum
Control User Post Font via Profile Options - vBulletin.org Forum
To start you will need to make the profile fields. You can do this by going to the Admin Control Panel > User Profile Fields > Add New Profile Fields
================================================== =======
Note: All Profile Field Types are "Single-Selection Menu"
================================================== =======
1. Font Type Profile Field
Title: Font Type
Description: This will be the type of font for your text when you post on the forums. You can also enter in your own text name.
Options:
arial
arial black
comic sans ms
courier new
georgia
helvetica
impact
tahoma
times new roman
verdana
Set Default: None
Display Order: 1
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Memberlist searchable: No
Show on Memberlist: No
Allow user to input their own value for this option: Yes
Max length of allowed user input: 25
Field Length: 25
Page to display on: Edit Options: Other
**Next**
2. Font Color Profile Field
Title: Font Color
Description: This will be the color of your text when you post on the forums. You can also enter in your own color code.
Options:
Black
White
Red
Blue
Orange
Green
Pink
Purple
Brown
Yellow
Set Default: None
Display Order: 2
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Memberlist searchable: No
Show on Memberlist: No
Allow user to input their own value for this option: Yes
Max length of allowed user input: 7
Field Length: 25
Page to display on: Edit Options: Other
**Next**
3. Font Size Profile Field
Title: Font Size
Description: This is will control the size of your text in your posts on the forum.
Options:
8
9
10
11
12
13
14
15
16
17
18
19
20
Set Default: None
Display Order: 3
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Memberlist searchable: No
Show on Memberlist: No
Allow user to input their own value for this option: No
Page to display on: Edit Options: Other
**Next**
4. Font Bold Profile Field
Title: Font Bold
Description: This option will make your font bold in your posts on the forum.
Options:
bold
Set Default: None
Display Order: 4
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Memberlist searchable: No
Show on Memberlist: No
Allow user to input their own value for this option: No
Page to display on: Edit Options: Other
**Next**
5. Font Italic Profile Field
Title: Font Italic
Description: This option will make your font italic in your posts on the forum.
Options:
italic
Set Default: None
Display Order: 5
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Memberlist searchable: No
Show on Memberlist: No
Allow user to input their own value for this option: No
Page to display on: Edit Options: Other
**Next**
6. Font Bold Profile Field
Title: Font Underline
Description: This option will make your font underlined in your posts on the forum.
Options:
underline
Set Default: None
Display Order: 6
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Memberlist searchable: No
Show on Memberlist: No
Allow user to input their own value for this option: No
Page to display on: Edit Options: Other
TEMPLATE EDIT:
FIND:
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
REPLACE WITH:
<!-- message -->
<div id="post_message_$post[postid]">
<!--Custom Font-->
<if condition="$post['fieldXX'] OR $post['fieldXX'] OR $post['fieldXX'] OR $post['fieldXX'] OR $post['fieldXX'] OR $post['fieldXX']">
<span style="font: $post[fieldXX]px $post[fieldXX]; color: $post[fieldXX]; font-weight: $post[fieldXX]; font-style: $post[fieldXX]; text-decoration: $post[field17];">$post[message]</strong></span>
<else />
$post[message]
</if>
<!--/Custom Font-->
</div>
<!-- / message -->
Note: Replace of fieldXX with the correct profile field numbers!
his mod allows users to select their default posting font and color. You will have to select this at registration and can update it whenever you want in profile.
First you must make two new single selection menu user profile fields. Options for them are below.
Profile field one:
Title: Default Post Color
Description: What color your posts show up as?
Options:
Black
Blue
Green
Red
Pink
Orange
Purple
Set Default: Yes, but no first blank option
Display Order: Doesnt Matter
Field Requiried: Yes, at registration and profile updating
Field Editable by User: Yes
Private Field: No
Field Searchable on Members List: No
Show on Members List: No
Profile field two:
Title: Default Post Font
Description: What do you want your default post font to be?
Options:
Arial
Arial Black
Arial Narrow
Book Antiqua
Century Gothic
Comic Sans MS
Courier New
Fixedsys
Franklin Gothic Medium
Garamond
Georgia
Impact
Lucida Console
Microsoft Sans Serif
Palatino Linotype
System
Tahoma
Times New Roman
Tribuchet MS
Verdana
Set Default: Yes, but no first blank option
Display Order: Doesnt Matter
Field Requiried: Yes, at registration and profile updating
Field Editable by User: Yes
Private Field: No
Field Searchable on Members List: No
Show on Members List: No
Now go to the user profile field manager, and jot down the two field numbers of the new fields listed on the right side of the two fields. Along with that, write down what number goes with what field. Please note this is not the display number, its the number next to it that says fieldX
Template Edits:
Go to your styles postbit/postbit legacy (whatever you use)
Find: Code:
<!-- message -->
After Add:
Code:
<font COLOR="$post[fieldX]"><font face="$post[fieldX]">
Replace: The first red X with your default text color field number
The second red X with your default font field number.
Find: Code:
<!-- / message -->
Add Above: Code:
</font></font>