News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How to disallow big font size?

Started by Prosoi, September 12, 2008, 02:52:58 AM

Previous topic - Next topic

Prosoi

Hi! Please help me, I want to forbid users use BIG and very small font size.
Only need to forbid 36pt, 24pt, 18pt and 7pt, 6pt.
Thanks!

P.s.:
Yeah, I know about my English, sorry...

Prosoi

Yeah! I found an answer by myself, anyway thanks!

GenericControl.template.php string 53:


<option value="" selected="selected">', $txt['font_size'], '</option>
',
//<option value="1">8pt</option>
'<option value="2">10pt</option>
<option value="3">12pt</option>
<option value="4">14pt</option>
',
/*<option value="5">18pt</option>
<option value="6">24pt</option>
<option value="7">36pt</option>*/
'</select>';


Subs.php (string 1421):


array(
'tag' => 'size',
'type' => 'unparsed_equals',
'test' => '([2-4][\d]?p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?|(0\.[2-4]|[2-4](\.[\d])?)?em)\]',
'before' => '<span style="font-size: $1;" class="bbc_size">',
'after' => '</span>',
'disallow_children' => array('size'),
),
array(
'tag' => 'size',
'type' => 'unparsed_equals',
'test' => '[2-4]\]',
'before' => '<font size="$1" class="bbc_size">',
'after' => '</font>',
),

karlbenson

Thankyou for returning and posting with the solution.

Unfortunately it is very rare that a user does this.
Hopefully any users searching / finds this topic later will find it of use.

We appreciate it :)

Advertisement: