Back to vBulletin 3.5 Add-ons

Default Font/Size/Color in a Post.
Mod Version: 1.0.2, by applehat

This modification is in the archives.
vB Version: 3.5.8 Rating: (3 votes - 4.67 average) Installs: 67
Released: 02 Aug 2005 Last Update: 02 Aug 2005 Downloads: 290
Not Supported Uses Plugins Template Edits Is in Beta Stage  

Default Font/Color/Size in a Post
This hack will allow your users to set there default font that will appear in there posts from the User CP.

Yes, I know this can be done with custome user feilds, but I dont like those because they change on every persons site...this just makes more sence.
(Remember that this is a Product! Use the product manager!)

This releace does not have the plugin required to get the defaults for a user back out of the database so that users dont have to reset there defaults every time they visit the options page. If you want to write this part, be my guest. (Because I realy dont know how.)

Details
1 Product XML
2 Template Edits

History
1.0.1 Fixed some stuff and redesigned 1 template edit.
1.0.0 Initial Version
Note: Tested on RC1 only!

Template Edits:

1) Open Modify User Option Templates -> modifyoptions

FIND:
PHP Code:
<thead>
    <
tr>
        <
td class="thead">
            <
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('uopt_thrd')"><img id="collapseimg_uopt_thrd" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_uopt_thrd].gif" alt="" border="0" /></a>
            
$vbphrase[thread_display_options]
        </
td>
    </
tr>
</
thead>
<
tbody id="collapseobj_uopt_thrd" style="$vbcollapse[collapseobj_uopt_thrd]">
    <
tr>
        <
td class="panelsurround" align="center">
        <
div class="panel">
            <
div style="width:$stylevar[formwidth_usercp]align="$stylevar[left]"
ADD BELOW:
PHP Code:
            <!--APPLE DEFAULT FONT HACK-->
        <
fieldset class="fieldset">
                <
legend><label for="deffont">$vbphrase[default_font_TITLE]</label></legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0" width="100%">
                <
tr>
                    <
td>$vbphrase[default_font_DESC]</td>
                </
tr>
                <
tr>
                    <
td>
                     
                        <
select name="deffont" id="sel_deffont">
                            <
option value="Arial">Arial</option>
                            <
option value="Verdana">Verdana</option>
                            <
option value="Lucida Console">Lucida Console</option>
                            <
option value="Century Gothic">Century Gothic</option>
                            <
option value="Times New Roman">Times New Roman</option>
                
                        </
select>
            <
select name="defsize" id="sel_defsize">
                            <
option value="1">1</option>
                            <
option value="2">2</option>
                            <
option value="3">3</option>
                            <
option value="4">4</option>
                            <
option value="5">5</option>
                            <
option value="6">6</option>
                            <
option value="7">7</option>
                        </
select>
            <
select name="defcolor" id="sel_defcolor">
                            <
option value="Black">Black</option>
                            <
option value="Blue">Blue</option>
                            <
option value="Red">Red</option>
                            <
option value="Green">Green</option>
                            <
option value="Orange">Orange</option>
                            <
option value="Yellow">Yellow</option>
                            <
option value="Pink">Pink</option>
                        </
select>
               </
td>
                </
tr>
                </
table>
            </
fieldset>  
        <!--/
APPLE DEFAULT FONT HAT--> 

2) Open Postbit Templates -> postbit (or postbit_legacy)

FIND:
PHP Code:
$post[message
There may be DIV tags around it, leave those alone!

REPLACE WITH:
PHP Code:
    <if condition="$post[deffont] || $post[defsize] || $post[defcolor]">
    <
font face="$post[deffont]size="$post[defsize]color="$post[defcolor]">$post[message]</font>
    <else />
    
$post[message]
    </if> 


If you know any better way of doing what I am doing (like possibly pulling the font, size, and color options from the same place the editor pulls them) please tell me. I admit to being a n00b

Download

This modification is archived and cannot be downloaded.

Screenshots

 

Similar Mods

User Default Font/Color/Size hack vBulletin 2.x Beta Releases

vblts.ru supports vBulletin®, 2022-2024