Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Default Font/Size/Color in a Post. Details »»
Default Font/Size/Color in a Post.
Version: 1.0.2, by applehat applehat is offline
Developer Last Online: May 2016 Show Printable Version Email this Page

Version: 3.5.8 Rating:
Released: 07-31-2005 Last Update: 08-01-2005 Installs: 67
Uses Plugins Template Edits
Is in Beta Stage  
No support by the author.

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

Show Your Support

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

Comments
  #2  
Old 08-01-2005, 09:10 PM
applehat applehat is offline
 
Join Date: Jun 2005
Location: Huntsville, AL
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just noticed I didn't include many colors or fonts...will fix.
Reply With Quote
  #3  
Old 08-01-2005, 09:49 PM
MrSDavidson MrSDavidson is offline
 
Join Date: Nov 2004
Location: Scotland
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit, NM just realised
Reply With Quote
  #4  
Old 08-13-2005, 02:05 PM
Wordplay Wordplay is offline
 
Join Date: Nov 2001
Location: Dengoku
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this the same as the personal font color in posts hack?
Reply With Quote
  #5  
Old 08-13-2005, 04:18 PM
bgtking's Avatar
bgtking bgtking is offline
 
Join Date: Sep 2002
Location: Florida
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, this doesn't have permissions does it?
Reply With Quote
  #6  
Old 08-13-2005, 07:44 PM
Brinnie's Avatar
Brinnie Brinnie is offline
 
Join Date: Jul 2005
Location: Louisiana
Posts: 360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bgtking
Hmm, this doesn't have permissions does it?
Just remove the size selector from the style template.
Reply With Quote
  #7  
Old 08-13-2005, 11:02 PM
FD929's Avatar
FD929 FD929 is offline
 
Join Date: Feb 2005
Location: California
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Brinnie
Just remove the size selector from the style template.
Yep. Had to. Good work Apple.
Reply With Quote
  #8  
Old 08-16-2005, 10:03 PM
applehat applehat is offline
 
Join Date: Jun 2005
Location: Huntsville, AL
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I dont even use this hack anymore. I went back to using Custome User Fields and just relocated the "others" hook into a "Color Options" table. Works fine for me :-P
Reply With Quote
  #9  
Old 08-17-2005, 03:34 AM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you post the one where you use custom fields or is it just a template edit?
Reply With Quote
  #10  
Old 08-18-2005, 04:00 AM
applehat applehat is offline
 
Join Date: Jun 2005
Location: Huntsville, AL
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its 2 template changes. One to the postbit and one to the user options template...forget its name.
Reply With Quote
Reply

Thread Tools

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 06:39 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.05394 seconds
  • Memory Usage 2,335KB
  • Queries Executed 23 (?)
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
  • (4)bbcode_php
  • (2)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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