From 0ddd1310ab360d9d8fa72fd497f61ca849c25724 Mon Sep 17 00:00:00 2001
From: CaMer0n <cameron@e107coders.org>
Date: Wed, 11 May 2011 11:54:18 +0000
Subject: [PATCH] More TinyMce bbcode work.

---
 .../tinymce/plugins/e107bbcode/editor_plugin.js       | 11 +++++++++--
 e107_plugins/tinymce/tinymce_setup.php                |  4 ++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js b/e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js
index e6afed8ff..2797937ff 100644
--- a/e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js
+++ b/e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js
@@ -43,11 +43,18 @@
 				s = s.replace(re, str);
 			};
 			
+		//	rep(/<td>([\s\S]*?)<\/td>/gim,"[td]$1[/td]\n"); // verified
+		//	rep(/<tr>([\s\S]*?)<\/tr>/gim,"[tr]$1[/tr]\n"); // verified
+		//	rep(/<table>([\s\S]*?)<\/table>/gim,"[table]$1[/table]\n"); // verified
+			
+			
+			
+			return s;
 			
 			rep(/<div style="text-align: center;">([\s\S]*)<\/div>/gi,"[center]$1[/center]"); // verified
 			
 			
-			rep(/<li>/gi,"*"); // verified
+			rep(/<li>/gi,"[*]"); // verified
 			rep(/<\/li>/gi,""); // verified
 			rep(/<ul>([\s\S]*?)<\/ul>/gim,"[list]$1[/list]\n"); // verified
 			rep(/<ol .* style=\'list-style-type:\s*([\w]*).*\'>([\s\S]*)<\/ol>/gim,"[list=$1]$2[/list]\n"); // verified
@@ -118,7 +125,7 @@
 			
 			rep(/(\[list=.*\])\\*([\s\S]*)(\[\/list])/gim,"<ol>$2</ol>"); // verified
 			rep(/(\[list\])\\*([\s\S]*)(\[\/list])/gim,"<ul>$2</ul>");// verified
-			rep(/^ *?\*(.*)/gim,"<li>$1</li>"); 
+			rep(/^ *?\[\*\](.*)/gim,"<li>$1</li>"); 
 			rep(/\[center\]([\s\S]*)\[\/center\]/gi,"<div style=\"text-align:center\">$1</div>"); // verified
 			rep(/\[color=(.*?)\]([\s\S]*)\[\/color\]/gi,"<span style=\"color: $1;\">$2<\/span>"); // verified
 			
diff --git a/e107_plugins/tinymce/tinymce_setup.php b/e107_plugins/tinymce/tinymce_setup.php
index 4d0248495..31691f728 100644
--- a/e107_plugins/tinymce/tinymce_setup.php
+++ b/e107_plugins/tinymce/tinymce_setup.php
@@ -33,8 +33,8 @@ class tinymce_setup
 		`tinymce_id`, `tinymce_name`, `tinymce_userclass`, `tinymce_plugins`, `tinymce_buttons1`, `tinymce_buttons2`, `tinymce_buttons3`, `tinymce_buttons4`, `tinymce_custom`, `tinymce_prefs`) VALUES 
 		(1, 'Simple Users', '252', 'e107bbcode,emoticons', 'bold, italic, underline, undo, redo, link, unlink, image, forecolor, bullist, numlist, outdent, indent, emoticons', '', '', '', '', ''),
 		(2, 'Members', '253', 'e107bbcode,emoticons,table', 'bold, italic, underline, undo, redo, link, unlink, image, forecolor, removeformat, table, bullist, numlist, outdent, indent, emoticons', '', '', '', '', ''),
-		(3, 'Administrators', '254', 'contextmenu,e107bbcode,emoticons,ibrowser,iespell,paste,table,xhtmlxtras', 'bold, italic, underline, undo, redo, link, unlink, image, forecolor, removeformat, table, bullist, numlist, outdent, indent, cleanup, code, emoticons', '', '', '', '', ''),
-		(4, 'Main Admin', '250', 'advhr,advlink,autoresize,compat2x,contextmenu,directionality,emoticons,ibrowser,paste,table,visualchars,wordcount,xhtmlxtras,zoom', 'bold, italic, underline, undo, redo, link, unlink, ibrowser, forecolor, removeformat, table, bullist, numlist, outdent, indent, cleanup, code, emoticons', '', '', '', '', ''
+		(3, 'Administrators', '254', 'e107bbcode,contextmenu,emoticons,ibrowser,iespell,paste,table,xhtmlxtras', 'bold, italic, underline, undo, redo, link, unlink, image, forecolor, removeformat, table, bullist, numlist, outdent, indent, cleanup, code, emoticons', '', '', '', '', ''),
+		(4, 'Main Admin', '250', 'e107bbcode,advhr,advlink,autoresize,contextmenu,directionality,emoticons,ibrowser,paste,table,visualchars,wordcount,xhtmlxtras,zoom', 'bold, italic, underline, undo, redo, link, unlink, ibrowser, forecolor, removeformat, table, bullist, numlist, outdent, indent, cleanup, code, emoticons', '', '', '', '', ''
 		);";
 		
 		if($sql->db_Select_gen($query))