1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 20:40:24 +02:00

Another one bites the dust :D

- Nicer way of cleaning junk in PM export
- Added various signature and posting controls :P


git-svn-id: file:///svn/phpbb/trunk@5583 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2006-02-25 05:46:52 +00:00
parent 73a2c56104
commit f95e730adf
6 changed files with 81 additions and 7 deletions

View File

@@ -155,11 +155,18 @@ class bbcode_firstpass extends bbcode
function bbcode_size($stx, $in)
{
global $user, $config;
if (!$this->check_bbcode('size', $in))
{
return '';
}
if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx)
{
$this->warn_msg[] = sprintf($user->lang['MAX_FONT_SIZE_EXCEEDED'], $config['max_' . $this->mode . '_font_size']);
}
return '[size=' . $stx . ':' . $this->bbcode_uid . ']' . $in . '[/size:' . $this->bbcode_uid . ']';
}
@@ -205,11 +212,26 @@ class bbcode_firstpass extends bbcode
function bbcode_img($in)
{
global $user, $config;
if (!$this->check_bbcode('img', $in))
{
return '';
}
if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
{
$stats = getimagesize($in);
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $stats[1])
{
$this->warn_msg[] = sprintf($user->lang['MAX_IMG_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
}
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $stats[0])
{
$this->warn_msg[] = sprintf($user->lang['MAX_IMG_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
}
}
return '[img:' . $this->bbcode_uid . ']' . $in . '[/img:' . $this->bbcode_uid . ']';
}
@@ -689,6 +711,8 @@ class parse_message extends bbcode_firstpass
var $allow_flash_bbcode = true;
var $allow_quote_bbcode = true;
var $mode;
// Init - give message here or manually
function parse_message($message = '')
{
@@ -708,6 +732,8 @@ class parse_message extends bbcode_firstpass
$mode = ($mode != 'post') ? 'sig' : 'post';
$this->mode = $mode;
$this->allow_img_bbcode = $allow_img_bbcode;
$this->allow_flash_bbcode = $allow_flash_bbcode;
$this->allow_quote_bbcode = $allow_quote_bbcode;