diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-05-25 19:19:31 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-05-25 19:19:31 +0000 |
commit | 59971466d7818daae2dfe8d6cef369909bc1deec (patch) | |
tree | ad39b33f9d9f61958a89adf78171943a3c67027c /phpBB/includes/bbcode.php | |
parent | 0c8eb878e37a299066ed4557ba1c4c888303b315 (diff) | |
download | forums-59971466d7818daae2dfe8d6cef369909bc1deec.tar forums-59971466d7818daae2dfe8d6cef369909bc1deec.tar.gz forums-59971466d7818daae2dfe8d6cef369909bc1deec.tar.bz2 forums-59971466d7818daae2dfe8d6cef369909bc1deec.tar.xz forums-59971466d7818daae2dfe8d6cef369909bc1deec.zip |
Added: width / height parameters to flash
Fixed: ol closing tag
Screwed-up: ol opening tag - will check that later
git-svn-id: file:///svn/phpbb/trunk@4060 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r-- | phpBB/includes/bbcode.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 1de7462768..922cdc3484 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -229,13 +229,13 @@ class bbcode if ($user->data['user_viewflash']) { $this->bbcode_cache[$bbcode_id] = array('preg' => array( - '#\[flash:$uid\](.*?)\[/flash:$uid\]#' => $this->bbcode_tpl('flash', $bbcode_id) + '#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => $this->bbcode_tpl('flash', $bbcode_id) )); } else { $this->bbcode_cache[$bbcode_id] = array('preg' => array( - '#\[flash:$uid\](.*?)\[/flash:$uid\]#' => str_replace('\\2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id)) + '#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => str_replace('\\1', '\\3', str_replace('\\2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id))) )); } break; @@ -254,7 +254,7 @@ class bbcode } } - function bbcode_tpl($tpl_name, $bbcode_id = 0) + function bbcode_tpl($tpl_name, $bbcode_id = -1) { static $bbcode_hardtpl = array( 'b_open' => '<span style="font-weight: bold">', @@ -268,7 +268,7 @@ class bbcode 'size' => '<span style="font-size: \1px; line-height: normal">\2</span>', 'color' => '<span style="color: \1">\2</span>', 'olist_open' => '<ol style="list-style-type:{LIST_TYPE}">', - 'olist_close' => '</ol', + 'olist_close' => '</ol>', 'ulist_open' => '<ul>', 'ulist_close' => '</ul>', 'listitem' => '<li>', @@ -280,7 +280,7 @@ class bbcode // DEBUG - nothing but [quote] and [list] is templated. // Note that [quote] and [code] templates MUST be defined, there is no hardcoded equivalent $user->theme['bbcode_bitfield'] = bindec('100000001'); - if ($bbcode_id && !($user->theme['bbcode_bitfield'] & pow(2, $bbcode_id))) + if ($bbcode_id != -1 && !($user->theme['bbcode_bitfield'] & pow(2, $bbcode_id))) { return $bbcode_hardtpl[$tpl_name]; } @@ -321,7 +321,7 @@ $user->theme['bbcode_bitfield'] = bindec('100000001'); 'color' => array('{COLOR}' => '\\1', 'TEXT' => '\\2'), 'size' => array('{SIZE}' => '\\1', 'TEXT' => '\\2'), 'img' => array('{URL}' => '\\1'), - 'flash' => array('{URL}' => '\\1'), + 'flash' => array('{WIDTH}' => '\\1', '{HEIGHT}' => '\\2', '{URL}' => '\\3'), 'url' => array('{URL}' => '\\1', '{DESCRIPTION}' => '\\2'), 'email' => array('{EMAIL}' => '\\1', '{DESCRIPTION}' => '\\2') ); @@ -374,7 +374,7 @@ $user->theme['bbcode_bitfield'] = bindec('100000001'); $start = 1; } - return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl('list_open')); + return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl('olist_open')); } function bbcode_second_pass_code($type, $code) |