Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Personal Font/Color in Posts Details »»
Personal Font/Color in Posts
Version: 1.00, by Gio~Logist Gio~Logist is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Version: 3.5.0 RC1 Rating:
Released: 07-28-2005 Last Update: 07-28-2005 Installs: 78
Template Edits
 
No support by the author.

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]
Replace it with this

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>
Replace the first x in the condition statement with the ID of the ?Your Font Color In Posts? profile field, and replace the second with the ?Your Font In Posts? profile field. The X in font-family will be the id for the field in which you created in the first step and the X in color will be the id for the field in which you created in the first step. 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.


[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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #102  
Old 08-04-2007, 09:11 PM
Chachacha's Avatar
Chachacha Chachacha is offline
 
Join Date: Jul 2006
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Apparently theres no way to make it work in quotes. *UNINSTALLED*
Reply With Quote
  #103  
Old 09-02-2007, 10:11 AM
SliceofLife SliceofLife is offline
 
Join Date: Jul 2007
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked. Thank you! My members will love this
Reply With Quote
  #104  
Old 09-19-2007, 11:11 PM
Suiko Jin's Avatar
Suiko Jin Suiko Jin is offline
 
Join Date: Jul 2005
Location: Las Vegas
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great! Converted fine.
Reply With Quote
  #105  
Old 11-28-2007, 10:35 AM
FENIX FENIX is offline
 
Join Date: Dec 2004
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by grc View Post
I've spent some time today getting this mod to work on 3.6.8 -- including the addition of font size too.

First, add a Personal Font Size field to the User Profile Fields. Make the options
Use Forum Default
medium
large


Or you can size by points
9pt
10pt
11pt
12pt

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
Reply With Quote
  #106  
Old 12-13-2007, 12:04 PM
TheJordan TheJordan is offline
 
Join Date: Dec 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
with
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>
I hope this helps... if I have time, I'll look into dropping in a color chooser and making it work in quotes.
Reply With Quote
  #107  
Old 04-07-2008, 07:30 PM
ahesard ahesard is offline
 
Join Date: Oct 2007
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

do not show in opera
Reply With Quote
  #108  
Old 12-28-2009, 01:24 PM
skariko skariko is offline
 
Join Date: Apr 2006
Location: Milano (Italy)
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea to port this on VB4?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05130 seconds
  • Memory Usage 2,293KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete