Index: /extensions/bbcode_bar/admin.php
===================================================================
--- /extensions/bbcode_bar/admin.php	(revision 9964)
+++ /extensions/bbcode_bar/admin.php	(revision 9965)
@@ -4,5 +4,13 @@
 global $conf, $template;
 load_language('plugin.lang', BBcode_PATH);
-$conf_bbcode_bar = explode("," , $conf['bbcode_bar']);
+
+// Met à jour la configuration si necessaire
+if (strpos($conf['bbcode_bar'],',') !== false)
+{
+	include(BBcode_PATH .'maintain.inc.php');
+	plugin_activate();
+}
+
+$conf_bbcode_bar = unserialize($conf['bbcode_bar']);
 
 // Enregistrement de la configuration
@@ -11,14 +19,12 @@
 	// nouveau tableau de config
 	unset($conf_bbcode_bar);
-	for ($i=0; $i<=15; $i++) {
-		$conf_bbcode_bar[] = (isset($_POST['chkb'.sprintf("%02d", $i)])) ? $_POST['chkb'.sprintf("%02d", $i)] : 0;
+	foreach(unserialize(BBcode_codes) as $key) {
+		$conf_bbcode_bar[$key] = (isset($_POST[$key])) ? true : false;
 	}
-	$conf_bbcode_bar[] = (isset($_POST['text17'])) ? rtrim($_POST['text17'],'/') : 'plugins/bbcode_bar/icon';
 	
 	// enregistrement
-    $new_value_bbcode_bar = implode ("," , $conf_bbcode_bar);
-    $query = 'UPDATE ' . CONFIG_TABLE . '
-		SET value="' . $new_value_bbcode_bar . '"
-		WHERE param="bbcode_bar"';
+    $query = "UPDATE " . CONFIG_TABLE . "
+		SET value='" . serialize($conf_bbcode_bar) . "'
+		WHERE param='bbcode_bar'";
     pwg_query($query);
     array_push($page['infos'], l10n('Information data registered in database'));
@@ -26,8 +32,7 @@
 
 // Parametrage du template
-for ($i=0; $i<=15; $i++) {
-	$template->assign('CHKB'.sprintf("%02d", $i).'_STATUS', ($conf_bbcode_bar[$i] == 1) ? 'checked="checked"' : null);
+foreach(unserialize(BBcode_codes) as $key) {
+	$template->assign(strtoupper($key).'_STATUS', ($conf_bbcode_bar[$key] == 1) ? 'checked="checked"' : null);
 }
-$template->assign('TEXT17_STATUS', $conf_bbcode_bar[16]);
 
 $template->assign('BBCODE_PATH', BBcode_PATH);
Index: /extensions/bbcode_bar/bbcode_bar.inc.php
===================================================================
--- /extensions/bbcode_bar/bbcode_bar.inc.php	(revision 9964)
+++ /extensions/bbcode_bar/bbcode_bar.inc.php	(revision 9965)
@@ -6,30 +6,31 @@
 	global $template, $conf, $lang, $user, $pwg_loaded_plugins, $page;
 	load_language('plugin.lang', dirname(__FILE__) . '/');
-	$conf_bbcode_bar = explode("," , $conf['bbcode_bar']);
+	$conf_bbcode_bar = unserialize($conf['bbcode_bar']);
 
 	// buttons
-	for ($i=0; $i<=15; $i++) {
-		if ($conf_bbcode_bar[$i] == 1) $template->assign('BBCode_bar_button_'.sprintf("%02d", $i), true);
-	}
-	$template->assign('repicon', $conf_bbcode_bar[16]);
+	foreach(unserialize(BBcode_codes) as $key) {
+		if ($conf_bbcode_bar[$key]) $template->assign('BBC_'.$key, true);
+	}
 	
 	// edit field has different id
-	if (
-		(isset($_GET['action']) AND $_GET['action'] == 'edit_comment') 
-		OR (isset($page['body_id']) AND $page['body_id'] == 'theCommentsPage')
-	) {
-		$template->assign('form_name', 'editComment');
-	} else {
-		$template->assign('form_name', 'addComment');
-	}
-
-	// smilies support
-	if (isset($pwg_loaded_plugins['SmiliesSupport'])) {
-		$template->assign('BBCode_bar_SmiliesSupport', array('SMILIESSUPPORT_PAGE' => SmiliesTable()));
-	}
+	// if (
+		// (isset($_GET['action']) AND $_GET['action'] == 'edit_comment') 
+		// OR (isset($page['body_id']) AND $page['body_id'] == 'theCommentsPage')
+	// ) {
+		// $template->assign('form_name', 'editComment');
+	// } else {
+		// $template->assign('form_name', 'addComment');
+	// }
+	$template->assign('form_name', 'addComment');
 
 	$template->assign('BBCODE_PATH', BBcode_PATH);
 	$template->set_filename('bbcode_bar', dirname(__FILE__).'/template/bbcode_bar.tpl');
-	$lang['Comment'] .= $template->parse('bbcode_bar', true);			
+	$template->parse('bbcode_bar', true);		
+
+	// smilies support ## must be parsed avec bbcode_bar, because the javascript must be after bbc's one
+	if (isset($pwg_loaded_plugins['SmiliesSupport']))
+	{
+		set_smiliessupport();
+	}	
 }
 
@@ -38,6 +39,4 @@
 function CheckTags($str)
 {
-	//array of known tags
-	$known = array('p','b','i','u','s','center','right','ol','ul','li','quote', 'img','url','email','color', 'size');
 	//storage stack
 	$tags = array();
@@ -53,5 +52,5 @@
 			$tag = substr($tag, 0, $equal_pos);
 			//check whether we have a defined tag or not.
-			if (in_array(strtolower($tag),$known) || in_array(strtolower(substr($tag,1)),$known))
+			if (in_array(strtolower($tag),unserialize(BBcode_codes)) || in_array(strtolower(substr($tag,1)),unserialize(BBcode_codes)))
 			{
 				//closing tag
@@ -94,5 +93,5 @@
 	global $conf;
 
-	$conf_bbcode_bar = explode("," , $conf['bbcode_bar']);
+	$conf_bbcode_bar = unserialize($conf['bbcode_bar']);
 	$str = CheckTags(nl2br($str));
 
@@ -100,5 +99,5 @@
 	$replacements = array();
 
-	if ( $conf_bbcode_bar[0] == 1 )
+	if ($conf_bbcode_bar['p'])
 	{
 		//Paragraph
@@ -106,17 +105,17 @@
 		$replacements[] = '<p>\\1</p>';
 	}
-	if ( $conf_bbcode_bar[1] == 1 )
+	if ($conf_bbcode_bar['b'])
 	{
 		// Bold
 		$patterns[] = '#\[b\](.*?)\[/b\]#is';
-		$replacements[] = '<strong>\\1</strong>';
-	}
-	if ( $conf_bbcode_bar[2] == 1 )
+		$replacements[] = '<b>\\1</b>';
+	}
+	if ($conf_bbcode_bar['i'])
 	{
 		//Italic
 		$patterns[] = '#\[i\](.*?)\[/i\]#is';
-		$replacements[] = '<em>\\1</em>';
-	}
-	if ( $conf_bbcode_bar[3] == 1 )
+		$replacements[] = '<i>\\1</i>';
+	}
+	if ($conf_bbcode_bar['u'])
 	{
 		//Underline	
@@ -124,11 +123,11 @@
 		$replacements[] = '<u>\\1</u>';
 	}
-	if ( $conf_bbcode_bar[4] == 1 )
+	if ($conf_bbcode_bar['s'])
 	{
 		//Strikethrough
 		$patterns[] = '#\[s\](.*?)\[/s\]#is';
-		$replacements[] = '<del>\\1</del>';
-	}
-	if ( $conf_bbcode_bar[5] == 1 )
+		$replacements[] = '<s>\\1</s>';
+	}
+	if ($conf_bbcode_bar['center'])
 	{
 		//Center
@@ -136,5 +135,5 @@
 		$replacements[] = '<div align="center"><p>\\1</p></div>';
 	}
-	if ( $conf_bbcode_bar[6] == 1 )
+	if ($conf_bbcode_bar['right'])
 	{
 		//Right
@@ -142,5 +141,5 @@
 		$replacements[] = '<div align="right"><p>\\1</p></div>';
 	}
-	if ( $conf_bbcode_bar[7] == 1 )
+	if ($conf_bbcode_bar['ol'])
 	{
 		//Olist
@@ -148,5 +147,5 @@
 		$replacements[] = '<ol>\\1</ol>';
 	}
-	if ( $conf_bbcode_bar[8] == 1 )
+	if ($conf_bbcode_bar['ul'])
 	{
 		//Ulist
@@ -154,5 +153,5 @@
 		$replacements[] = '<ul>\\1</ul>';
 	}
-	if (( $conf_bbcode_bar[7] == 1 ) || ( $conf_bbcode_bar[8] == 1 ))
+	if ($conf_bbcode_bar['ol'] || $conf_bbcode_bar['ul'])
 	{
 		//List
@@ -160,19 +159,19 @@
 		$replacements[] = '<li>\\1</li>';
 	}
-	if ( $conf_bbcode_bar[9] == 1 )
+	if ($conf_bbcode_bar['quote'])
 	{
 		// Quotes
 		$patterns[] = "#\[quote\](.*?)\[/quote\]#is";
-		$replacements[] = '<blockquote><span style="font-size: 11px; line-height: normal">\\1</span></blockquote>';
+		$replacements[] = '<blockquote><span style="font-size:11px;line-height:normal">\\1</span></blockquote>';
 
 		//Quotes with "user"
 		$patterns[] = "#\[quote=&quot;(.*?)&quot;\](.*?)\[/quote\]#is";
-		$replacements[] = '<blockquote><span style="font-size: 11px; line-height: normal"><b>\\1 : </b><br/>\\2</span></blockquote>';
+		$replacements[] = '<blockquote><span style="font-size:11px;line-height:normal"><b>\\1 : </b><br/>\\2</span></blockquote>';
 
 		//Quotes with user
 		$patterns[] = "#\[quote=(.*?)\](.*?)\[/quote\]#is";
-		$replacements[] = '<blockquote><span style="font-size: 11px; line-height: normal"><b>\\1 : </b><br/>\\2</span></blockquote>';
-	}
-	if ( $conf_bbcode_bar[10] == 1 )
+		$replacements[] = '<blockquote><span style="font-size:11px;line-height:normal"><b>\\1 : </b><br/>\\2</span></blockquote>';
+	}
+	if ($conf_bbcode_bar['img'])
 	{
 		//Images
@@ -180,5 +179,5 @@
 		$replacements[] = '<img src="\\1" />';
 	}
-	if ( $conf_bbcode_bar[11] == 1 )
+	if ($conf_bbcode_bar['url'])
 	{
 		//[url]xxxx://www.zzzz.yyy[/url]
@@ -194,9 +193,9 @@
 		$replacements[] = '<a href="\\1" target="_blank">\\2</a>'; 
 
-		// [url=www.zzzzz.yyy]zZzZz[/url]
+		//[url=www.zzzzz.yyy]zZzZz[/url]
 		$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is"; 
 		$replacements[] = '<a href="http://\\1" target="_blank">\\2</a>'; 
 
-		// [url="www.zzzzz.yyy"]zZzZz[/url]
+		//[url="www.zzzzz.yyy"]zZzZz[/url]
 		$patterns[] = "#\[url=&quot;((www|ftp)\.[^ \n\r\t<]*?)&quot;\](.*?)\[/url\]#is";
 		$replacements[] = '<a href="http://\\1" target="_blank">\\3</a>';
@@ -206,5 +205,5 @@
 		$replacements[] = '<a href="\\1" target="_blank">\\2</a>';
 	}
-	if ( $conf_bbcode_bar[12] == 1 )
+	if ($conf_bbcode_bar['email'])
 	{
 		//[email]samvure@gmail.com[/email]
@@ -212,5 +211,5 @@
 		$replacements[] = '<a href="mailto:\\1">\\1</a>';
 	}
-	if ( $conf_bbcode_bar[13] == 1 )
+	if ($conf_bbcode_bar['size'])
 	{
 		//Size
@@ -218,5 +217,5 @@
 		$replacements[] = '<span style="font-size: \\1px; line-height: normal">\\2</span>';
 	}
-	if ( $conf_bbcode_bar[14] == 1 )
+	if ($conf_bbcode_bar['color'])
 	{
 		//Colours
Index: /extensions/bbcode_bar/language/cs_CZ/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/cs_CZ/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/cs_CZ/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help'] 		= "Jednoduchý seznam : [ul][li]element[/li][/ul]";
 	$lang['ol_help'] 		= "Číslovaný seznam: [ol][li]element[/li][/ol]";
+	$lang['li_help'] 		= "List element : [li]element[/li]";
 	
 	$lang['quote_help'] 	= "Citace : [quote]citát[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge'] 			= "Obří";	
 	
-	$lang['fc_help'] 		= "Barva písma : [color=color]text[/color]";
-	$lang['default_help']	= "Defaultní";
-	$lang['maroon_help'] 	= "Tmavě červená";		
+	$lang['color_help'] 		= "Barva písma : [color=color]text[/color]";	
 	$lang['red_help'] 		= "Červená";			
 	$lang['orange_help'] 	= "Oranžová";	 	
-	$lang['brown_help'] 	= "Hnědá";
 	$lang['yellow_help'] 	= "Žlutá";	 	
 	$lang['green_help'] 	= "Zelená"; 	
-	$lang['olive_help'] 	= "Olivová";	 	
-	$lang['cyan_help'] 		= "Azurová";
 	$lang['blue_help'] 		= "Modrá";	
-	$lang['darkblue_help']	= "Tmavá modrá";
-	$lang['indigo_help'] 	= "Indigo";
-	$lang['violet_help'] 	= "Fialková";
+	$lang['purple_help'] 	= "Fialková";
 	$lang['white_help'] 	= "Bílá";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help'] 	= "Černá";
-	
-	$lang['help']			= "Nejjednodušeji: formátování může být aplikováno jen na označený text.";
-	
-	$lang['repicon']		= "Složka ikon.";
 
 ?>
Index: /extensions/bbcode_bar/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/de_DE/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/de_DE/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help'] 		= "Un-nummerierte Liste : [ul][li]Element[/li][/ul]";
 	$lang['ol_help'] 		= "Nummerierte Liste : [ol][li]Element[/li][/ol]";
+	$lang['li_help'] 		= "List element : [li]element[/li]";
 	
 	$lang['quote_help'] 	= "Zitat : [quote]Zitat[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge'] 			= "Riesig";	
 	
-	$lang['fc_help'] 		= "Textfarbe : [color=farbe]Text[/color]";
-	$lang['default_help']	= "Standard";
-	$lang['maroon_help'] 	= "Dunkelrot";		
+	$lang['color_help'] 		= "Textfarbe : [color=farbe]Text[/color]";	
 	$lang['red_help'] 		= "Rot";			
 	$lang['orange_help'] 	= "Orange";	 	
-	$lang['brown_help'] 	= "Braun";
 	$lang['yellow_help'] 	= "Gelb";	 	
 	$lang['green_help'] 	= "Grün"; 	
-	$lang['olive_help'] 	= "Olive";	 	
-	$lang['cyan_help'] 		= "Cyan";
 	$lang['blue_help'] 		= "Blau";	
-	$lang['darkblue_help']	= "Dunkelblau";
-	$lang['indigo_help'] 	= "Indigo";
-	$lang['violet_help'] 	= "Violett";
+	$lang['purple_help'] 	= "Violett";
 	$lang['white_help'] 	= "Weiß";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help'] 	= "Schwarz";
-		
-	$lang['help']			= "Ein Kniff: Das Format kann dem ausgewählten Text zugewiesen werden.";
-	
-	$lang['repicon']		= "Iconverzeichnis.";
 
 ?>
Index: /extensions/bbcode_bar/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/en_UK/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/en_UK/plugin.lang.php	(revision 9965)
@@ -5,13 +5,14 @@
 	$lang['i_help'] 		= "Italic : [i]italic[/i]";
 	$lang['u_help'] 		= "Underline : [u]underline[/u]";	
-	$lang['s_help'] 		= "Striped  : [s]striped [/s]";
+	$lang['s_help'] 		= "Striped  : [s]striped[/s]";
 	
 	$lang['center_help'] 	= "Center : [center]center[/center]";
 	$lang['right_help'] 	= "Right : [right]right[/right]";
-	$lang['ul_help'] 		= "Unordered List : [ul][li]element[/li][/ul]";
-	$lang['ol_help'] 		= "Ordered List : [ol][li]element[/li][/ol]";
+	$lang['ul_help'] 		= "Unordered list : [ul][li]element[/li][/ul]";
+	$lang['ol_help'] 		= "Ordered list : [ol][li]element[/li][/ol]";
+	$lang['li_help'] 		= "List element : [li]element[/li]";
 	
 	$lang['quote_help'] 	= "Quote : [quote]quote[/quote]";
-	$lang['img_help'] 		= "Img : [img]img[/img]";
+	$lang['img_help'] 		= "Picture : [img]picture[/img]";
 	$lang['url_help'] 		= "URL : [url=URL]Title[/url]";
 	$lang['mail_help'] 		= "E-mail : [email]Email[/email]";	
@@ -24,24 +25,14 @@
 	$lang['huge'] 			= "Huge";	
 	
-	$lang['fc_help'] 		= "Font color : [color=color]text[/color]";
-	$lang['default_help']	= "Default";
-	$lang['maroon_help'] 	= "Maroon";		
+	$lang['color_help'] 	= "Font color : [color=color]text[/color]";
 	$lang['red_help'] 		= "Red";			
 	$lang['orange_help'] 	= "Orange";	 	
-	$lang['brown_help'] 	= "Brown";
 	$lang['yellow_help'] 	= "Yellow";	 	
 	$lang['green_help'] 	= "Green"; 	
-	$lang['olive_help'] 	= "Olive";	 	
-	$lang['cyan_help'] 		= "Cyan";
 	$lang['blue_help'] 		= "Blue";	
-	$lang['darkblue_help']	= "Dark Blue";
-	$lang['indigo_help'] 	= "Indigo";
-	$lang['violet_help'] 	= "Violet";
+	$lang['purple_help'] 	= "Purple";
 	$lang['white_help'] 	= "White";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help'] 	= "Black";
-	
-	$lang['help']			= "Easy way: A formatting can be applied to the selected text.";
-	
-	$lang['repicon']		= "Icons directory.";
 
 ?>
Index: /extensions/bbcode_bar/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/es_ES/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/es_ES/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help']      = "Lista : [ul][li]elemento[/li][/ul]";
 	$lang['ol_help']      = "Lista Numerada : [ol][li]elemento[/li][/ol]";
+	$lang['li_help'] 	  = "List element : [li]element[/li]";
 
 	$lang['quote_help']   = "Citada : [quote]Citación[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge']         = "Muy grande";
 
-	$lang['fc_help']      = "Color de los carácteres  : [color=color]texto[/color]";
-	$lang['default_help'] = "Defecto";
-	$lang['maroon_help']  = "Rojo oscuro";
+	$lang['color_help']      = "Color de los carácteres  : [color=color]texto[/color]";
 	$lang['red_help']     = "Rojo";
 	$lang['orange_help']  = "Naranja";
-	$lang['brown_help']   = "Castaño";
 	$lang['yellow_help']  = "amarillo";
 	$lang['green_help']   = "Verde";
-	$lang['olive_help']   = "Aceituna";
-	$lang['cyan_help']    = "Cian";
 	$lang['blue_help']    = "Azul";
-	$lang['darkblue_help']= "Azul oscuro";
-	$lang['indigo_help']  = "Índigo";
-	$lang['violet_help']  = "Morado";
+	$lang['purple_help']  = "Morado";
 	$lang['white_help']   = "Blanco";
+	$lang['grey_help'] 	  = "Grey";
 	$lang['black_help']   = "Negro";
 
-	$lang['help']         = "Astucia: un formato puede ser aplicado sobre el texto seleccionado.";
-
-	$lang['repicon']      = "Repertorio de los iconos.";
-
 ?>
Index: /extensions/bbcode_bar/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/fr_FR/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/fr_FR/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help'] 		= "Liste : [ul][li]élément[/li][/ul]";
 	$lang['ol_help'] 		= "Liste Numéroté : [ol][li]élément[/li][/ol]";
+	$lang['li_help'] 		= "Element de liste : [li]élément[/li]";
 	
 	$lang['quote_help'] 	= "Citation : [quote]Citation[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge'] 			= "Très grand";	
 	
-	$lang['fc_help'] 		= "Couleur des caractères  : [color=couleur]texte[/color]";
-	$lang['default_help']	= "Défaut";
-	$lang['maroon_help'] 	= "Rouge foncé";		
+	$lang['color_help'] 	= "Couleur : [color=couleur]texte[/color]";	
 	$lang['red_help'] 		= "Rouge";			
 	$lang['orange_help'] 	= "Orange";	 	
-	$lang['brown_help'] 	= "Marron";
 	$lang['yellow_help'] 	= "Jaune";	 	
 	$lang['green_help'] 	= "Vert"; 	
-	$lang['olive_help'] 	= "Olive";	 	
-	$lang['cyan_help'] 		= "Cyan";
 	$lang['blue_help'] 		= "Bleu";	
-	$lang['darkblue_help']	= "Bleu Foncé";
-	$lang['indigo_help'] 	= "Indigo";
-	$lang['violet_help'] 	= "Violet";
+	$lang['purple_help'] 	= "Violet";
 	$lang['white_help'] 	= "Blanc";
+	$lang['grey_help'] 		= "Gris";
 	$lang['black_help'] 	= "Noir";
-		
-	$lang['help']			= "Astuce : Une mise en forme peut être appliquée au texte sélectionné.";
-	
-	$lang['repicon']		= "Répertoire des icônes.";
   
 ?>
Index: /extensions/bbcode_bar/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/hu_HU/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/hu_HU/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help'] 		= "Számozatlan lista : [ul][li]elem[/li][/ul]";
 	$lang['ol_help'] 		= "Számozott lista : [ol][li]elem[/li][/ol]";
+	$lang['li_help'] 		= "List element : [li]element[/li]";
 	
 	$lang['quote_help'] 	= "Idézet : [quote]idézett szöveg[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge'] 			= "Nagy";	
 	
-	$lang['fc_help'] 		= "Betűszín : [color=szín]betű színe[/color]";
-	$lang['default_help']	= "Alapértelmezett";
-	$lang['maroon_help'] 	= "Gesztenyebarna";		
+	$lang['color_help'] 	= "Betűszín : [color=szín]betű színe[/color]";	
 	$lang['red_help'] 		= "Piros";			
 	$lang['orange_help'] 	= "Narancssárga";	 	
-	$lang['brown_help'] 	= "Barna";
 	$lang['yellow_help'] 	= "Sárga";	 	
 	$lang['green_help'] 	= "Zöld"; 	
-	$lang['olive_help'] 	= "Olajzöld";	 	
-	$lang['cyan_help'] 		= "Ciánkék";
 	$lang['blue_help'] 		= "Kék";	
-	$lang['darkblue_help']	= "Sötétkék";
-	$lang['indigo_help'] 	= "Indigó";
-	$lang['violet_help'] 	= "Ibolya";
+	$lang['purple_help'] 	= "Ibolya";
 	$lang['white_help'] 	= "Fehér";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help'] 	= "Fekete";
-		
-	$lang['help']			= "Automatikus használat: A kód a kijelölt szövegre alkalmazható.";
-	
-	$lang['repicon']		= "Ikon könyvtár.";
   
 ?>
Index: /extensions/bbcode_bar/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/it_IT/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/it_IT/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help'] 		= "Elenco : [ul][li]elemento[/li][/ul]";
 	$lang['ol_help'] 		= "Elenco Numerica : [ol][li]elemento[/li][/ol]";
+	$lang['li_help'] 		= "List element : [li]element[/li]";
 	
 	$lang['quote_help'] 	= "Citazione : [quote]citazione[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge'] 			= "Grandissimo";	
 	
-	$lang['fc_help'] 		= "Colore del testo  : [color=couleur]testo[/color]";
-	$lang['default_help']	= "Default";
-	$lang['maroon_help'] 	= "Rosso scuro";		
+	$lang['color_help'] 		= "Colore del testo  : [color=couleur]testo[/color]";	
 	$lang['red_help'] 		= "Rosso";			
 	$lang['orange_help'] 	= "Arancione";	 	
-	$lang['brown_help'] 	= "Marrone";
 	$lang['yellow_help'] 	= "Giallo";	 	
 	$lang['green_help'] 	= "Verde"; 	
-	$lang['olive_help'] 	= "Oliva";	 	
-	$lang['cyan_help'] 		= "Ciano";
 	$lang['blue_help'] 		= "Blu";	
-	$lang['darkblue_help']	= "Blu Scuro";
-	$lang['indigo_help'] 	= "Indaco";
-	$lang['violet_help'] 	= "Viola";
+	$lang['purple_help'] 	= "Viola";
 	$lang['white_help'] 	= "Bianco";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help'] 	= "Nero";
-	
-	$lang['help']			= "Trucco : Un formattaggio può essere applicato ad un testo selezionato.";
-	
-	$lang['repicon']		= "Directory delle icone";
 
 ?>
Index: /extensions/bbcode_bar/language/lv_LV/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/lv_LV/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/lv_LV/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help']         = "Nesakārtots saraksts : [ul][li]element[/li][/ul]";
 	$lang['ol_help']         = "Sakārtots Saraksts : [ol][li]element[/li][/ol]";
+	$lang['li_help'] 		= "List element : [li]element[/li]";
 
 	$lang['quote_help']     = "Pēdiņas : [quote]quote[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge']         = "Milzīgs";
 
-	$lang['fc_help']     = "Fonta krāsa : [color=color]text[/color]";
-	$lang['default_help']    = "Pēc noklusējuma";
-	$lang['maroon_help']     = "Kastaņbrūna";
+	$lang['color_help']     = "Fonta krāsa : [color=color]text[/color]";
 	$lang['red_help']         = "Sarkana";
 	$lang['orange_help']     = "Oranža";
-	$lang['brown_help']     = "Brūna";
 	$lang['yellow_help']     = "Dzeltena";
 	$lang['green_help']     = "Zaļa";
-	$lang['olive_help']     = "Olīva";
-	$lang['cyan_help']         = "Ciāna";
 	$lang['blue_help']         = "Zila";
-	$lang['darkblue_help']    = "Tumši Zila";
-	$lang['indigo_help']     = "Indigo";
-	$lang['violet_help']     = "Violēta";
+	$lang['purple_help']     = "Violēta";
 	$lang['white_help']     = "Balta";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help']     = "Melna";
 
-	$lang['help']            = "Pavisam viegli: Formatējumu iespējams pielietot tieši izvēlētajam tekstam.";
-	
-	$lang['repicon']        = "Ikonu mape.";
-
 ?>
Index: /extensions/bbcode_bar/language/no_NO/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/no_NO/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/no_NO/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help']         = "Uordnet Liste : [ul][li]element[/li][/ul]";
 	$lang['ol_help']         = "Ordnet Liste : [ol][li]element[/li][/ol]";
+	$lang['li_help'] 		= "List element : [li]element[/li]";
 
 	$lang['quote_help']     = "Spørring : [quote]spørring[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge']         = "Mega";
 
-	$lang['fc_help']     = "Font farge : [color=color]tekst[/color]";
-	$lang['default_help']    = "Standard";
-	$lang['maroon_help']     = "Maroon";
+	$lang['color_help']     = "Font farge : [color=color]tekst[/color]";
 	$lang['red_help']         = "Rød";
 	$lang['orange_help']     = "Orange";
-	$lang['brown_help']     = "Brun";
 	$lang['yellow_help']     = "Gul";
 	$lang['green_help']     = "Grønn";
-	$lang['olive_help']     = "Oliven";
-	$lang['cyan_help']         = "Cyan";
 	$lang['blue_help']         = "Blå";
-	$lang['darkblue_help']    = "Mørk Blå";
-	$lang['indigo_help']     = "Indigo";
-	$lang['violet_help']     = "Fiolett";
+	$lang['purple_help']     = "Fiolett";
 	$lang['white_help']     = "Vit";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help']     = "Svart";
 
-	$lang['help']            = "Enkel måte: En formatering kan gjøres på den valgte teksten.";
-
-	$lang['repicon']        = "Ikon mappe.";
-
 ?>
Index: /extensions/bbcode_bar/language/ru_RU/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/ru_RU/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/ru_RU/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help'] 		= "Список ненумерованный: [ul][li]элемент[/li][/ul]";
 	$lang['ol_help'] 		= "Список нумерованный: [ol][li]элемент[/li][/ol]";
+	$lang['li_help'] 		= "List element : [li]element[/li]";
 	
 	$lang['quote_help'] 	= "Цитата: [quote]цитата[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge'] 			= "Громадный";	
 	
-	$lang['fc_help'] 		= "Цвет шрифта : [color=color]текст[/color]";
-	$lang['default_help']	= "По умолчанию";
-	$lang['maroon_help'] 	= "Бордовый";		
+	$lang['color_help'] 	= "Цвет шрифта : [color=color]текст[/color]";	
 	$lang['red_help'] 		= "Красный";			
 	$lang['orange_help'] 	= "Оранжевый";	 	
-	$lang['brown_help'] 	= "Коричневый";
 	$lang['yellow_help'] 	= "Желтый";	 	
 	$lang['green_help'] 	= "Зеленый"; 	
-	$lang['olive_help'] 	= "Оливковый";	 	
-	$lang['cyan_help'] 		= "Небесно голубой";
 	$lang['blue_help'] 		= "Голубой";	
-	$lang['darkblue_help']	= "Синий";
-	$lang['indigo_help'] 	= "Индиго";
-	$lang['violet_help'] 	= "Фиолетовый";
+	$lang['purple_help'] 	= "Фиолетовый";
 	$lang['white_help'] 	= "Белый";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help'] 	= "Черный";
-	
-	$lang['help']			= "Легко: Форматирование может быть применено к выбранному тексту.";
-	
-	$lang['repicon']		= "Директория с иконками";
   
 ?>
Index: /extensions/bbcode_bar/language/sk_SK/plugin.lang.php
===================================================================
--- /extensions/bbcode_bar/language/sk_SK/plugin.lang.php	(revision 9964)
+++ /extensions/bbcode_bar/language/sk_SK/plugin.lang.php	(revision 9965)
@@ -11,4 +11,5 @@
 	$lang['ul_help'] = "Nezoradený zoznam : [ul][li]element[/li][/ul]";
 	$lang['ol_help'] = "Zoradený zoznam : [ol][li]element[/li][/ol]";
+	$lang['li_help'] = "List element : [li]element[/li]";
 		
 	$lang['quote_help'] = "Citácia : [quote]Citácia[/quote]";
@@ -24,24 +25,14 @@
 	$lang['huge'] = "Najväčšie";    
 		
-	$lang['fc_help'] 	= "Farba písma : [color=couleur]text[/color]";
-	$lang['default_help']    = "Predvolená";
-	$lang['maroon_help']     = "Gaštanovo hnedá";       
+	$lang['color_help'] 	= "Farba písma : [color=couleur]text[/color]";   
 	$lang['red_help']         = "Červená";           
 	$lang['orange_help']     = "Oranžová";         
-	$lang['brown_help']     = "Hnedá";
 	$lang['yellow_help']     = "Žltá";         
 	$lang['green_help']      = "Zelená";     
-	$lang['olive_help']             = "Olivová";         
-	$lang['cyan_help']         = "Zelenomodrá";
 	$lang['blue_help']         = "Modrá";   
-	$lang['darkblue_help']    = "Dark Blue";
-	$lang['indigo_help']     = "InTmavomodrá";
-	$lang['violet_help']      = "Fialová";
+	$lang['purple_help']      = "Fialová";
 	$lang['white_help']      = "Biela";
+	$lang['grey_help'] 		= "Grey";
 	$lang['black_help']       = "Čierna";
-	   
-	$lang['help']            = "Ľahko: Formátovanie môže byť použité na označený text.";
-	   
-	$lang['repicon']        = "Adresár ikon.";
-
+	
 ?>
Index: /extensions/bbcode_bar/main.inc.php
===================================================================
--- /extensions/bbcode_bar/main.inc.php	(revision 9964)
+++ /extensions/bbcode_bar/main.inc.php	(revision 9965)
@@ -12,4 +12,5 @@
 define('BBcode_DIR' , basename(dirname(__FILE__)));
 define('BBcode_PATH' , PHPWG_PLUGINS_PATH . BBcode_DIR . '/');
+define('BBcode_codes', serialize(array('b','i','u','s','p','center','right','quote','ul','ol','img','url','email','size','color')));
 
 include_once(BBcode_PATH.'bbcode_bar.inc.php');
@@ -25,5 +26,6 @@
 function add_bbcode_bar() {
 	global $page;
-	if ($page['body_id'] == 'theCommentsPage' OR $page['body_id'] == 'thePicturePage') {
+	
+	if (isset($page['body_id']) AND $page['body_id'] == 'thePicturePage') {
 		set_bbcode_bar();
 	}
@@ -43,3 +45,4 @@
 }
 
+
 ?>
Index: /extensions/bbcode_bar/maintain.inc.php
===================================================================
--- /extensions/bbcode_bar/maintain.inc.php	(revision 9964)
+++ /extensions/bbcode_bar/maintain.inc.php	(revision 9965)
@@ -1,14 +1,64 @@
 <?php
-
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
 function plugin_install()
 {  
-	global $conf;
+	global $conf, $default;
+	
+	$BBcode_default = array(
+		'b' => true,
+		'i' => true,
+		'u' => true,
+		's' => true,
+		'p' => true,
+		'center' => true,
+		'right' => true,
+		'quote' => true,
+		'ul' => true,
+		'ol' => true,
+		'img' => true,
+		'url' => true,
+		'email' => true,
+		'size' => true,
+		'color' => true,
+	);
 
 	if (!isset($conf['bbcode_bar']))
 	{
-		$q = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
-			VALUES ("bbcode_bar","1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,plugins/bbcode_bar/icon","Parametres BBCode_bar");';
+		$q = "INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
+			VALUES ('bbcode_bar','" . serialize($BBcode_default) . "','Parametres BBCode Bar');";
+		pwg_query($q);
+	}
+}
+
+function plugin_activate()
+{
+	global $conf;
+	
+	if (strpos($conf['bbcode_bar'],',') !== false)
+	{
+		$conf_bbcode_bar = explode(',', $conf['bbcode_bar']);
+		
+		$new_bbcode_bar =  array(
+			'b' => $conf_bbcode_bar[1] == '1' ? true : false,
+			'i' => $conf_bbcode_bar[2] == '1' ? true : false,
+			'u' => $conf_bbcode_bar[3] == '1' ? true : false,
+			's' => $conf_bbcode_bar[4] == '1' ? true : false,
+			'p' => $conf_bbcode_bar[0] == '1' ? true : false,
+			'center' => $conf_bbcode_bar[5] == '1' ? true : false,
+			'right' => $conf_bbcode_bar[6] == '1' ? true : false,
+			'quote' => $conf_bbcode_bar[9] == '1' ? true : false,
+			'ul' => $conf_bbcode_bar[7] == '1' ? true : false,
+			'ol' => $conf_bbcode_bar[8] == '1' ? true : false,
+			'img' => $conf_bbcode_bar[10] == '1' ? true : false,
+			'url' => $conf_bbcode_bar[11] == '1' ? true : false,
+			'email' => $conf_bbcode_bar[12] == '1' ? true : false,
+			'size' => $conf_bbcode_bar[13] == '1' ? true : false,
+			'color' => $conf_bbcode_bar[14] == '1' ? true : false,
+		);
+		
+		$q = "UPDATE " . CONFIG_TABLE . "
+			SET value='" . serialize($new_bbcode_bar) . "'
+			WHERE param='bbcode_bar';";
 		pwg_query($q);
 	}
@@ -21,5 +71,5 @@
 	if (isset($conf['bbcode_bar']))
 	{
-		pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar" LIMIT 1;');
+		pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar";');
 	}
 }
Index: tensions/bbcode_bar/template/bbcode.js
===================================================================
--- /extensions/bbcode_bar/template/bbcode.js	(revision 9964)
+++ 	(revision )
@@ -1,117 +1,0 @@
-var bbcode = new Array();
-var theSelection = false;
-
-function BBCfs(form, field, box) { 
-	BBCwrite(form, field, "[size="+ box.value +"]", "[/size]", true); 
-	box.selectedIndex = 2;
-}
-function BBCfc(form, field, box) { 
-	BBCfont(form, field, "color", box); 
-	box.selectedIndex = 0;
-}
-
-function BBCfont(form, field, code, box) { 
-	BBCwrite(form, field, "["+code+"="+box.value+"]", "[/"+code+"]", true); 
-}
-
-function BBCwmi(form, field, type) {
-	if (type == 'img') { var URL = prompt("Please enter image URL","http://"); }
-	else { var URL = prompt("Enter the Email Address",""); }
-	if (URL == null) { return; }
-	if (!URL) { return alert("Error : You didn't write the Address"); }
-	BBCwrite(form, field, '', "["+type+"]"+URL+"[/"+type+"]", true);
-}
-
-function BBCcode(form, field, img) {
-	var code = img.name;
-	if (BBCwrite(form, field, "["+code+"]", "[/"+code+"]")) { return; }
-	if (bbcode[form+field+code] == null) {
-		ToAdd = "["+code+"]";
-		re = new RegExp(code+".(\\w+)$");
-		img.src = img.src.replace(re, code+"1.$1");
-		bbcode[form+field+code] = 1;
-	} else {
-		ToAdd = "[/"+code+"]";
-		re = new RegExp(code+"1.(\\w+)$");
-		img.src = img.src.replace(re, code+".$1");
-		bbcode[form+field+code] = null;
-	}
-	BBCwrite(form, field, '', ToAdd, true);
-}
-
-function BBClist(form, field, img) {
-	var code = img.name;
-	if (BBCwrite(form, field, "["+code+"]\n[li]", "\n[/"+code+"]")) { return; }
-	if (bbcode[form+field+code] == null) {
-		ToAdd = "["+code+"]\n[li]";
-		re = new RegExp(code+".(\\w+)$");
-		img.src = img.src.replace(re, code+"1.$1");
-		bbcode[form+field+code] = 1;
-	} else {
-		ToAdd = "[/li]\n[/"+code+"]\n";
-		re = new RegExp(code+"1.(\\w+)$");
-		img.src = img.src.replace(re, code+".$1");
-		bbcode[form+field+code] = null;
-	}
-	BBCwrite(form, field, '', ToAdd, true);
-}
-
-function BBCurl(form, field) {
-	var URL = prompt("Enter the URL", "http://");
-	if (URL == null) { return; }
-	if (!URL) { return alert("Error: You didn't write the URL "); }
-	if (BBCwrite(form, field, "[url="+URL+"]", "[/url]")) { return; }
-	var TITLE = prompt("Enter the page name", "Web Page Name");
-	if (TITLE == null) { return; }
-	var Add = "]"+URL;
-	if (TITLE) { Add = "="+URL+"]"+TITLE; }
-	BBCwrite(form, field, '', "[url"+Add+"[/url]", true);
-}
-
-function BBCwrite(form, field, start, end, force) {
-	var textarea = document.forms[form].elements[field];
-	
-	storeCaret(textarea);
-	
-	if (textarea.caretPos) {
-	  textarea.focus();
-		// Attempt to create a text range (IE).
-		theSelection = document.selection.createRange().text;
-		if (force || theSelection != '') {
-			document.selection.createRange().text = start + theSelection + end;
-			textarea.focus();
-			return true;
-		}
-	} else if (typeof(textarea.selectionStart) != "undefined") {
-		// Mozilla text range replace.
-		var text = new Array();
-		text[0] = textarea.value.substr(0, textarea.selectionStart);
-		text[1] = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd-textarea.selectionStart);
-		text[2] = textarea.value.substr(textarea.selectionEnd);
-		caretPos = textarea.selectionEnd+start.length+end.length;
-		if (force || text[1] != '') {
-			textarea.value = text[0]+start+text[1]+end+text[2];
-			if (textarea.setSelectionRange) {
-				textarea.focus();
-				textarea.setSelectionRange(caretPos, caretPos);
-			}
-			return true;
-		}
-	} else if (force) {		
-		// Just put it on the end.
-		textarea.value += start+end;
-		textarea.focus(textarea.value.length-1);
-		return true;
-	}
-	return false;
-}
-
-function storeCaret(text) {
-	if (text.createTextRange) text.caretPos = document.selection.createRange().duplicate();
-}
-
-function helpline ( form, field, text ) {
-  if ( typeof(document.forms[form].elements[field]) != "undefined") {
-	  document.forms[form].elements[field].value = text;
-  }
-}
Index: tensions/bbcode_bar/template/bbcode_bar.css
===================================================================
--- /extensions/bbcode_bar/template/bbcode_bar.css	(revision 9964)
+++ 	(revision )
@@ -1,29 +1,0 @@
-.outils {   
-  margin-left: 0pt;
-  margin-right: auto;
-  margin-top:-0.25em;
-}
-
-.bbcbutton {
-  background: buttonface;
-  border: 1px solid buttonface;
-  margin: 1;
-}
-
-.over {
-  background: buttonface;
-  border-top: 1px solid;
-  border-left: 1px solid;
-  border-bottom: 1px solid;
-  border-right: 1px solid;
-  margin: 1;
-}
-
-.genmed {
-	color:#000000;
-	background-color:#fff;
-}
-
-.helpline{
-	border:0pt solid;	
-}
Index: /extensions/bbcode_bar/template/bbcode_bar.tpl
===================================================================
--- /extensions/bbcode_bar/template/bbcode_bar.tpl	(revision 9964)
+++ /extensions/bbcode_bar/template/bbcode_bar.tpl	(revision 9965)
@@ -1,101 +1,69 @@
-{combine_script id="bbcodebar" path=$BBCODE_PATH|@cat:"template/bbcode.js"}
-{combine_css path=$BBCODE_PATH|@cat:"template/bbcode_bar.css"}
+{combine_script id="markitup" require='jquery' path=$BBCODE_PATH|@cat:"template/markitup/jquery.markitup.js"}
+{combine_css path=$BBCODE_PATH|@cat:"template/markitup/style.markitup.css"}
 
-<div id="outils" width="500pt">
-	<table class="outils">	
-		<tr>			
-			{if isset($BBCode_bar_button_00)}
-			<td><img class="bbcbutton" title="{'p_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'p_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="p" src="{$repicon}/p.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_01)}
-			<td><img class="bbcbutton" title="{'b_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'b_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="b" src="{$repicon}/b.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_02)}
-			<td><img class="bbcbutton" title="{'i_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'i_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="i" src="{$repicon}/i.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_03)}
-			<td><img class="bbcbutton" title="{'u_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'u_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="u" src="{$repicon}/u.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_04)}
-			<td><img class="bbcbutton" title="{'s_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'s_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="s" src="{$repicon}/s.png" border="0"></td>
-			{/if}
-			
-			{if isset($BBCode_bar_button_05) OR isset($BBCode_bar_button_06) OR isset($BBCode_bar_button_07) OR isset($BBCode_bar_button_08)}
-			<td> &nbsp; &nbsp; </td>
-			{/if}
-			
-			{if isset($BBCode_bar_button_05)}
-			<td><img class="bbcbutton" title="{'center_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'center_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="center" src="{$repicon}/center.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_06)}
-			<td><img class="bbcbutton" title="{'right_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'right_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="right" src="{$repicon}/right.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_07)}
-			<td><img class="bbcbutton" title="{'ul_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'ul_help'|@translate}')" onclick="BBClist('{$form_name}','content',this)" name="ul" src="{$repicon}/ul.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_08)}
-			<td><img class="bbcbutton" title="{'ol_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'ol_help'|@translate}')" onclick="BBClist('{$form_name}','content',this)" name="ol" src="{$repicon}/ol.png" border="0"></td>
-			{/if}
-			
-			{if isset($BBCode_bar_SmiliesSupport)}
-			<td> &nbsp; &nbsp; </td>
-			<td>{$BBCode_bar_SmiliesSupport.SMILIESSUPPORT_PAGE}</td>
-			{/if}
-			
-			{if isset($BBCode_bar_button_09) OR isset($BBCode_bar_button_10) OR isset($BBCode_bar_button_11) OR isset($BBCode_bar_button_12)}
-			<td> &nbsp; &nbsp; </td>
-			{/if}
-			
-			{if isset($BBCode_bar_button_09)}	
-			<td><img class="bbcbutton" title="{'quote_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'quote_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="quote" src="{$repicon}/quote.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_10)}
-			<td><img class="bbcbutton" title="{'img_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'img_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="img" src="{$repicon}/image.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_11)}
-			<td><img class="bbcbutton" title="{'url_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'url_help'|@translate}')" onclick="BBCurl('{$form_name}','content')" name="url" src="{$repicon}/link.png" border="0"></td>
-			{/if}
-			{if isset($BBCode_bar_button_12)}
-			<td><img class="bbcbutton" title="{'mail_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'mail_help'|@translate}')" onclick="BBCwmi('{$form_name}','content','email')" name="email" src="{$repicon}/mail.png" border="0"></td>
-			{/if}
-			
-			{if isset($BBCode_bar_button_13) OR isset($BBCode_bar_button_14)}
-			<td> &nbsp; &nbsp; </td>
-			{/if}
-			
-			{if isset($BBCode_bar_button_13)}
-			<td><select title="{'size_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'size_help'|@translate}')" onchange="BBCfs('{$form_name}','content',this)" title="{'size_help'|@translate}">
-				    <option class="genmed" value="7">{'tiny'|@translate}</option>
-					<option class="genmed" value="9">{'small'|@translate}</option>
-					<option class="genmed" value="12" selected="selected" >{'normal'|@translate}</option>
-					<option class="genmed" value="18">{'large'|@translate}</option>
-					<option class="genmed" value="24">{'huge'|@translate}</option>
-				</select>
-			</td>
-			{/if}
-			{if isset($BBCode_bar_button_14)}
-			<td><select title="{'fc_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'fc_help'|@translate}')" onchange="BBCfc('{$form_name}','content',this)" title="{'fc_help'|@translate}">
-				    <option class="genmed" value="" style="color: black;" selected="selected" >{'default_help'|@translate}</option>
-					<option class="genmed" value="maroon" style="color: maroon;">{'maroon_help'|@translate}</option>
-					<option class="genmed" value="red" style="color: red;">{'red_help'|@translate}</option>
-					<option class="genmed" value="orange" style="color: orange;">{'orange_help'|@translate}</option>
-					<option class="genmed" value="brown" style="color: brown;">{'brown_help'|@translate}</option>
-					<option class="genmed" value="yellow" style="color: yellow; background-color:inherit;">{'yellow_help'|@translate}</option>
-					<option class="genmed" value="green" style="color: green;">{'green_help'|@translate}</option>
-					<option class="genmed" value="olive" style="color: olive;">{'olive_help'|@translate}</option>
-					<option class="genmed" value="cyan" style="color: cyan;">{'cyan_help'|@translate}</option>
-					<option class="genmed" value="blue" style="color: blue;">{'blue_help'|@translate}</option>
-					<option class="genmed" value="darkblue" style="color: darkblue;">{'darkblue_help'|@translate}</option>
-					<option class="genmed" value="indigo" style="color: indigo;">{'indigo_help'|@translate}</option>
-					<option class="genmed" value="violet" style="color: violet;">{'violet_help'|@translate}</option>
-					<option class="genmed" value="white" style="color: white; background-color:inherit;">{'white_help'|@translate}</option>
-					<option class="genmed" value="black" style="color: black;">{'black_help'|@translate}</option>
-				</select>
-			</td>			
-			{/if}
-		</tr>
-	</table>
-	{if isset($BBCode_bar_button_15)}
-	<input class="helpline" type="text" value="{'help'|@translate}" maxlength="150" size="80" name="helpbox"/>
-	{/if}
-</div>
+{footer_script require='jquery'}
+BBCodeBar = {ldelim}
+	markupSet: [
+		{if isset($BBC_b)}{ldelim}name:'{'b_help'|@translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'markItUpBold'},{/if}
+		{if isset($BBC_i)}{ldelim}name:'{'i_help'|@translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'markItUpItalic'},{/if}
+		{if isset($BBC_u)}{ldelim}name:'{'u_help'|@translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'markItUpUnderline'},{/if}
+		{if isset($BBC_s)}{ldelim}name:'{'s_help'|@translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'markItUpStroke'},{/if}
+		
+		{if isset($BBC_p) OR isset($BBC_center) OR isset($BBC_right) OR isset($BBC_quote)}{ldelim}separator:'|'},{/if}
+		
+		{if isset($BBC_p)}{ldelim}name:'{'p_help'|@translate}', openWith:'[p]', closeWith:'[/p]', className:'markItUpParagraph'},{/if}
+		{if isset($BBC_center)}{ldelim}name:'{'center_help'|@translate}', openWith:'[center]', closeWith:'[/center]', className:'markItUpCenter'},{/if}
+		{if isset($BBC_right)}{ldelim}name:'{'right_help'|@translate}', openWith:'[right]', closeWith:'[/right]', className:'markItUpRight'},{/if}
+		{if isset($BBC_quote)}{ldelim}name:'{'quote_help'|@translate}', openWith:'[quote]', closeWith:'[/quote]', className:'markItUpQuote'},{/if}
+		
+		{if isset($BBC_ul) OR isset($BBC_ol) OR isset($BBC_li)}{ldelim}separator:'|'},{/if}
+		
+		{if isset($BBC_ul)}{ldelim}name:'{'ul_help'|@translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'markItUpListUL'},{/if}
+		{if isset($BBC_ol)}{ldelim}name:'{'ol_help'|@translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'markItUpListOL'},{/if}
+		{if isset($BBC_ul) OR isset($BBC_ol)}{ldelim}name:'{'li_help'|@translate}', openWith:'[li]', closeWith:'[/li]', className:'markItUpListLI'},{/if}
+		
+		{if isset($BBC_img) OR isset($BBC_url) OR isset($BBC_mail)}{ldelim}separator:'|' },{/if}
+		
+		{if isset($BBC_img)}{ldelim}name:'{'img_help'|@translate}', key:'P', replaceWith:'[img][![Url]!][/img]', className:'markItUpPicture'},{/if}
+		{if isset($BBC_url)}{ldelim}name:'{'url_help'|@translate}', key:'L', openWith:'[url=[![Url]!]]', closeWith:'[/url]', className:'markItUpLink'},{/if}
+		{if isset($BBC_email)}{ldelim}name:'{'mail_help'|@translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'markItUpMail'},{/if}
+		
+		{if isset($BBC_size) OR isset($BBC_color) OR isset($BBC_smilies)}{ldelim}separator:'|'},{/if}
+		
+		{if isset($BBC_size)}
+		{ldelim}name:'{'size_help'|@translate}', className:'markItUpSize',
+			dropMenu :[
+				{ldelim}name:'{'tiny'|@translate}', openWith:'[size=7]', closeWith:'[/size]' },
+				{ldelim}name:'{'small'|@translate}', openWith:'[size=9]', closeWith:'[/size]' },
+				{ldelim}name:'{'normal'|@translate}', openWith:'[size=12]', closeWith:'[/size]' },
+				{ldelim}name:'{'large'|@translate}', openWith:'[size=18]', closeWith:'[/size]' },
+				{ldelim}name:'{'huge'|@translate}', openWith:'[size=24]', closeWith:'[/size]' },
+			]
+		},
+		{/if}
+		{if isset($BBC_color)}
+		{ldelim}name:'{'color_help'|@translate}', className:'markItUpColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]', 
+			dropMenu: [
+				{ldelim}name:'{'yellow_help'|@translate}',	openWith:'[color=yellow]', 	closeWith:'[/color]', className:"col1-1" },
+				{ldelim}name:'{'orange_help'|@translate}',	openWith:'[color=orange]', 	closeWith:'[/color]', className:"col1-2" },
+				{ldelim}name:'{'red_help'|@translate}', 	openWith:'[color=red]', 	closeWith:'[/color]', className:"col1-3" },
+				
+				{ldelim}name:'{'blue_help'|@translate}', 	openWith:'[color=blue]', 	closeWith:'[/color]', className:"col2-1" },
+				{ldelim}name:'{'purple_help'|@translate}', 	openWith:'[color=purple]', 	closeWith:'[/color]', className:"col2-2" },
+				{ldelim}name:'{'green_help'|@translate}', 	openWith:'[color=green]', 	closeWith:'[/color]', className:"col2-3" },
+				
+				{ldelim}name:'{'white_help'|@translate}', 	openWith:'[color=white]', 	closeWith:'[/color]', className:"col3-1" },
+				{ldelim}name:'{'grey_help'|@translate}', 	openWith:'[color=gray]', 	closeWith:'[/color]', className:"col3-2" },
+				{ldelim}name:'{'black_help'|@translate}',	openWith:'[color=black]', 	closeWith:'[/color]', className:"col3-3" }
+			]
+		},
+		{/if}
+	]
+};
+
+jQuery(document).ready(function() {ldelim}
+	jQuery('#{$form_name} textarea').markItUp(BBCodeBar);
+});
+{/footer_script}
+
+{$BBC_smilies}
Index: /extensions/bbcode_bar/template/bbcode_bar_admin.tpl
===================================================================
--- /extensions/bbcode_bar/template/bbcode_bar_admin.tpl	(revision 9964)
+++ /extensions/bbcode_bar/template/bbcode_bar_admin.tpl	(revision 9965)
@@ -1,3 +1,11 @@
-{combine_css path=$BBCODE_PATH|@cat:"template/bbcode_bar.css"}
+{html_head}
+{literal}
+	<style type="text/css">
+		form.properties span.property {
+			width:60%;
+		}
+	</style>
+{/literal}
+{/html_head}
 
 <div class="titrePage">
@@ -10,74 +18,66 @@
 		<ul>
 			<li>
-				<span class="property">{'p_help'|@translate}</span>
-				<input type="checkbox" name="chkb00" {$CHKB00_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/p.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/p1.png" border="0">
+				<label><span class="property">{'b_help'|@translate}</span>
+				<input type="checkbox" name="b" {$B_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/bold.png"></label>
 			</li>
 			<li>
-				<span class="property">{'b_help'|@translate}</span>
-				<input type="checkbox" name="chkb01" {$CHKB01_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/b.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/b1.png" border="0">
+				<label><span class="property">{'i_help'|@translate}</span>
+				<input type="checkbox" name="i" {$I_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/italic.png"></label>
 			</li>
 			<li>
-				<span class="property">{'i_help'|@translate}</span>
-				<input type="checkbox" name="chkb02" {$CHKB02_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/i.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/i1.png" border="0">
+				<label><span class="property">{'u_help'|@translate}</span>
+				<input type="checkbox" name="u" {$U_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/underline.png"></label>
+			</li>			
+			<li>
+				<label><span class="property">{'s_help'|@translate}</span>
+				<input type="checkbox" name="s" {$S_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/stroke.png"></label>
 			</li>
 			<li>
-				<span class="property">{'u_help'|@translate}</span>
-				<input type="checkbox" name="chkb03" {$CHKB03_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/u.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/u1.png" border="0">
-			</li>			
-			<li>
-				<span class="property">{'s_help'|@translate}</span>
-				<input type="checkbox" name="chkb04" {$CHKB04_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/s.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/s1.png" border="0">
+				<label><span class="property">{'p_help'|@translate}</span>
+				<input type="checkbox" name="p" {$P_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/p.png"></label>
 			</li>
 			<li>
-				<span class="property">{'center_help'|@translate}</span>
-				<input type="checkbox" name="chkb05" {$CHKB05_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/center.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/center1.png" border="0">
+				<label><span class="property">{'center_help'|@translate}</span>
+				<input type="checkbox" name="center" {$CENTER_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/center.png"></label>
 			</li>
 			<li>
-				<span class="property">{'right_help'|@translate}</span>
-				<input type="checkbox" name="chkb06" {$CHKB06_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/right.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/right1.png" border="0">
+				<label><span class="property">{'right_help'|@translate}</span>
+				<input type="checkbox" name="right" {$RIGHT_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/right.png"></label>
 			</li>
 			<li>
-				<span class="property">{'ul_help'|@translate}</span>
-				<input type="checkbox" name="chkb07" {$CHKB07_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/ul.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/ul1.png" border="0">
+				<label><span class="property">{'quote_help'|@translate}</span>
+				<input type="checkbox" name="quote" {$QUOTE_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/quote.png"></label>
 			</li>
 			<li>
-				<span class="property">{'ol_help'|@translate}</span>
-				<input type="checkbox" name="chkb08" {$CHKB08_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/ol.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/ol1.png" border="0">
+				<label><span class="property">{'ul_help'|@translate}</span>
+				<input type="checkbox" name="ul" {$UL_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/list-bullet.png"></label>
 			</li>
 			<li>
-				<span class="property">{'quote_help'|@translate}</span>
-				<input type="checkbox" name="chkb09" {$CHKB09_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/quote.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/quote1.png" border="0">
+				<label><span class="property">{'ol_help'|@translate}</span>
+				<input type="checkbox" name="ol" {$OL_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/list-numeric.png"></label>
 			</li>
 			<li>
-				<span class="property">{'img_help'|@translate}</span>
-				<input type="checkbox" name="chkb10" {$CHKB10_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/image.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/image1.png" border="0">
+				<label><span class="property">{'img_help'|@translate}</span>
+				<input type="checkbox" name="img" {$IMG_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/picture.png"></label>
 			</li>
 			<li>
-				<span class="property">{'url_help'|@translate}</span>
-				<input type="checkbox" name="chkb11" {$CHKB11_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/link.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/link1.png" border="0">
+				<label><span class="property">{'url_help'|@translate}</span>
+				<input type="checkbox" name="url" {$URL_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/link.png"></label>
 			</li>
 			<li>
-				<span class="property">{'mail_help'|@translate}</span>
-				<input type="checkbox" name="chkb12" {$CHKB12_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/mail.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/mail1.png" border="0">
+				<label><span class="property">{'mail_help'|@translate}</span>
+				<input type="checkbox" name="email" {$EMAIL_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/mail.png"></label>
 			</li>
 			<li>
-				<span class="property">{'size_help'|@translate}</span>
-				<input type="checkbox" name="chkb13" {$CHKB13_STATUS} value="1" />
+				<label><span class="property">{'size_help'|@translate}</span>
+				<input type="checkbox" name="size" {$SIZE_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/fonts.png"></label>
 			</li>
 			<li>
-				<span class="property">{'fc_help'|@translate}</span>
-				<input type="checkbox" name="chkb14" {$CHKB14_STATUS} value="1" />
-			</li>     
-			<li>
-				<span class="property">{'help'|@translate}</span>
-				<input type="checkbox" name="chkb15" {$CHKB15_STATUS} value="1" />
-			</li> 
-			<li>
-				<span class="property">{'repicon'|@translate}</span>
-				<input type="text" size="40" name="text17" value="{$TEXT17_STATUS}" />
+				<label><span class="property">{'color_help'|@translate}</span>
+				<input type="checkbox" name="color" {$COLOR_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/colors.png"></label>
 			</li>
 		</ul>
 	</fieldset>
 	
-	<p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /></p>
+	<p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"/></p>
 </form>
Index: /extensions/bbcode_bar/template/markitup/jquery.markitup.js
===================================================================
--- /extensions/bbcode_bar/template/markitup/jquery.markitup.js	(revision 9965)
+++ /extensions/bbcode_bar/template/markitup/jquery.markitup.js	(revision 9965)
@@ -0,0 +1,60 @@
+// ----------------------------------------------------------------------------
+// markItUp! Universal MarkUp Engine, JQuery plugin
+// v 1.1.x
+// Dual licensed under the MIT and GPL licenses.
+// ----------------------------------------------------------------------------
+// Copyright (C) 2007-2010 Jay Salvat
+// http://markitup.jaysalvat.com/
+// ----------------------------------------------------------------------------
+(function($){$.fn.markItUp=function(settings,extraSettings){var options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=false;options={id:'',nameSpace:'',root:'',previewInWindow:'',previewAutoRefresh:true,previewPosition:'after',previewTemplatePath:'~/templates/preview.html',previewParserPath:'',previewParserVar:'data',resizeHandle:true,beforeInsert:'',afterInsert:'',onEnter:{},onShiftEnter:{},onCtrlEnter:{},onTab:{},markupSet:[{}]};$.extend(options,settings,extraSettings);if(!options.root){$('script').each(function(a,tag){miuScript=$(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);if(miuScript!==null){options.root=miuScript[1];}});}
+return this.each(function(){var $$,textarea,levels,scrollPosition,caretPosition,caretOffset,clicked,hash,header,footer,previewWindow,template,iFrame,abort;$$=$(this);textarea=this;levels=[];abort=false;scrollPosition=caretPosition=0;caretOffset=-1;options.previewParserPath=localize(options.previewParserPath);options.previewTemplatePath=localize(options.previewTemplatePath);function localize(data,inText){if(inText){return data.replace(/("|')~\//g,"$1"+options.root);}
+return data.replace(/^~\//,options.root);}
+function init(){id='';nameSpace='';if(options.id){id='id="'+options.id+'"';}else if($$.attr("id")){id='id="markItUp'+($$.attr("id").substr(0,1).toUpperCase())+($$.attr("id").substr(1))+'"';}
+if(options.nameSpace){nameSpace='class="'+options.nameSpace+'"';}
+$$.wrap('<div '+nameSpace+'></div>');$$.wrap('<div '+id+' class="markItUp"></div>');$$.wrap('<div class="markItUpContainer"></div>');$$.addClass("markItUpEditor");header=$('<div class="markItUpHeader"></div>').insertBefore($$);$(dropMenus(options.markupSet)).appendTo(header);footer=$('<div class="markItUpFooter"></div>').insertAfter($$);if(options.resizeHandle===true&&$.browser.safari!==true){resizeHandle=$('<div class="markItUpResizeHandle"></div>').insertAfter($$).bind("mousedown",function(e){var h=$$.height(),y=e.clientY,mouseMove,mouseUp;mouseMove=function(e){$$.css("height",Math.max(20,e.clientY+h-y)+"px");return false;};mouseUp=function(e){$("html").unbind("mousemove",mouseMove).unbind("mouseup",mouseUp);return false;};$("html").bind("mousemove",mouseMove).bind("mouseup",mouseUp);});footer.append(resizeHandle);}
+$$.keydown(keyPressed).keyup(keyPressed);$$.bind("insertion",function(e,settings){if(settings.target!==false){get();}
+if(textarea===$.markItUp.focused){markup(settings);}});$$.focus(function(){$.markItUp.focused=this;});}
+function dropMenus(markupSet){var ul=$('<ul></ul>'),i=0;$('li:hover > ul',ul).css('display','block');$.each(markupSet,function(){var button=this,t='',title,li,j;title=(button.key)?(button.name||'')+' [Ctrl+'+button.key+']':(button.name||'');key=(button.key)?'accesskey="'+button.key+'"':'';if(button.separator){li=$('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);}else{i++;for(j=levels.length-1;j>=0;j--){t+=levels[j]+"-";}
+li=$('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>').bind("contextmenu",function(){return false;}).click(function(){return false;}).bind("focusin",function(){$$.focus();}).mousedown(function(){if(button.call){eval(button.call)();}
+setTimeout(function(){markup(button)},1);return false;}).hover(function(){$('> ul',this).show();$(document).one('click',function(){$('ul ul',header).hide();});},function(){$('> ul',this).hide();}).appendTo(ul);if(button.dropMenu){levels.push(i);$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));}}});levels.pop();return ul;}
+function magicMarkups(string){if(string){string=string.toString();string=string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,function(x,a){var b=a.split('|!|');if(altKey===true){return(b[1]!==undefined)?b[1]:b[0];}else{return(b[1]===undefined)?"":b[0];}});string=string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,function(x,a){var b=a.split(':!:');if(abort===true){return false;}
+value=prompt(b[0],(b[1])?b[1]:'');if(value===null){abort=true;}
+return value;});return string;}
+return"";}
+function prepare(action){if($.isFunction(action)){action=action(hash);}
+return magicMarkups(action);}
+function build(string){var openWith=prepare(clicked.openWith);var placeHolder=prepare(clicked.placeHolder);var replaceWith=prepare(clicked.replaceWith);var closeWith=prepare(clicked.closeWith);if(replaceWith!==""){block=openWith+replaceWith+closeWith;}else if(selection===''&&placeHolder!==''){block=openWith+placeHolder+closeWith;}else{string=string||selection;if(string.match(/ $/)){block=openWith+string.replace(/ $/,'')+closeWith+' ';}else{block=openWith+string+closeWith;}}
+return{block:block,openWith:openWith,replaceWith:replaceWith,placeHolder:placeHolder,closeWith:closeWith};}
+function markup(button){var len,j,n,i;hash=clicked=button;get();$.extend(hash,{line:"",root:options.root,textarea:textarea,selection:(selection||''),caretPosition:caretPosition,ctrlKey:ctrlKey,shiftKey:shiftKey,altKey:altKey});prepare(options.beforeInsert);prepare(clicked.beforeInsert);if(ctrlKey===true&&shiftKey===true){prepare(clicked.beforeMultiInsert);}
+$.extend(hash,{line:1});if(ctrlKey===true&&shiftKey===true){lines=selection.split(/\r?\n/);for(j=0,n=lines.length,i=0;i<n;i++){if($.trim(lines[i])!==''){$.extend(hash,{line:++j,selection:lines[i]});lines[i]=build(lines[i]).block;}else{lines[i]="";}}
+string={block:lines.join('\n')};start=caretPosition;len=string.block.length+(($.browser.opera)?n-1:0);}else if(ctrlKey===true){string=build(selection);start=caretPosition+string.openWith.length;len=string.block.length-string.openWith.length-string.closeWith.length;len=len-(string.block.match(/ $/)?1:0);len-=fixIeBug(string.block);}else if(shiftKey===true){string=build(selection);start=caretPosition;len=string.block.length;len-=fixIeBug(string.block);}else{string=build(selection);start=caretPosition+string.block.length;len=0;start-=fixIeBug(string.block);}
+if((selection===''&&string.replaceWith==='')){caretOffset+=fixOperaBug(string.block);start=caretPosition+string.openWith.length;len=string.block.length-string.openWith.length-string.closeWith.length;caretOffset=$$.val().substring(caretPosition,$$.val().length).length;caretOffset-=fixOperaBug($$.val().substring(0,caretPosition));}
+$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});if(string.block!==selection&&abort===false){insert(string.block);set(start,len);}else{caretOffset=-1;}
+get();$.extend(hash,{line:'',selection:selection});if(ctrlKey===true&&shiftKey===true){prepare(clicked.afterMultiInsert);}
+prepare(clicked.afterInsert);prepare(options.afterInsert);if(previewWindow&&options.previewAutoRefresh){refreshPreview();}
+shiftKey=altKey=ctrlKey=abort=false;}
+function fixOperaBug(string){if($.browser.opera){return string.length-string.replace(/\n*/g,'').length;}
+return 0;}
+function fixIeBug(string){if($.browser.msie){return string.length-string.replace(/\r/g,'').length;}
+return 0;}
+function insert(block){if(document.selection){var newSelection=document.selection.createRange();newSelection.text=block;}else{textarea.value=textarea.value.substring(0,caretPosition)+block+textarea.value.substring(caretPosition+selection.length,textarea.value.length);}}
+function set(start,len){if(textarea.createTextRange){if($.browser.opera&&$.browser.version>=9.5&&len==0){return false;}
+range=textarea.createTextRange();range.collapse(true);range.moveStart('character',start);range.moveEnd('character',len);range.select();}else if(textarea.setSelectionRange){textarea.setSelectionRange(start,start+len);}
+textarea.scrollTop=scrollPosition;textarea.focus();}
+function get(){textarea.focus();scrollPosition=textarea.scrollTop;if(document.selection){selection=document.selection;if($.browser.msie){var range=selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText(textarea);stored_range.setEndPoint('EndToEnd',range);var s=stored_range.text.length-range.text.length;caretPosition=s-(textarea.value.substr(0,s).length-textarea.value.substr(0,s).replace(/\r/g,'').length);selection=range.text;}else{caretPosition=textarea.selectionStart;}}else{caretPosition=textarea.selectionStart;selection=textarea.value.substring(caretPosition,textarea.selectionEnd);}
+return selection;}
+function preview(){if(!previewWindow||previewWindow.closed){if(options.previewInWindow){previewWindow=window.open('','preview',options.previewInWindow);$(window).unload(function(){previewWindow.close();});}else{iFrame=$('<iframe class="markItUpPreviewFrame"></iframe>');if(options.previewPosition=='after'){iFrame.insertAfter(footer);}else{iFrame.insertBefore(header);}
+previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1];}}else if(altKey===true){if(iFrame){iFrame.remove();}else{previewWindow.close();}
+previewWindow=iFrame=false;}
+if(!options.previewAutoRefresh){refreshPreview();}
+if(options.previewInWindow){previewWindow.focus();}}
+function refreshPreview(){renderPreview();}
+function renderPreview(){var phtml;if(options.previewParserPath!==''){$.ajax({type:'POST',dataType:'text',global:false,url:options.previewParserPath,data:options.previewParserVar+'='+encodeURIComponent($$.val()),success:function(data){writeInPreview(localize(data,1));}});}else{if(!template){$.ajax({url:options.previewTemplatePath,dataType:'text',global:false,success:function(data){writeInPreview(localize(data,1).replace(/<!-- content -->/g,$$.val()));}});}}
+return false;}
+function writeInPreview(data){if(previewWindow.document){try{sp=previewWindow.document.documentElement.scrollTop}catch(e){sp=0;}
+previewWindow.document.open();previewWindow.document.write(data);previewWindow.document.close();previewWindow.document.documentElement.scrollTop=sp;}}
+function keyPressed(e){shiftKey=e.shiftKey;altKey=e.altKey;ctrlKey=(!(e.altKey&&e.ctrlKey))?e.ctrlKey:false;if(e.type==='keydown'){if(ctrlKey===true){li=$("a[accesskey="+String.fromCharCode(e.keyCode)+"]",header).parent('li');if(li.length!==0){ctrlKey=false;setTimeout(function(){li.triggerHandler('mousedown');},1);return false;}}
+if(e.keyCode===13||e.keyCode===10){if(ctrlKey===true){ctrlKey=false;markup(options.onCtrlEnter);return options.onCtrlEnter.keepDefault;}else if(shiftKey===true){shiftKey=false;markup(options.onShiftEnter);return options.onShiftEnter.keepDefault;}else{markup(options.onEnter);return options.onEnter.keepDefault;}}
+if(e.keyCode===9){if(shiftKey==true||ctrlKey==true||altKey==true){return false;}
+if(caretOffset!==-1){get();caretOffset=$$.val().length-caretOffset;set(caretOffset,0);caretOffset=-1;return false;}else{markup(options.onTab);return options.onTab.keepDefault;}}}}
+init();});};$.fn.markItUpRemove=function(){return this.each(function(){var $$=$(this).unbind().removeClass('markItUpEditor');$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);});};$.markItUp=function(settings){var options={target:false};$.extend(options,settings);if(options.target){return $(options.target).each(function(){$(this).focus();$(this).trigger('insertion',[options]);});}else{$('textarea').trigger('insertion',[options]);}};})(jQuery);
Index: /extensions/bbcode_bar/template/markitup/style.markitup.css
===================================================================
--- /extensions/bbcode_bar/template/markitup/style.markitup.css	(revision 9965)
+++ /extensions/bbcode_bar/template/markitup/style.markitup.css	(revision 9965)
@@ -0,0 +1,184 @@
+/* common */
+.markItUp {
+	display:inline-block;
+}
+.markItUp * {
+	margin:0px; padding:0px;
+	outline:none;
+}
+.markItUp a:link,
+.markItUp a:visited {
+	color:#000;
+	text-decoration:none;
+}
+.markItUpContainer  {
+	font:11px Verdana, Arial, Helvetica, sans-serif;
+}
+.markItUpEditor {
+	font:12px 'Courier New', Courier, monospace;
+	padding:5px;
+	clear:both;
+	overflow:auto;
+}
+.markItUpFooter {
+	display:none;
+}
+
+/* first row of buttons */
+.markItUpHeader ul li	{
+	list-style:none;
+	float:left;
+	position:relative;
+}
+.markItUpHeader ul li:hover > ul{
+	display:block;
+}
+.markItUpHeader ul .markItUpDropMenu {
+	background:transparent url(images/menu.png) no-repeat 120% 50%;
+	margin-right:5px;
+}
+/* next rows of buttons */
+.markItUpHeader ul ul {
+	display:none;
+	position:absolute;
+	top:22px; left:0px;	
+	background:#FFF;
+	border:1px solid #444;
+	border-radius:5px;
+}
+.markItUpHeader ul ul li {
+	float:none;
+	margin:0px;
+}
+.markItUpHeader ul .markItUpSize li {
+	border-bottom:1px solid #444;
+	border-radius:2px;
+}
+.markItUpHeader ul .markItUpSeparator {
+	margin:2px 10px;
+	width:1px;
+	height:16px;
+	overflow:hidden;
+	background-color:#CCC;
+	color:#ccc;
+}
+/* links */
+.markItUpHeader ul a {
+	display:block;
+	width:16px; height:16px;
+	text-indent:-10000px;
+	background-position:center center;
+	background-repeat:no-repeat;
+	padding:2px;
+	border:1px solid transparent;
+}
+.markItUpHeader ul a:hover {
+	border-color:#08e;
+}
+.markItUpHeader ul ul a {
+	display:block;
+	text-indent:0;
+	border:0;
+}
+.markItUpHeader ul .markItUpSize li a {
+	width:90px; 
+	padding:2px 5px 2px 25px;
+	background-position:2px 50%;
+}
+.markItUpHeader ul ul a:hover  {
+}
+.markItUpHeader ul .markItUpSize li a:hover  {
+	color:#FFF;
+	background-color:#000;
+}
+
+/* icons definitions */
+.markItUp .markItUpBold a {
+	background-image:url(images/bold.png);
+}
+.markItUp .markItUpItalic a {
+	background-image:url(images/italic.png);
+}
+.markItUp .markItUpUnderline a {
+	background-image:url(images/underline.png);
+}
+.markItUp .markItUpStroke a {
+	background-image:url(images/stroke.png);
+}
+
+.markItUp .markItUpParagraph a {
+	background-image:url(images/p.png);
+}
+.markItUp .markItUpCenter a {
+	background-image:url(images/center.png);
+}
+.markItUp .markItUpRight a {
+	background-image:url(images/right.png);
+}
+
+.markItUp .markItUpListUL a {
+	background-image:url(images/list-bullet.png);
+}
+.markItUp .markItUpListOL a {
+	background-image:url(images/list-numeric.png);
+}
+.markItUp .markItUpListLI a {
+	background-image:url(images/list-item.png);
+}
+
+.markItUp .markItUpPicture a	{
+	background-image:url(images/picture.png);
+}
+.markItUp .markItUpLink a {
+	background-image:url(images/link.png);
+}
+.markItUp .markItUpMail a {
+	background-image:url(images/mail.png);
+}
+.markItUp .markItUpQuote a {
+	background-image:url(images/quote.png);
+}
+
+.markItUp .markItUpSize a {
+	background-image:url(images/fonts.png);
+}
+.markItUp .preview a {
+	background-image:url(images/preview.png);
+}
+
+/* colors */
+.markItUp .markItUpColors a {
+	background-image:url(images/colors.png);
+}
+	.markItUp .markItUpColors ul {
+		width:81px;
+		padding:1px;	
+	}
+	.markItUp .markItUpColors  li {
+		border:1px solid white;
+		width:25px;	height:25px;
+		overflow:hidden;
+		padding:0px; margin:0px;
+		float:left;
+		border-radius:2px;
+	}
+	.markItUp .markItUpColors ul a {
+		width:25px;	height:25px;
+		color:transparent;
+	}
+	.markItUp .markItUpColors li:hover {
+		background-color:none;
+		border:1px solid #08e;
+	}
+	
+	.markItUp .markItUpColors .col1-1 a { background:yellow; }
+	.markItUp .markItUpColors .col1-2 a { background:orange; }
+	.markItUp .markItUpColors .col1-3 a { background:red; }
+	
+	.markItUp .markItUpColors .col2-1 a { background:blue; }
+	.markItUp .markItUpColors .col2-2 a { background:purple; }
+	.markItUp .markItUpColors .col2-3 a { background:green; }
+	
+	.markItUp .markItUpColors .col3-1 a { background:white; }
+	.markItUp .markItUpColors .col3-2 a { background:gray; }
+	.markItUp .markItUpColors .col3-3 a { background:black; }
