News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[SIZE] is important

Started by bgroins, March 30, 2010, 12:33:55 PM

Previous topic - Next topic

bgroins

Hey guys, I'm sure this is a quick fix but here goes...

When using the
Quote[SIZE]
tag, how do I change it to not require "pt" after the number.  Since upgrading to 2 RC3, a lot of my old posts are now showing the SIZE tag if it wasn't originally set with PT.

Thanks for all of your hard work and support!
BG

CapadY

I think this have to do with teh use of a newer HTML standard which requires the px notation.
Maybay you can solve something with censured words ?
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

bgroins

I'm going to chalk this up as a nobody really knows I guess.

Matthew K.

#3
Here you are.

./Sources/Subs.php
Code (Find) Select

array(
'tag' => 'size',
'type' => 'unparsed_equals',
'test' => '([1-9][\d]?p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?|(0\.[1-9]|[1-9](\.[\d])?)?em)\]',
'before' => '<span style="font-size: $1;" class="bbc_size">',
'after' => '</span>',
'disallow_children' => array('size'),
),
array(
'tag' => 'size',
'type' => 'unparsed_equals',
'test' => '[1-7]\]',
'before' => '<span style="font-size: $1;" class="bbc_size">',
'after' => '</span>',
'validate' => create_function('&$tag, &$data, $disabled', '
$sizes = array(1 => 0.7, 2 => 1.0, 3 => 1.35, 4 => 1.45, 5 => 2.0, 6 => 2.65, 7 => 3.95);
$data = $sizes[$data] . \'em\';'
),
),

Code (Replace) Select

array(
'tag' => 'size',
'type' => 'unparsed_equals',
'test' => '([1-9][\d]?p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?|(0\.[1-9]|[1-9](\.[\d])?)?em)\]',
'before' => '<span style="font-size: $1pt;" class="bbc_size">',
'after' => '</span>',
'disallow_children' => array('size'),
),
array(
'tag' => 'size',
'type' => 'unparsed_equals',
'test' => '[1-7]\]',
'before' => '<span style="font-size: $1pt;" class="bbc_size">',
'after' => '</span>',
'validate' => create_function('&$tag, &$data, $disabled', '
$sizes = array(1 => 0.7, 2 => 1.0, 3 => 1.35, 4 => 1.45, 5 => 2.0, 6 => 2.65, 7 => 3.95);
$data = $sizes[$data] . \'em\';'
),
),


Should work for you.
Labradoodle-360

Arantor

Quote from: bgroins on March 30, 2010, 04:33:12 PM
I'm going to chalk this up as a nobody really knows I guess.

First up, complaining that no-one answered you barely 4 hours after you posted isn't going to win you any supporters.

You have posts with sizes. Are they size 1 through 7, or something else. The above change may or may not actually solve your problem because if they are 1-7, it's supposed to use a different branch of code anyway...

bgroins

Quote from: Labradoodle-360 on March 30, 2010, 05:04:31 PM
Here you are.

Labradoodle - Thank you very much sir.  I enjoy many of your mods as well.

I wasn't complaining.  I didn't think anyone really knew.

Antechinus


JBlaze

*insert "that's what she said..." joke here*
Jason Clemons
Former Team Member 2009 - 2012

Advertisement: