From 43b877caa1381c2ac8a031751acd2dab3ec739f0 Mon Sep 17 00:00:00 2001 From: Einer von Vielen Date: Tue, 13 Jan 2015 00:06:44 +0100 Subject: Test ...with table of content. jquery.tableofconent.js works bunt not properly --- include/bbcode.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 030a1fb49..441c4cc5c 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -575,6 +575,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { if (strpos($Text,'[h6]') !== false) { $Text = preg_replace("(\[h6\](.*?)\[\/h6\])ism",'
$1
',$Text); } + // Check for h6 + if (strpos($Text,'[toc]') !== false) { + $Text = preg_replace("/\[toc\]/ism",'',$Text); + } // Check for centered text if (strpos($Text,'[/center]') !== false) { $Text = preg_replace("(\[center\](.*?)\[\/center\])ism","
$1
",$Text); -- cgit v1.2.3 From 09129cbe5f7e8cb331b68469b74438464960af0b Mon Sep 17 00:00:00 2001 From: Date: Wed, 14 Jan 2015 22:47:54 +0100 Subject: Added a table of content as bbcode element [toc] for webpages - Included jquery.toc.js (http://www.apache.org/licenses/LICENSE-2.0) - Modified jquery.toc.js to work with the webpages of the red#matrix - Added info to the help --- include/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 441c4cc5c..33017c011 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -575,7 +575,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { if (strpos($Text,'[h6]') !== false) { $Text = preg_replace("(\[h6\](.*?)\[\/h6\])ism",'
$1
',$Text); } - // Check for h6 + // Check for table of content if (strpos($Text,'[toc]') !== false) { $Text = preg_replace("/\[toc\]/ism",'',$Text); } -- cgit v1.2.3