The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Personal Font/Color in Posts Details »» | |||||||||||||||||||||||||
Personal Font/Color in Posts
by gio~logist Allow users to change what color/font their posts are in threads Via UserCP [high]Step 1[/high] [high]Go to User Profile Fields >> Add New User Profile Field[/high] Choose A "Single-Line Text Box" [high]Title:[/high] "Your Font Color In Posts" [high]Description:[/high] This is the color of the font in which will appear in your posts. (Ex: #ff0000 is red) [high]Display Size:[/high] 11 [high]Max length of allowed user input:[/high] 8 [high]HIT SAVE[/high] [high]Step 2[/high] [high]Go to User Profile Fields >> Add New User Profile Field[/high] Choose A "Single-Line Text Box" [high]Title:[/high] "Your Font In Posts" [high]Description:[/high] This is the font in which will appear in your posts. (Ex: Tahoma) [high]Display Size:[/high] 15 [high]Max length of allowed user input:[/high] 20 [high]HIT SAVE[/high] [high]Step 3[/high] Now go to edit your postbit template and search for this code: HTML Code:
$post[message] HTML Code:
<if condition="$post['fieldx'] != '' OR $post['fieldx'] != ''"> <font style="font-family:$post[fieldx]; color:$post[fieldx];">$post[message]</font> <else /> $post[message] </if> [high]HIT SAVE[/high] [high]AND WE'RE DONE![/high] [high]Addons Already Made[/high] Glowing Posts For Mods, S.Mods, and Admins [high]Planned Addons For Next Release[/high] - Nothing So Far Feel Free to Post Any Ideas/Suggestions Supporters / CoAuthors Show Your Support
|
Comments |
#102
|
||||
|
||||
Apparently theres no way to make it work in quotes. *UNINSTALLED*
|
#103
|
|||
|
|||
Worked. Thank you! My members will love this
|
#104
|
||||
|
||||
Works great! Converted fine.
|
#105
|
|||
|
|||
Quote:
Hi there, I get this message when I try to install your code.. Code:
The following error occurred when attempting to evaluate this template: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /home/sites/3-cubed.net/public_html/forum/includes/adminfunctions_template.php(3587) : eval()'d code on line 128 |
#106
|
|||
|
|||
First, the error FENIX is getting is a syntax error... check to make sure you're opening and closing all of your quotes.
I haven't had a chance to play around with making this work in quotes, but here's what I got set up on 3.6.8 that seems to be working very well... First, create 3 new fields via User Profile Fields -> Add New Profile Field Field 1: --------- Type: Single-Line Text Box Title: Default Post Color Description: Set the default color for your posts in hexadecimal format (e.g. #FF0000 = red). Hexadecimal color codes work like this: #[red][green][blue], with FF being the highest and 00 being the lowest. Look up hexadecimal in Wikipedia if you'd like a more in depth explanation. Max Length: 9 Field Length: 15 Required: No Editable: Yes Searchable: No Member List: No ---------- Field 2 ---------- Type: Single-Selection Menu Title: Default Post Font Description: Set the default font for your posts. Options:Arial Book Antiqua Century Gothic Comic Sans Courier Courier New Garamond Georgia Tahoma Times New Roman Verdana [whatever else you want to add/remove, etc.] Set Default: Yes, Including first blank... Required: No Editable: Yes Searchable: No Member List: No ---------- Field 3 ---------- Type: Single-Selection Menu Title: Default Post Font Size Description: Select the default size of the text in your posts. Options:9pt 10pt 12pt 13pt [whatever else you want to add/remove, etc.] Set Default: Yes, Including first blank... Required: No Editable: Yes Searchable: No Member List: No ------------------------------- Take a look at User Profile Field Manager and record the field names (e.g., field5, field6, etc.) for the fields you just created. Now replace COLOR, SIZE, and FONT in the below code with your field names. it's bold, because it's important ------------------------------- Find and replace in Postbit Templates -> postbit: Code:
<div id="post_message_$post[postid]">$post[message]</div> Code:
<div id="post_message_$post[postid]"> <if condition="$post['COLOR'] != ''"> <span style="color: $post[COLOR];"> </if> <if condition="$post['FONT'] != ''"> <span style="font-family: '$post[FONT]';"> </if> <if condition="$post['SIZE'] != ''"> <span style="font-size: $post[SIZE];"> </if> $post[message] <if condition="$post['SIZE'] != ''"> </span> </if> <if condition="$post['FONT'] != ''"> </span> </if> <if condition="$post['COLOR'] != ''"> </span> </if> </div> Find and replace in Postbit Templates -> postbit_legacy: Code:
<div id="post_message_$post[postid]">$post[message]</div> Code:
<div id="post_message_$post[postid]"> <if condition="$post['COLOR'] != ''"> <span style="color: $post[COLOR];"> </if> <if condition="$post['FONT'] != ''"> <span style="font-family: '$post[FONT]';"> </if> <if condition="$post['SIZE'] != ''"> <span style="font-size: $post[SIZE];"> </if> $post[message] <if condition="$post['SIZE'] != ''"> </span> </if> <if condition="$post['FONT'] != ''"> </span> </if> <if condition="$post['COLOR'] != ''"> </span> </if> </div> |
#107
|
|||
|
|||
do not show in opera
|
#108
|
|||
|
|||
Any idea to port this on VB4?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|