vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Default User Text Formatting (font styling) . Zero Query! (https://vborg.vbsupport.ru/showthread.php?t=231923)

Sador 01-16-2010 04:35 PM

Sounds good! Gonna try it out. Thanks.

Sador 01-16-2010 04:44 PM

Works like a charm. Thank you for this, it's great.

Blooded 03-07-2010 10:57 PM

not workin for me :/

AliMadkour 03-07-2010 11:10 PM

Quote:

Originally Posted by Blooded (Post 1999480)
not workin for me :/

me too!
I am using this mod!

Juggernaut 03-20-2010 07:24 PM

It's not working with vBulletin 4.0.2 PL1 :(

Kaleem 03-22-2010 03:50 PM

It is not working with the new 4.0.2 PL1. It shows up everything but when u change settings it doesn't save and goes back to default.

syrn 03-29-2010 06:56 AM

very nice , Installed , 5 *

thanx very much , i really need it

captainron19 04-10-2010 09:47 AM

Once installed will this change all of the users previous posts to the set font size and color? I had one like that before I upgraded to 4.0 and like that feature f it

captainron19 04-11-2010 05:22 PM

Disregard my last post - installed it and found out it does not effect the previous posts.... great mod - Installed

thanks

Oyabun 04-15-2010 05:53 AM

1 Attachment(s)
https://vborg.vbsupport.ru/external/2011/10/53.jpg

I don't know if the code is pretty good but I changed my nlp_usertextformatting template to this and wanted to share it with you guys:


PHP Code:

<script type="text/javascript" language="javascript">
<!--
var 
prefix 'sel_nlp_usertextformatting_';
function 
nlp_usertextformatting(req) {
    switch(
req) {
        case 
'color':
            
fetch_object(prefix 'fontcolor').style.backgroundColor fetch_object(prefix 'fontcolor').value;
            
nlp_usertextformatting('set');
        break;
        case 
'set':
            
fetch_object(prefix 'preveiw').style.color = (fetch_object(prefix 'fontcolor').value != -1) ? fetch_object(prefix 'fontcolor').value '';
            
fetch_object(prefix 'preveiw_size').setAttribute("size", (fetch_object(prefix 'fontsize').value != -1) ? fetch_object(prefix 'fontsize').value '');        
            
fetch_object(prefix 'preveiw').style.fontFamily = (fetch_object(prefix 'fonttype').value != -1) ? fetch_object(prefix 'fonttype').value '';
            
fetch_object(prefix 'preveiw').style.fontStyle fetch_object(prefix 'italic').checked 'italic' 'normal';
            <
vb:if condition="is_browser('ie')">document.all.sel_nlp_usertextformatting_preveiw.style.fontWeight<vb:else />fetch_object(prefix 'preveiw').style.fontWeight</vb:if> = fetch_object(prefix 'fontweight').checked 'bold' 'normal';
        break;
        case 
'reset':
            
fetch_object(prefix 'fontcolor').value fetch_object(prefix 'fonttype').value fetch_object(prefix 'fontsize').value '-1';
            
fetch_object(prefix 'fontweight').checked false;
            
fetch_object(prefix 'preveiw_size').removeAttribute('size');
            
fetch_object(prefix 'preveiw').style.color fetch_object(prefix 'preveiw').style.fontFamily fetch_object(prefix 'preveiw').style.fontWeight fetch_object(prefix 'fontcolor').style.backgroundColor fetch_object(prefix 'preveiw').style.fontStyle '';
    }
}
//-->
</script>
<
fieldset class="blockrow">
    <
legend>{vb:rawphrase nlp_usertextformatting_title}</legend>
    <
class="description">{vb:rawphrase nlp_usertextformatting_description}</p>
    <
table width="100%">
      <
tr>
        <
td width="50%"><label for="sel_nlp_usertextformatting_fonttype">{vb:rawphrase nlp_usertextformatting_fonttype}</label></td>
        <
td width="50%"><select onchange="nlp_usertextformatting('set');" name="nlp_usertextformatting_fonttype" id="sel_nlp_usertextformatting_fonttype">
        <
option value="-1">{vb:rawphrase use_forum_default}</option>
        {
vb:raw UserTF.Fonts}
    </
select></td>
      </
tr>
    </
table>
    <
br>
    <
table width="100%">
      <
tr>
        <
td width="50%"><label for="sel_nlp_usertextformatting_fontsize">
{
vb:rawphrase nlp_usertextformatting_fontsize}</label></td>
        <
td width="50%"><select onchange="nlp_usertextformatting('set');" name="nlp_usertextformatting_fontsize" id="sel_nlp_usertextformatting_fontsize">
        <
option value="-1">{vb:rawphrase use_forum_default}</option>
        {
vb:raw UserTF.Size}
    </
select></td>
      </
tr>
    </
table>
    <
br>
    <
table width="100%">
      <
tr>
        <
td width="50%"><label for="sel_nlp_usertextformatting_fontcolor">{vb:rawphrase nlp_usertextformatting_fontcolor}</label></td>
        <
td width="50%"><select 
          
<vb:if condition="$GLOBALS['vbulletin']->usertextformatting['font'] != -1">style="background-color: {vb:raw usertextformatting.color};"</vb:if> onchange="nlp_usertextformatting('color');" name="nlp_usertextformatting_fontcolor" id="sel_nlp_usertextformatting_fontcolor">
        <
option value="-1" style="background-color: white;">{vb:rawphrase use_forum_default}</option>
         {
vb:raw UserTF.Colors}
    </
select></td>
      </
tr>
    </
table>
    
    <
br>
    <
table width="100%">
      <
tr>
        <
td width="49%"><label for="sel_nlp_usertextformatting_fontweight">
          <
input onChange="nlp_usertextformatting('set');" onClick="nlp_usertextformatting('set');" type="checkbox" name="nlp_usertextformatting_fontweight" value="1" id="sel_nlp_usertextformatting_fontweight" {vb:raw usertf.weight} />
        {
vb:rawphrase nlp_usertextformatting_fontweight} </label>
          <
br>
    <
label for="sel_nlp_usertextformatting_italic" style="font-style: italic">
    <
input onChange="nlp_usertextformatting('set');" onClick="nlp_usertextformatting('set');" type="checkbox" name="nlp_usertextformatting_italic" value="1" id="sel_nlp_usertextformatting_italic" {vb:raw usertf.italic} />
    {
vb:rawphrase nlp_usertextformatting_italic} </label></td>
        <
td width="51%"><class="description">&nbsp;</p>
    <!-- 
start -->

    <
class="description" align="center" id="sel_nlp_usertextformatting_preveiw" style="<vb:if condition="$GLOBALS['vbulletin']->usertextformatting['font'] != -1">font-family: {vb:raw usertextformatting.font};</vb:if><vb:if condition="$GLOBALS['vbulletin']->usertextformatting['color'] != -1">color: {vb:raw usertextformatting.color};</vb:if><vb:if condition="$GLOBALS['vbulletin']->usertextformatting['weight'] == 'bold'">font-weight: bold<vb:else />font-weight: normal</vb:if>">
        <
font id="sel_nlp_usertextformatting_preveiw_size" <vb:if condition="$GLOBALS['vbulletin']->usertextformatting['size'] != -1">size="{vb:raw usertextformatting.size}"</vb:if>>{vb:rawphrase nlp_usertextformatting_preveiw}</font>    </p></td>
      </
tr>
    </
table>
    
    
    
    
    
    <
br><br>

<
div align="left">
  <
input type="button" class="button" onclick="javascript:nlp_usertextformatting('reset');" value="{vb:rawphrase nlp_usertextformatting_reset}" />
      </
div>
</
fieldset



All times are GMT. The time now is 04:06 AM.

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.01993 seconds
  • Memory Usage 1,818KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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