vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Personal Font/Color in Posts (https://vborg.vbsupport.ru/showthread.php?t=93127)

Chachacha 08-04-2007 09:11 PM

Apparently theres no way to make it work in quotes. *UNINSTALLED*

SliceofLife 09-02-2007 10:11 AM

Worked. Thank you! My members will love this :D

Suiko Jin 09-19-2007 11:11 PM

Works great! Converted fine.

FENIX 11-28-2007 10:35 AM

Quote:

Originally Posted by grc (Post 1305002)
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


TheJordan 12-13-2007 12:04 PM

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.

ahesard 04-07-2008 07:30 PM

do not show in opera

skariko 12-28-2009 01:24 PM

Any idea to port this on VB4? :)


All times are GMT. The time now is 02:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01275 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete