From eda1d40861fb5a2b74e7e5ade618cc9fa83cafd1 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Mon, 28 Jul 2008 14:24:37 +0000 Subject: Okay. Frozen, we never said anything about it being permafrost. Also, this is not 100% tested, expect troubel with store_db (I'm waiting for the bug reports) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8697 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index ef73762582..fd8fadf3a7 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -134,10 +134,21 @@ class bbcode { $this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']); $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html'; - + if (!@file_exists($this->template_filename)) { - trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR); + if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) + { + $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html'; + if (!@file_exists($this->template_filename)) + { + trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR); + } + } + else + { + trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR); + } } } -- cgit v1.2.1 From 20b08e296186e8ae812a0928d387bb01468af846 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 19 Sep 2008 16:40:24 +0000 Subject: support tabs in code selections (Bug #25445). Still does not solve the strange "4 spaces prefixed on every line" problem in firefox. :/ git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8893 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index fd8fadf3a7..09830ac97e 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -581,10 +581,10 @@ class bbcode // no break; default: - $code = str_replace("\t", '   ', $code); +/* $code = str_replace("\t", '   ', $code); $code = str_replace(' ', '  ', $code); $code = str_replace(' ', '  ', $code); - +*/ // remove newline at the beginning if (!empty($code) && $code[0] == "\n") { -- cgit v1.2.1 From 0a98003d91113336cf095c634447d4c14968cebc Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 28 Sep 2008 17:08:09 +0000 Subject: revert r8893 - there were massive problems with the display and select all code git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8953 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 09830ac97e..fd8fadf3a7 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -581,10 +581,10 @@ class bbcode // no break; default: -/* $code = str_replace("\t", '   ', $code); + $code = str_replace("\t", '   ', $code); $code = str_replace(' ', '  ', $code); $code = str_replace(' ', '  ', $code); -*/ + // remove newline at the beginning if (!empty($code) && $code[0] == "\n") { -- cgit v1.2.1 From a7be268aa64b9542cf3be2dccd7163091dc8cbc6 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 17 Apr 2009 15:23:17 +0000 Subject: change arabic-numbers list-style-type to correct type decimal (Bug #30775) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9461 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index fd8fadf3a7..562488db70 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -134,7 +134,7 @@ class bbcode { $this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']); $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html'; - + if (!@file_exists($this->template_filename)) { if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) @@ -410,7 +410,7 @@ class bbcode if (empty($bbcode_hardtpl)) { global $user; - + $bbcode_hardtpl = array( 'b_open' => '', 'b_close' => '', @@ -528,12 +528,12 @@ class bbcode else if (is_numeric($type)) { $tpl = 'olist_open'; - $type = 'arabic-numbers'; + $type = 'decimal'; } else { $tpl = 'olist_open'; - $type = 'arabic-numbers'; + $type = 'decimal'; } return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl)); -- cgit v1.2.1 From bd516916b8c627917e9be17cc81e37d56421eb66 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 7 Jul 2009 11:41:07 +0000 Subject: Color bbcode now supports three-digit hex notation. (Bug #39965 - Patch by leviatan21) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9722 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 562488db70..693523dcbb 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -265,7 +265,7 @@ class bbcode case 6: $this->bbcode_cache[$bbcode_id] = array( 'preg' => array( - '!\[color=(#[0-9a-f]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!is' => $this->bbcode_tpl('color', $bbcode_id), + '!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!is' => $this->bbcode_tpl('color', $bbcode_id), ) ); break; -- cgit v1.2.1 From 697fd5a134bde47006f57b6dd8df4e2dec6a7f3d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Sep 2009 08:11:52 +0000 Subject: Fix #51285 and more issues with template inherence on set_custom_template Conflict introduced with r9839 and r9823 Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10150 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 693523dcbb..f58852c00b 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -128,7 +128,7 @@ class bbcode */ function bbcode_cache_init() { - global $user, $phpbb_root_path; + global $phpbb_root_path, $template, $user; if (empty($this->template_filename)) { @@ -137,7 +137,7 @@ class bbcode if (!@file_exists($this->template_filename)) { - if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) + if (isset($template->orig_tpl_inherits_id) && $template->orig_tpl_inherits_id) { $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html'; if (!@file_exists($this->template_filename)) -- cgit v1.2.1 From 6b99b85c8f2f366d8e5e3e2855d77b0832d141d7 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 21 Feb 2010 01:31:10 +0000 Subject: BBCode parser now uses the user object for all settings rather than taking some from the template object [Bug #57365] git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10515 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index f58852c00b..e41053d936 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -137,7 +137,7 @@ class bbcode if (!@file_exists($this->template_filename)) { - if (isset($template->orig_tpl_inherits_id) && $template->orig_tpl_inherits_id) + if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) { $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html'; if (!@file_exists($this->template_filename)) -- cgit v1.2.1 From 22621e043963dca078580eaf61b45c5022ca79e1 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Sun, 21 Feb 2010 11:33:29 +0000 Subject: Enter stage left: the INTTEXT token git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10516 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/bbcode.php') diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index e41053d936..d77bb3c4a7 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -360,7 +360,7 @@ class bbcode // In order to use templates with custom bbcodes we need // to replace all {VARS} to corresponding backreferences // Note that backreferences are numbered from bbcode_match - if (preg_match_all('/\{(URL|LOCAL_URL|EMAIL|TEXT|SIMPLETEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m)) + if (preg_match_all('/\{(URL|LOCAL_URL|EMAIL|TEXT|SIMPLETEXT|INTTEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m)) { foreach ($m[0] as $i => $tok) { -- cgit v1.2.1