For edit it's almost the same:
File editpost.php
Before
PHP Code:
if (sizeof($errors) > 0)
Add
PHP Code:
// PostSizeHack
// Make sure user does not user too large fonts
$pattern = "/\[size=0*[6-9]\].*\[\/size\]/si"; // Check for SIZE=[0]6-9
$pattern2 = "/\[size=\+0*[5-9]\].*\[\/size\]/si"; // Check for SIZE=+[0]5-9
$pattern3 = "/\[size=\+*0*[1-9][0-9]+\].*\[\/size\]/si"; // Check for SIZE=[+][0]10-xxxxx
if (preg_match($pattern, $edit['message']) or
preg_match($pattern2, $edit['message']) or
preg_match($pattern3, $edit['message'])) {
$post['preview'] = 1;
eval('$errors[] = "Font size too large - max is 5";');
}
// PostSizeHack
@Link14716: I think i'll make a more "advanced" version with CP-configurable size (instead of hard-coded) and then post it there maybe