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

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
  #32  
Old 03-05-2006, 05:54 AM
ffevo's Avatar
ffevo ffevo is offline
 
Join Date: Feb 2003
Location: California
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyway, That my memebers could just type in a color? and it will update to the database?
Reply With Quote
  #33  
Old 03-10-2006, 01:58 PM
rockerBOO rockerBOO is offline
 
Join Date: Mar 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would suggest this to be instead of the font tag >_>

PHP Code:
2Open Postbit Templates -> postbit (or postbit_legacy)

FIND:
    
$post[message


There may be DIV tags around itleave those alone!

REPLACE WITH:

    <if 
condition="$post[deffont] || $post[defsize] || $post[defcolor]">
        <
span style="font-family: $post[deffont]; font-size:$post[defsize]; color: $post[defcolor];">$post[message]</span>
        <else />
        
$post[message]
    </if> 
also for you ffevo

PHP Code:
 <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
replace that in the hack with

PHP Code:
 <input type="text" size="20" name="defcolor" id="sel_defcolor" /> 
Reply With Quote
  #34  
Old 06-10-2006, 05:17 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you applehat

Working really well

Install
Reply With Quote
  #35  
Old 08-05-2006, 12:43 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it working with 3.6?
Reply With Quote
  #36  
Old 09-05-2006, 05:09 PM
bchertov's Avatar
bchertov bchertov is offline
 
Join Date: Dec 2004
Location: Sonoma County, CA
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MissKalunji
is it working with 3.6?
Bump! (work in 3.6?)

And what's the state of this hack? Does it use custom user fields or? Support Bold/Italic? Color?


Thanks!
Barry
Reply With Quote
  #37  
Old 09-06-2006, 09:53 PM
Zelos's Avatar
Zelos Zelos is offline
 
Join Date: Jun 2006
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd also like to know if this works in 3.6.
Reply With Quote
  #38  
Old 09-07-2006, 07:12 AM
NoKz NoKz is offline
 
Join Date: Aug 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have it installed and working great with 3.6. Thanks for this!
Reply With Quote
  #39  
Old 09-24-2006, 10:07 AM
dknelson dknelson is offline
 
Join Date: Oct 2004
Posts: 412
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've just installed it on 3.6.1 and it works fine. Sure wish this hack hadn't been dropped though. There are a couple of things needed to complete it.

1. When the options are set, I wish it would retain them when you go back to view your set options.

2. I wish there was a "default" option at the top of each list so that a user could go back to default if they desire.
Reply With Quote
  #40  
Old 02-19-2007, 12:35 PM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone know if this hack or one idential has a bold option?
Reply With Quote
  #41  
Old 02-22-2007, 03:35 AM
apiasto's Avatar
apiasto apiasto is offline
 
Join Date: Oct 2006
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great work been looking for it very easy to install thanx. wont mind the bold option
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 11:23 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.04886 seconds
  • Memory Usage 2,372KB
  • 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
  • (7)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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