Back to vBulletin 3.6 Add-ons

User Font/Color Post Addon
Mod Version: 1, by Neo_Angelo

This modification is in the archives.
vB Version: 3.6.4 Rating: (0 vote - 0 average) Installs: 15
Released: 04 Dec 2006 Last Update: 05 Dec 2006 Downloads: 74
Not Supported Template Edits  

This is my first ever Mod i've ever written, i'm very new to PHP and template modding so don't expect an Uber code :P

There was a thread released on a mod that allowed users to change the font color and font of their posts. with this addon your users will be able to choose how big their font will be.

How it works:

To prevent users from using overly sized fonts, i've tried to limit font sizes to just double figures, yes i know you can still put 72 for a huge font but i'm not advanced enough yet to provide a solution to this.

What you need to do:

Ok firstly Log into your ACP and create a new custom field.

Option: Single Line Text Box
Title: Post Font Size
Description: Change the Size of your Post font here (EG 8,12,14).
Private: NO
Default Value: 12
Field Required: NO
Searchable: NO
Editable By Users: YES
Max User Input: 2
Field Length: 3
Show on Memeber List: No

Now Note Down the Field Number (example Field ID: 12)

Next Open up you Postbit_legacy template and find the following:
Code:
$post[message]
Replace with:
Code:
<div id="post_message_$post[postid]"><if condition="$post['fieldX'] != ''>
<font style="font-size:
$post[fieldX]px;">$post[message]</font>
<else />
$post[message]
and your done, Replace X with the field ID of your custom field.

If your using the Mod for changing Color of text and font then do the following.

Find:
Code:
<div id="post_message_$post[postid]"><if condition="$post['fieldX'] != '' OR $post['fieldX'] != ''">
and Replace With:
Code:
<div id="post_message_$post[postid]"><if condition="$post['fieldX'] != '' OR $post['fieldX'] != '' OR $post['fieldX'] != ''">
then find:
Code:
<font style="font-family:$post[fieldX]; color:$post[fieldX];"></font>
     <else />
$post[message]
And Replace with:
Code:
<font style="font-family:$post[fieldX]; color:$post[fieldX]; font-size:
$post[fieldX]px;">$post[message]</font>
     <else />
$post[message]
Remember to change the X's to the ID's of your custom fields.

Enjoy!

Download

This modification is archived, downloads are still allowed.

File Type: %1$s Size Addon.txt (2.4 KB, 114 downloads)


vblts.ru supports vBulletin®, 2022-2024