Index: /extensions/bbcode_bar/admin.php
===================================================================
--- /extensions/bbcode_bar/admin.php	(revision 26075)
+++ /extensions/bbcode_bar/admin.php	(revision 26076)
@@ -1,39 +1,25 @@
 <?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+defined('BBCODE_ID') or die('Hacking attempt!');
 
 global $conf, $template;
-load_language('plugin.lang', BBcode_PATH);
 
-// Met à jour la configuration si necessaire
-if (strpos($conf['bbcode_bar'],',') !== false)
+if (isset($_POST['submit']))
 {
-  include(BBcode_PATH .'maintain.inc.php');
-  plugin_activate();
+  $conf['bbcode_bar'] = array();
+  foreach ($conf['bbcode_bar_codes'] as $key)
+  {
+    $conf['bbcode_bar'][$key] = isset($_POST[$key]);
+  }
+  
+  conf_update_param('bbcode_bar', serialize($conf['bbcode_bar']));
+  $page['infos'][] = l10n('Information data registered in database');
 }
 
-$conf_bbcode_bar = unserialize($conf['bbcode_bar']);
-
-// Enregistrement de la configuration
-if (isset($_POST['submit']))
-{  
-  // nouveau tableau de config
-  unset($conf_bbcode_bar);
-  foreach(unserialize(BBcode_codes) as $key) {
-    $conf_bbcode_bar[$key] = (isset($_POST[$key])) ? true : false;
-  }
-  
-  // enregistrement
-  conf_update_param('bbcode_bar', serialize($conf_bbcode_bar));
-  array_push($page['infos'], l10n('Information data registered in database'));
+foreach ($conf['bbcode_bar_codes'] as $key)
+{
+  $template->assign(strtoupper($key).'_STATUS', $conf['bbcode_bar'][$key] ? 'checked="checked"' : '');
 }
 
-// Parametrage du template
-foreach(unserialize(BBcode_codes) as $key) {
-  $template->assign(strtoupper($key).'_STATUS', ($conf_bbcode_bar[$key] == 1) ? 'checked="checked"' : null);
-}
-
-$template->assign('BBCODE_PATH', BBcode_PATH);
-$template->set_filename('bbcode_bar_conf', dirname(__FILE__) . '/template/bbcode_bar_admin.tpl');
+$template->assign('BBCODE_PATH', BBCODE_PATH);
+$template->set_filename('bbcode_bar_conf', realpath(BBCODE_PATH . 'template/bbcode_bar_admin.tpl'));
 $template->assign_var_from_handle('ADMIN_CONTENT', 'bbcode_bar_conf');
-
-?>
Index: tensions/bbcode_bar/bbcode_bar.inc.php
===================================================================
--- /extensions/bbcode_bar/bbcode_bar.inc.php	(revision 26075)
+++ 	(revision )
@@ -1,270 +1,0 @@
-<?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-// add BBCodeBar to textarea
-function set_bbcode_bar($prefilter='picture', $textarea_id='contentid')
-{
-  global $template, $conf, $pwg_loaded_plugins, $page;
-  
-  load_language('plugin.lang', dirname(__FILE__) . '/');
-  $conf_bbcode_bar = unserialize($conf['bbcode_bar']);
-  
-  
-  // buttons
-  $tpl_codes = array();
-  foreach (unserialize(BBcode_codes) as $key) 
-  {
-    $tpl_codes[$key] = (bool)$conf_bbcode_bar[$key];
-  }
-  $tpl_codes['smilies'] = isset($pwg_loaded_plugins['SmiliesSupport']);
-  
-  
-  // calculate separators between groups
-  $groups = array(
-    array('b','i','u','s'),
-    array('p','center','right','quote'),
-    array('ol','ul'),
-    array('img','url','email'),
-    array('size','color'),
-    array('smilies'),
-    );
-    
-  $tpl_groups = array();
-  $count = 0;
-  for ($i=0; $i<count($groups)-1; $i++)
-  {
-    $separator = false;
-    foreach ($groups[$i] as $code)
-    {
-      if ($tpl_codes[$code]) $count++;
-    }
-    if ($count>0)
-    {
-      foreach ($groups[$i+1] as $code)
-      {
-        if ($tpl_codes[$code]) $separator = true;
-      }
-    }
-    if ($separator)
-    {
-      $tpl_groups[$i] = true;
-      $count = 0;
-    }
-  }
-  
-  $template->assign(array(
-    'BBC' => $tpl_codes,
-    'SEP' => $tpl_groups,
-    'BBCODE_PATH' => BBcode_PATH,
-    'BBCODE_ID' => $textarea_id,
-    ));
-  
-  $template->set_prefilter($prefilter, 'set_bbcode_bar_prefilter');    
-
-  // smilies support > 2.3 ## must be parsed after bbcode_bar, because the javascript must be after bbc's one
-  if (isset($pwg_loaded_plugins['SmiliesSupport'])) 
-  {
-    set_smiliessupport($prefilter, $textarea_id);
-  }  
-}
-
-function set_bbcode_bar_prefilter($content, &$smarty)
-{
-  $search = '#(<div id="guestbookAdd">|<div id="commentAdd">|<div class="contact">)#';
-  $replace = file_get_contents(BBcode_PATH.'/template/bbcode_bar.tpl').'$1';
-  return preg_replace($search, $replace, $content);
-}
-
-
-// check tags and eventually close malformed tags, return BBCoded String
-function CheckTags($str)
-{
-  //storage stack
-  $tags = array();
-
-  for ($pos = 0; $pos<strlen($str); $pos++)
-  {
-    if ($str{$pos} == '[')
-    {
-      $end_pos = strpos($str, ']', $pos);
-      $tag = substr($str, ++$pos, $end_pos-$pos);
-      //deals with tags which contains arguments (ie quote)
-      if ( ($equal_pos = strpos($tag, '=', 0)) !== FALSE)
-      $tag = substr($tag, 0, $equal_pos);
-      //check whether we have a defined tag or not.
-      if (in_array(strtolower($tag),unserialize(BBcode_codes)) || in_array(strtolower(substr($tag,1)),unserialize(BBcode_codes)))
-      {
-        //closing tag
-        if ($tag{0} == '/')
-        {
-          //cleaned tag
-          $tag = substr($tag, 1);    
-          $before_tag = substr($str, 0, $pos-1);
-          $after_tag = substr($str, $end_pos+1);  
-          //pop stack
-          while (($temp = array_pop($tags)))
-          {
-            if ($temp != $tag) {
-              $before_tag.='[/'.$temp.']';
-            } else {
-              $before_tag.='[/'.$tag.']';
-              break;
-            }
-          }
-          $end_pos += strlen($before_tag)+strlen($after_tag)-strlen($str);
-          $str = $before_tag.$after_tag;
-        } else { // push stack
-          array_push($tags,$tag);
-        }
-      }
-      $pos = $end_pos;  
-    }
-  }
-  // empty stack and closing tags
-  while ($temp = array_pop($tags))
-  {    
-    $str.='[/'.$temp.']';
-  }
-  return $str;
-}
-
-// return string, HTML version of BBCoded $str
-function BBCodeParse($str)
-{
-  global $conf;
-
-  $conf_bbcode_bar = unserialize($conf['bbcode_bar']);
-  $str = CheckTags(nl2br($str));
-
-  $patterns = array();
-  $replacements = array();
-
-  if ($conf_bbcode_bar['p'])
-  {
-    //Paragraph
-    $patterns[] = '#\[p\](.*?)\[/p\]#is';
-    $replacements[] = '<p>\\1</p>';
-  }
-  if ($conf_bbcode_bar['b'])
-  {
-    // Bold
-    $patterns[] = '#\[b\](.*?)\[/b\]#is';
-    $replacements[] = '<b>\\1</b>';
-  }
-  if ($conf_bbcode_bar['i'])
-  {
-    //Italic
-    $patterns[] = '#\[i\](.*?)\[/i\]#is';
-    $replacements[] = '<i>\\1</i>';
-  }
-  if ($conf_bbcode_bar['u'])
-  {
-    //Underline  
-    $patterns[] = '#\[u\](.*?)\[\/u\]#is';
-    $replacements[] = '<u>\\1</u>';
-  }
-  if ($conf_bbcode_bar['s'])
-  {
-    //Strikethrough
-    $patterns[] = '#\[s\](.*?)\[/s\]#is';
-    $replacements[] = '<s>\\1</s>';
-  }
-  if ($conf_bbcode_bar['center'])
-  {
-    //Center
-    $patterns[] = '#\[center\](.*?)\[/center\]#is';
-    $replacements[] = '<div align="center"><p>\\1</p></div>';
-  }
-  if ($conf_bbcode_bar['right'])
-  {
-    //Right
-    $patterns[] = '#\[right\](.*?)\[/right\]#is';
-    $replacements[] = '<div align="right"><p>\\1</p></div>';
-  }
-  if ($conf_bbcode_bar['ol'])
-  {
-    //Olist
-    $patterns[] = '#\[ol\](.*?)\[/ol\]#is';
-    $replacements[] = '<ol>\\1</ol>';
-  }
-  if ($conf_bbcode_bar['ul'])
-  {
-    //Ulist
-    $patterns[] = '#\[ul\](.*?)\[/ul\]#is';
-    $replacements[] = '<ul>\\1</ul>';
-  }
-  if ($conf_bbcode_bar['ol'] || $conf_bbcode_bar['ul'])
-  {
-    //List
-    $patterns[] = '#\[li\](.*?)\[/li\]#is';
-    $replacements[] = '<li>\\1</li>';
-  }
-  if ($conf_bbcode_bar['quote'])
-  {
-    // Quotes
-    $patterns[] = "#\[quote\](.*?)\[/quote\]#is";
-    $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>';
-
-    //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['img'])
-  {
-    //Images
-    $patterns[] = "#\[img\](.*?)\[/img\]#is";
-    $replacements[] = '<img src="\\1" />';
-  }
-  if ($conf_bbcode_bar['url'])
-  {
-    //[url]xxxx://www.zzzz.yyy[/url]
-    $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is"; 
-    $replacements[] = '<a href="\\1" target="_blank">\\1</a>'; 
-
-    //[url]www.zzzzz.yyy[/url]
-    $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is"; 
-    $replacements[] = '<a href="http://\\1" target="_blank">\\1</a>'; 
-
-    //[url=xxxx://www.zzzzz.yyy]ZzZzZ[/url]
-    $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is"; 
-    $replacements[] = '<a href="\\1" target="_blank">\\2</a>'; 
-
-    //[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]
-    $patterns[] = "#\[url=&quot;((www|ftp)\.[^ \n\r\t<]*?)&quot;\](.*?)\[/url\]#is";
-    $replacements[] = '<a href="http://\\1" target="_blank">\\3</a>';
-
-    //[url="http://www.zzzzz.yyy"]zZzZz[/url]
-    $patterns[] = "#\[url=&quot;([\w]+?://[^ \n\r\t<]*?)&quot;\](.*?)\[/url\]#is";
-    $replacements[] = '<a href="\\1" target="_blank">\\2</a>';
-  }
-  if ($conf_bbcode_bar['email'])
-  {
-    //[email]samvure@gmail.com[/email]
-    $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#is";
-    $replacements[] = '<a href="mailto:\\1">\\1</a>';
-  }
-  if ($conf_bbcode_bar['size'])
-  {
-    //Size
-    $patterns[] = "#\[size=([1-2]?[0-9])\](.*?)\[/size\]#is";
-    $replacements[] = '<span style="font-size: \\1px; line-height: normal">\\2</span>';
-  }
-  if ($conf_bbcode_bar['color'])
-  {
-    //Colours
-    $patterns[] = "#\[color=(\#[0-9A-F]{6}|\#[0-9A-F]{3}|[a-z]+)\](.*?)\[/color\]#is";
-    $replacements[] = '<span style="color: \\1">\\2</span>';
-  }
-  
-  return preg_replace($patterns, $replacements, $str);
-}
-
-?>
Index: /extensions/bbcode_bar/include/events.inc.php
===================================================================
--- /extensions/bbcode_bar/include/events.inc.php	(revision 26076)
+++ /extensions/bbcode_bar/include/events.inc.php	(revision 26076)
@@ -0,0 +1,233 @@
+<?php
+defined('BBCODE_ID') or die('Hacking attempt!');
+
+function bbcode_bar_admin_menu($menu)
+{
+  $menu[] = array(
+    'NAME' => 'BBCode Bar',
+    'URL' => BBCODE_ADMIN,
+    );
+  return $menu;
+}
+
+function add_bbcode_bar() 
+{
+  global $page, $pwg_loaded_plugins, $template, $conf;
+  
+  if (script_basename() == 'picture') 
+  {
+    $prefilter = 'picture';
+    $textarea_id = 'contentid';
+  }
+  else if (isset($page['section']))
+  {
+    if (
+      script_basename() == 'index' and isset($pwg_loaded_plugins['Comments_on_Albums'])
+      and $page['section'] == 'categories' and isset($page['category'])
+      ) 
+    {
+      $prefilter = 'comments_on_albums';
+      $textarea_id = 'contentid';
+    }
+    else if ($page['section'] == 'guestbook') 
+    {
+      $prefilter = 'guestbook';
+      $textarea_id = 'contentid';
+    }
+    else if ($page['section'] == 'contact') 
+    {
+      $prefilter = 'contactform';
+      $textarea_id = 'cf_content';
+    }
+  }
+  
+  if (!isset($prefilter))
+  {
+    return;
+  }
+  
+  $conf['bbcode_bar']['smilies'] = isset($pwg_loaded_plugins['SmiliesSupport']);
+  
+  // calculate separators between groups
+  $groups = array(
+    array('b','i','u','s'),
+    array('p','center','right','quote'),
+    array('ol','ul'),
+    array('img','url','email'),
+    array('size','color'),
+    array('smilies'),
+    );
+    
+  $tpl_groups = array();
+  $count = 0;
+  for ($i=0; $i<count($groups)-1; $i++)
+  {
+    $separator = false;
+    foreach ($groups[$i] as $code)
+    {
+      if ($conf['bbcode_bar'][$code]) $count++;
+    }
+    if ($count>0)
+    {
+      foreach ($groups[$i+1] as $code)
+      {
+        if ($conf['bbcode_bar'][$code]) $separator = true;
+      }
+    }
+    if ($separator)
+    {
+      $tpl_groups[$i] = true;
+      $count = 0;
+    }
+  }
+  
+  $template->assign(array(
+    'BBCODE_PATH' => BBCODE_PATH,
+    'BBCODE' => array(
+      'codes' => $conf['bbcode_bar'],
+      'separators' => $tpl_groups,
+      'textarea_id' => $textarea_id,
+      ),
+    ));
+
+  $template->set_filename('bbcodebar', realpath(BBCODE_PATH.'/template/bbcode_bar.tpl'));
+  $template->parse('bbcodebar');
+}
+
+// return string, HTML version of BBCoded $str
+function BBCodeParse($str)
+{
+  global $conf;
+
+  $str = bbcode_checktags(nl2br($str));
+
+  $patterns = array();
+  $replacements = array();
+
+  if ($conf['bbcode_bar']['p'])
+  {
+    //Paragraph
+    $patterns[] = '#\[p\](.*?)\[/p\]#is';
+    $replacements[] = '<p>\\1</p>';
+  }
+  if ($conf['bbcode_bar']['b'])
+  {
+    // Bold
+    $patterns[] = '#\[b\](.*?)\[/b\]#is';
+    $replacements[] = '<b>\\1</b>';
+  }
+  if ($conf['bbcode_bar']['i'])
+  {
+    //Italic
+    $patterns[] = '#\[i\](.*?)\[/i\]#is';
+    $replacements[] = '<i>\\1</i>';
+  }
+  if ($conf['bbcode_bar']['u'])
+  {
+    //Underline  
+    $patterns[] = '#\[u\](.*?)\[\/u\]#is';
+    $replacements[] = '<u>\\1</u>';
+  }
+  if ($conf['bbcode_bar']['s'])
+  {
+    //Strikethrough
+    $patterns[] = '#\[s\](.*?)\[/s\]#is';
+    $replacements[] = '<s>\\1</s>';
+  }
+  if ($conf['bbcode_bar']['center'])
+  {
+    //Center
+    $patterns[] = '#\[center\](.*?)\[/center\]#is';
+    $replacements[] = '<div align="center">\\1</div>';
+  }
+  if ($conf['bbcode_bar']['right'])
+  {
+    //Right
+    $patterns[] = '#\[right\](.*?)\[/right\]#is';
+    $replacements[] = '<div align="right">\\1</div>';
+  }
+  if ($conf['bbcode_bar']['ol'])
+  {
+    //Olist
+    $patterns[] = '#\[ol\](.*?)\[/ol\]#is';
+    $replacements[] = '<ol>\\1</ol>';
+  }
+  if ($conf['bbcode_bar']['ul'])
+  {
+    //Ulist
+    $patterns[] = '#\[ul\](.*?)\[/ul\]#is';
+    $replacements[] = '<ul>\\1</ul>';
+  }
+  if ($conf['bbcode_bar']['ol'] || $conf['bbcode_bar']['ul'])
+  {
+    //List
+    $patterns[] = '#\[li\](.*?)\[/li\]#is';
+    $replacements[] = '<li>\\1</li>';
+  }
+  if ($conf['bbcode_bar']['quote'])
+  {
+    // Quotes
+    $patterns[] = "#\[quote\](.*?)\[/quote\]#is";
+    $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>';
+
+    //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']['img'])
+  {
+    //Images
+    $patterns[] = "#\[img\](.*?)\[/img\]#is";
+    $replacements[] = '<img src="\\1" />';
+  }
+  if ($conf['bbcode_bar']['url'])
+  {
+    //[url]xxxx://www.zzzz.yyy[/url]
+    $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is"; 
+    $replacements[] = '<a href="\\1" target="_blank">\\1</a>'; 
+
+    //[url]www.zzzzz.yyy[/url]
+    $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is"; 
+    $replacements[] = '<a href="http://\\1" target="_blank">\\1</a>'; 
+
+    //[url=xxxx://www.zzzzz.yyy]ZzZzZ[/url]
+    $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is"; 
+    $replacements[] = '<a href="\\1" target="_blank">\\2</a>'; 
+
+    //[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]
+    $patterns[] = "#\[url=&quot;((www|ftp)\.[^ \n\r\t<]*?)&quot;\](.*?)\[/url\]#is";
+    $replacements[] = '<a href="http://\\1" target="_blank">\\3</a>';
+
+    //[url="http://www.zzzzz.yyy"]zZzZz[/url]
+    $patterns[] = "#\[url=&quot;([\w]+?://[^ \n\r\t<]*?)&quot;\](.*?)\[/url\]#is";
+    $replacements[] = '<a href="\\1" target="_blank">\\2</a>';
+  }
+  if ($conf['bbcode_bar']['email'])
+  {
+    //[email]samvure@gmail.com[/email]
+    $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#is";
+    $replacements[] = '<a href="mailto:\\1">\\1</a>';
+  }
+  if ($conf['bbcode_bar']['size'])
+  {
+    //Size
+    $patterns[] = "#\[size=([1-2]?[0-9])\](.*?)\[/size\]#is";
+    $replacements[] = '<span style="font-size: \\1px; line-height: normal">\\2</span>';
+  }
+  if ($conf['bbcode_bar']['color'])
+  {
+    //Colours
+    $patterns[] = "#\[color=(\#[0-9A-F]{6}|\#[0-9A-F]{3}|[a-z]+)\](.*?)\[/color\]#is";
+    $replacements[] = '<span style="color: \\1">\\2</span>';
+  }
+  
+  return preg_replace($patterns, $replacements, $str);
+}
Index: /extensions/bbcode_bar/include/functions.inc.php
===================================================================
--- /extensions/bbcode_bar/include/functions.inc.php	(revision 26076)
+++ /extensions/bbcode_bar/include/functions.inc.php	(revision 26076)
@@ -0,0 +1,56 @@
+<?php
+defined('BBCODE_ID') or die('Hacking attempt!');
+
+// check tags and eventually close malformed tags, return BBCoded String
+function bbcode_checktags($str)
+{
+  global $conf;
+
+  //storage stack
+  $tags = array();
+
+  for ($pos = 0; $pos<strlen($str); $pos++)
+  {
+    if ($str{$pos} == '[')
+    {
+      $end_pos = strpos($str, ']', $pos);
+      $tag = substr($str, ++$pos, $end_pos-$pos);
+      //deals with tags which contains arguments (ie quote)
+      if ( ($equal_pos = strpos($tag, '=', 0)) !== FALSE)
+      $tag = substr($tag, 0, $equal_pos);
+      //check whether we have a defined tag or not.
+      if (in_array(strtolower($tag), $conf['bbcode_bar_codes']) || in_array(strtolower(substr($tag,1)), $conf['bbcode_bar_codes']))
+      {
+        //closing tag
+        if ($tag{0} == '/')
+        {
+          //cleaned tag
+          $tag = substr($tag, 1);    
+          $before_tag = substr($str, 0, $pos-1);
+          $after_tag = substr($str, $end_pos+1);  
+          //pop stack
+          while (($temp = array_pop($tags)))
+          {
+            if ($temp != $tag) {
+              $before_tag.='[/'.$temp.']';
+            } else {
+              $before_tag.='[/'.$tag.']';
+              break;
+            }
+          }
+          $end_pos += strlen($before_tag)+strlen($after_tag)-strlen($str);
+          $str = $before_tag.$after_tag;
+        } else { // push stack
+          array_push($tags,$tag);
+        }
+      }
+      $pos = $end_pos;  
+    }
+  }
+  // empty stack and closing tags
+  while ($temp = array_pop($tags))
+  {    
+    $str.='[/'.$temp.']';
+  }
+  return $str;
+}
Index: /extensions/bbcode_bar/include/index.php
===================================================================
--- /extensions/bbcode_bar/include/index.php	(revision 26076)
+++ /extensions/bbcode_bar/include/index.php	(revision 26076)
@@ -0,0 +1,7 @@
+<?php
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/bbcode_bar/main.inc.php
===================================================================
--- /extensions/bbcode_bar/main.inc.php	(revision 26075)
+++ /extensions/bbcode_bar/main.inc.php	(revision 26076)
@@ -8,67 +8,44 @@
 */
 
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
 
-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')));
+define('BBCODE_ID' ,    basename(dirname(__FILE__)));
+define('BBCODE_PATH' ,    PHPWG_PLUGINS_PATH . BBCODE_ID . '/');
+define('BBCODE_ADMIN',    get_root_url() . 'admin.php?page=plugin-' . BBCODE_ID);
+define('BBCODE_VERSION',  'auto');
 
-include_once(BBcode_PATH.'bbcode_bar.inc.php');
+
+include_once(BBCODE_PATH.'include/functions.inc.php');
+include_once(BBCODE_PATH.'include/events.inc.php');
+
+
 add_event_handler('init', 'init_bbcode_bar');
+
+if (defined('IN_ADMIN'))
+{
+  add_event_handler('get_admin_plugin_menu_links', 'bbcode_bar_admin_menu');
+}
+else
+{
+  add_event_handler('loc_after_page_header', 'add_bbcode_bar', EVENT_HANDLER_PRIORITY_NEUTRAL+1);
+}
+
+add_event_handler('render_comment_content', 'BBCodeParse');
+add_event_handler('render_contact_content', 'BBCodeParse');
+
 
 function init_bbcode_bar()
 {
+  global $conf;
+  
+  include_once(BBCODE_PATH . 'maintain.inc.php');
+  $maintain = new bbcode_bar_maintain(BBCODE_ID);
+  $maintain->autoUpdate(BBCODE_VERSION, 'install');
+  
+  $conf['bbcode_bar'] = unserialize($conf['bbcode_bar']);
+  $conf['bbcode_bar_codes'] = array('b','i','u','s','p','center','right','quote','ul','ol','img','url','email','size','color');
+  
+  load_language('plugin.lang', BBCODE_PATH);
+  
   remove_event_handler('render_comment_content', 'render_comment_content');
-  add_event_handler('render_comment_content', 'BBCodeParse');
-  add_event_handler('render_contact_content', 'BBCodeParse');
-  add_event_handler('loc_after_page_header', 'add_bbcode_bar');
 }
-
-function add_bbcode_bar() 
-{
-  global $page, $pwg_loaded_plugins;
-  
-  if (isset($page['body_id']) AND $page['body_id'] == 'thePicturePage') 
-  {
-    $prefilter = 'picture';
-    $textarea_id = 'contentid';
-  }
-  else if (
-    script_basename() == 'index' and isset($pwg_loaded_plugins['Comments_on_Albums'])
-    and isset($page['section']) and $page['section'] == 'categories' and isset($page['category'])
-    ) 
-  {
-    $prefilter = 'comments_on_albums';
-    $textarea_id = 'contentid';
-  }
-  else if (isset($page['section']) and $page['section'] == 'guestbook') 
-  {
-    $prefilter = 'index';
-    $textarea_id = 'contentid';
-  }
-  else if (isset($page['section']) and $page['section'] == 'contact') 
-  {
-    $prefilter = 'index';
-    $textarea_id = 'cf_content';
-  }
-  
-  if (isset($prefilter))
-  {
-    set_bbcode_bar($prefilter, $textarea_id);
-  }
-}
-
-if (script_basename() == 'admin')
-{
-  add_event_handler('get_admin_plugin_menu_links', 'bbcode_bar_admin_menu');
-  function bbcode_bar_admin_menu($menu)
-  {
-    array_push($menu, array(
-      'NAME' => 'BBCode Bar',
-      'URL' => get_root_url().'admin.php?page=plugin-' . BBcode_DIR
-    ));
-    return $menu;
-  } 
-}
-
-?>
Index: /extensions/bbcode_bar/maintain.inc.php
===================================================================
--- /extensions/bbcode_bar/maintain.inc.php	(revision 26075)
+++ /extensions/bbcode_bar/maintain.inc.php	(revision 26076)
@@ -1,10 +1,10 @@
 <?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
 
-function plugin_install()
-{  
-  global $conf;
+class bbcode_bar_maintain extends PluginMaintain
+{
+  private $installed = false;
   
-  $BBcode_default = array(
+  private $default_conf = array(
     'b' => true,
     'i' => true,
@@ -22,46 +22,35 @@
     'size' => true,
     'color' => true,
-  );
+    );
 
-  if (!isset($conf['bbcode_bar']))
+  function install($plugin_version, &$errors=array())
   {
-    conf_update_param('bbcode_bar',serialize($BBcode_default));
+    global $conf;
+    
+    if (isset($conf['bbcode_bar']))
+    {
+      $conf['bbcode_bar'] = serialize($this->default_conf);
+
+      conf_update_param('bbcode_bar', $conf['bbcode_bar']);
+    }
+    
+    $this->installed = true;
+  }
+
+  function activate($plugin_version, &$errors=array())
+  {
+    if (!$this->installed)
+    {
+      $this->install($plugin_version, $errors);
+    }
+  }
+
+  function deactivate()
+  {
+  }
+
+  function uninstall()
+  {
+    conf_delete_param('bbcode_bar');
   }
 }
-
-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,
-    );
-    
-    conf_update_param('bbcode_bar', serialize($new_bbcode_bar));
-  }
-}
-
-function plugin_uninstall()
-{
-  pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar";');
-}
-
-?>
Index: /extensions/bbcode_bar/template/bbcode_bar.tpl
===================================================================
--- /extensions/bbcode_bar/template/bbcode_bar.tpl	(revision 26075)
+++ /extensions/bbcode_bar/template/bbcode_bar.tpl	(revision 26076)
@@ -1,4 +1,4 @@
-{combine_script id='markitup' require='jquery' load='footer' path=$BBCODE_PATH|@cat:'template/markitup/jquery.markitup.js'}
-{combine_css path=$BBCODE_PATH|@cat:'template/markitup/style.markitup.css'}
+{combine_script id='markitup' require='jquery' load='footer' path=$BBCODE_PATH|cat:'template/markitup/jquery.markitup.js'}
+{combine_css id='markitup' order=20 path=$BBCODE_PATH|cat:'template/markitup/style.markitup.css'}
 
 {footer_script require='markitup'}
@@ -7,65 +7,65 @@
     {counter start=0 print=false assign=bbc_counter}
     
-    {if $BBC.b}{counter}{ldelim}name:'{'Bold : [b]bold[/b]'|@translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'miuIcon miuBold'},{/if}
-    {if $BBC.i}{counter}{ldelim}name:'{'Italic : [i]italic[/i]'|@translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'miuIcon miuItalic'},{/if}
-    {if $BBC.u}{counter}{ldelim}name:'{'Underline : [u]underline[/u]'|@translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'miuIcon miuUnderline'},{/if}
-    {if $BBC.s}{counter}{ldelim}name:'{'Striped  : [s]striped[/s]'|@translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'miuIcon miuStroke'},{/if}
+    {if $BBCODE.codes.b}{counter}{ldelim}name:'{'Bold : [b]bold[/b]'|translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'miuIcon miuBold'},{/if}
+    {if $BBCODE.codes.i}{counter}{ldelim}name:'{'Italic : [i]italic[/i]'|translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'miuIcon miuItalic'},{/if}
+    {if $BBCODE.codes.u}{counter}{ldelim}name:'{'Underline : [u]underline[/u]'|translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'miuIcon miuUnderline'},{/if}
+    {if $BBCODE.codes.s}{counter}{ldelim}name:'{'Striped  : [s]striped[/s]'|translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'miuIcon miuStroke'},{/if}
     
-    {if $SEP[0]}{counter}{ldelim}separator:'|'},{/if}
+    {if $BBCODE.separators[0]}{counter}{ldelim}separator:'|'},{/if}
     
-    {if $BBC.p}{counter}{ldelim}name:'{'Paragraph : [p]Paragraph[/p]'|@translate}', openWith:'[p]', closeWith:'[/p]', className:'miuIcon miuParagraph'},{/if}
-    {if $BBC.center}{counter}{ldelim}name:'{'Center : [center]center[/center]'|@translate}', openWith:'[center]', closeWith:'[/center]', className:'miuIcon miuCenter'},{/if}
-    {if $BBC.right}{counter}{ldelim}name:'{'Right : [right]right[/right]'|@translate}', openWith:'[right]', closeWith:'[/right]', className:'miuIcon miuRight'},{/if}
-    {if $BBC.quote}{counter}{ldelim}name:'{'Quote : [quote]quote[/quote]'|@translate}', openWith:'[quote]', closeWith:'[/quote]', className:'miuIcon miuQuote'},{/if}
+    {if $BBCODE.codes.p}{counter}{ldelim}name:'{'Paragraph : [p]Paragraph[/p]'|translate}', openWith:'[p]', closeWith:'[/p]', className:'miuIcon miuParagraph'},{/if}
+    {if $BBCODE.codes.center}{counter}{ldelim}name:'{'Center : [center]center[/center]'|translate}', openWith:'[center]', closeWith:'[/center]', className:'miuIcon miuCenter'},{/if}
+    {if $BBCODE.codes.right}{counter}{ldelim}name:'{'Right : [right]right[/right]'|translate}', openWith:'[right]', closeWith:'[/right]', className:'miuIcon miuRight'},{/if}
+    {if $BBCODE.codes.quote}{counter}{ldelim}name:'{'Quote : [quote]quote[/quote]'|translate}', openWith:'[quote]', closeWith:'[/quote]', className:'miuIcon miuQuote'},{/if}
     
-    {if $SEP[1]}{counter}{ldelim}separator:'|'},{/if}
+    {if $BBCODE.separators[1]}{counter}{ldelim}separator:'|'},{/if}
     
-    {if $BBC.ul}{counter}{ldelim}name:'{'Unordered list : [ul][li]element[/li][/ul]'|@translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'miuIcon miuListUL'},{/if}
-    {if $BBC.ol}{counter}{ldelim}name:'{'Ordered list : [ol][li]element[/li][/ol]'|@translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'miuIcon miuListOL'},{/if}
-    {if $BBC.ul OR $BBC.ol}{counter}{ldelim}name:'{'List element : [li]element[/li]'|@translate}', multiline:true, openWith:'[li]', closeWith:'[/li]', className:'miuIcon miuListLI'},{/if}
+    {if $BBCODE.codes.ul}{counter}{ldelim}name:'{'Unordered list : [ul][li]element[/li][/ul]'|translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'miuIcon miuListUL'},{/if}
+    {if $BBCODE.codes.ol}{counter}{ldelim}name:'{'Ordered list : [ol][li]element[/li][/ol]'|translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'miuIcon miuListOL'},{/if}
+    {if $BBCODE.codes.ul OR $BBCODE.codes.ol}{counter}{ldelim}name:'{'List element : [li]element[/li]'|translate}', multiline:true, openWith:'[li]', closeWith:'[/li]', className:'miuIcon miuListLI'},{/if}
     
-    {if $SEP[2]}{counter}{ldelim}separator:'|' },{/if}
+    {if $BBCODE.separators[2]}{counter}{ldelim}separator:'|' },{/if}
     
-    {if $BBC.img}{counter}{ldelim}name:'{'Picture : [img]picture[/img]'|@translate}', key:'P', replaceWith:'[img][![Source:!:http://]!][/img]', className:'miuIcon miuPicture'},{/if}
-    {if $BBC.url}{counter}{ldelim}name:'{'URL : [url=URL]Title[/url]'|@translate}', key:'L', openWith:'[url=[![Url:!:http://]!]]', closeWith:'[/url]', className:'miuIcon miuLink'},{/if}
-    {if $BBC.email}{counter}{ldelim}name:'{'E-mail : [email]Email[/email]'|@translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'miuIcon miuMail'},{/if}
+    {if $BBCODE.codes.img}{counter}{ldelim}name:'{'Picture : [img]picture[/img]'|translate}', key:'P', replaceWith:'[img][![Source:!:http://]!][/img]', className:'miuIcon miuPicture'},{/if}
+    {if $BBCODE.codes.url}{counter}{ldelim}name:'{'URL : [url=URL]Title[/url]'|translate}', key:'L', openWith:'[url=[![Url:!:http://]!]]', closeWith:'[/url]', className:'miuIcon miuLink'},{/if}
+    {if $BBCODE.codes.email}{counter}{ldelim}name:'{'E-mail : [email]Email[/email]'|translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'miuIcon miuMail'},{/if}
     
-    {if $SEP[3]}{counter}{ldelim}separator:'|'},{/if}
+    {if $BBCODE.separators[3]}{counter}{ldelim}separator:'|'},{/if}
     
-    {if $BBC.size}{counter}
-    {ldelim}name:'{'Font size : [size=X]text[/size]'|@translate}', className:'miuIcon miuSize',
+    {if $BBCODE.codes.size}{counter}
+    {ldelim}name:'{'Font size : [size=X]text[/size]'|translate}', className:'miuIcon miuSize',
       dropMenu :[
-        {ldelim}name:'{'tiny font'|@translate}', openWith:'[size=7]', closeWith:'[/size]', className:'miuSizeTiny' },
-        {ldelim}name:'{'small font'|@translate}', openWith:'[size=9]', closeWith:'[/size]', className:'miuSizeSmall' },
-        {ldelim}name:'{'normal font'|@translate}', openWith:'[size=12]', closeWith:'[/size]', className:'miuSizeNormal' },
-        {ldelim}name:'{'large font'|@translate}', openWith:'[size=18]', closeWith:'[/size]', className:'miuSizeLarge' },
-        {ldelim}name:'{'huge font'|@translate}', openWith:'[size=24]', closeWith:'[/size]', className:'miuSizeHuge' },
+        {ldelim}name:'{'tiny font'|translate}', openWith:'[size=7]', closeWith:'[/size]', className:'miuSizeTiny' },
+        {ldelim}name:'{'small font'|translate}', openWith:'[size=9]', closeWith:'[/size]', className:'miuSizeSmall' },
+        {ldelim}name:'{'normal font'|translate}', openWith:'[size=12]', closeWith:'[/size]', className:'miuSizeNormal' },
+        {ldelim}name:'{'large font'|translate}', openWith:'[size=18]', closeWith:'[/size]', className:'miuSizeLarge' },
+        {ldelim}name:'{'huge font'|translate}', openWith:'[size=24]', closeWith:'[/size]', className:'miuSizeHuge' },
       ]
     },
     {/if}
-    {if $BBC.color}{counter}
-    {ldelim}name:'{'Font color : [color=color]text[/color]'|@translate}', className:'miuIcon miuColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]', 
+    {if $BBCODE.codes.color}{counter}
+    {ldelim}name:'{'Font color : [color=color]text[/color]'|translate}', className:'miuIcon miuColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]', 
       dropMenu: [
-        {ldelim}name:'{'Yellow'|@translate}', openWith:'[color=yellow]', closeWith:'[/color]', className:"col1-1" },
-        {ldelim}name:'{'Orange'|@translate}', openWith:'[color=orange]', closeWith:'[/color]', className:"col1-2" },
-        {ldelim}name:'{'Red'|@translate}', openWith:'[color=red]', closeWith:'[/color]', className:"col1-3" },
+        {ldelim}name:'{'Yellow'|translate}', openWith:'[color=yellow]', closeWith:'[/color]', className:"col1-1" },
+        {ldelim}name:'{'Orange'|translate}', openWith:'[color=orange]', closeWith:'[/color]', className:"col1-2" },
+        {ldelim}name:'{'Red'|translate}', openWith:'[color=red]', closeWith:'[/color]', className:"col1-3" },
         
-        {ldelim}name:'{'Blue'|@translate}', openWith:'[color=blue]', closeWith:'[/color]', className:"col2-1" },
-        {ldelim}name:'{'Purple'|@translate}', openWith:'[color=purple]', closeWith:'[/color]', className:"col2-2" },
-        {ldelim}name:'{'Green'|@translate}', openWith:'[color=green]', closeWith:'[/color]', className:"col2-3" },
+        {ldelim}name:'{'Blue'|translate}', openWith:'[color=blue]', closeWith:'[/color]', className:"col2-1" },
+        {ldelim}name:'{'Purple'|translate}', openWith:'[color=purple]', closeWith:'[/color]', className:"col2-2" },
+        {ldelim}name:'{'Green'|translate}', openWith:'[color=green]', closeWith:'[/color]', className:"col2-3" },
         
-        {ldelim}name:'{'White'|@translate}', openWith:'[color=white]', closeWith:'[/color]', className:"col3-1" },
-        {ldelim}name:'{'Grey'|@translate}', openWith:'[color=gray]', closeWith:'[/color]', className:"col3-2" },
-        {ldelim}name:'{'Black'|@translate}', openWith:'[color=black]', closeWith:'[/color]', className:"col3-3" }
+        {ldelim}name:'{'White'|translate}', openWith:'[color=white]', closeWith:'[/color]', className:"col3-1" },
+        {ldelim}name:'{'Grey'|translate}', openWith:'[color=gray]', closeWith:'[/color]', className:"col3-2" },
+        {ldelim}name:'{'Black'|translate}', openWith:'[color=black]', closeWith:'[/color]', className:"col3-3" }
       ]
     },
     {/if}
     
-    {if $SEP[4]}{counter}{ldelim}separator:'|'},{/if}
+    {if $BBCODE.separators[4]}{counter}{ldelim}separator:'|'},{/if}
   ]
 };{/strip}
 
 
-jQuery('#{$BBCODE_ID}').markItUp(BBCodeBar);
+jQuery('#{$BBCODE.textarea_id}').markItUp(BBCodeBar);
 jQuery('.markItUpHeader>ul').css('width', {$bbc_counter}*22);
 {/footer_script}
Index: /extensions/bbcode_bar/template/bbcode_bar_admin.tpl
===================================================================
--- /extensions/bbcode_bar/template/bbcode_bar_admin.tpl	(revision 26075)
+++ /extensions/bbcode_bar/template/bbcode_bar_admin.tpl	(revision 26076)
@@ -1,3 +1,3 @@
-{html_style}{literal}
+{html_style}
 .miuIcon a {
   display:inline-block;
@@ -9,7 +9,7 @@
   border-radius:2px;
 }
-{/literal}{/html_style}
+{/html_style}
 
-{combine_css path=$BBCODE_PATH|@cat:"template/markitup/style.markitup.css"}
+{combine_css path=$BBCODE_PATH|cat:'template/markitup/style.markitup.css'}
 
 <div class="titrePage">
@@ -17,86 +17,86 @@
 </div>
 
-<form method="post" action="" class="properties" ENCTYPE="multipart/form-data"> 
+<form method="post" action="" class="properties"> 
   <fieldset>
-    <legend>{'Available options'|@translate}</legend>
+    <legend>{'Available options'|translate}</legend>
     <ul class="markItUp">
       <li><label>
         <span class="miuIcon miuBold"><a>&nbsp;</a></span>
         <input type="checkbox" name="b" {$B_STATUS} value="1"/>
-        {'Bold : [b]bold[/b]'|@translate}
+        {'Bold : [b]bold[/b]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuItalic"><a>&nbsp;</a></span>
         <input type="checkbox" name="i" {$I_STATUS} value="1"/>
-        {'Italic : [i]italic[/i]'|@translate}
+        {'Italic : [i]italic[/i]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuUnderline"><a>&nbsp;</a></span>
         <input type="checkbox" name="u" {$U_STATUS} value="1"/>
-        {'Underline : [u]underline[/u]'|@translate}
+        {'Underline : [u]underline[/u]'|translate}
       </label></li>      
       <li><label>
         <span class="miuIcon miuStroke"><a>&nbsp;</a></span>
         <input type="checkbox" name="s" {$S_STATUS} value="1"/>
-        {'Striped  : [s]striped[/s]'|@translate}
+        {'Striped  : [s]striped[/s]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuParagraph"><a>&nbsp;</a></span>
         <input type="checkbox" name="p" {$P_STATUS} value="1"/>
-        {'Paragraph : [p]Paragraph[/p]'|@translate}
+        {'Paragraph : [p]Paragraph[/p]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuCenter"><a>&nbsp;</a></span>
         <input type="checkbox" name="center" {$CENTER_STATUS} value="1"/>
-        {'Center : [center]center[/center]'|@translate}
+        {'Center : [center]center[/center]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuRight"><a>&nbsp;</a></span>
         <input type="checkbox" name="right" {$RIGHT_STATUS} value="1"/>
-        {'Right : [right]right[/right]'|@translate}
+        {'Right : [right]right[/right]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuQuote"><a>&nbsp;</a></span>
         <input type="checkbox" name="quote" {$QUOTE_STATUS} value="1"/>
-        {'Quote : [quote]quote[/quote]'|@translate}
+        {'Quote : [quote]quote[/quote]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuListUL"><a>&nbsp;</a></span>
         <input type="checkbox" name="ul" {$UL_STATUS} value="1"/>
-        {'Unordered list : [ul][li]element[/li][/ul]'|@translate}
+        {'Unordered list : [ul][li]element[/li][/ul]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuListOL"><a>&nbsp;</a></span>
         <input type="checkbox" name="ol" {$OL_STATUS} value="1"/>
-        {'Ordered list : [ol][li]element[/li][/ol]'|@translate}
+        {'Ordered list : [ol][li]element[/li][/ol]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuPicture"><a>&nbsp;</a></span>
         <input type="checkbox" name="img" {$IMG_STATUS} value="1"/>
-        {'Picture : [img]picture[/img]'|@translate}
+        {'Picture : [img]picture[/img]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuLink"><a>&nbsp;</a></span>
         <input type="checkbox" name="url" {$URL_STATUS} value="1"/>
-        {'URL : [url=URL]Title[/url]'|@translate}
+        {'URL : [url=URL]Title[/url]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuMail"><a>&nbsp;</a></span>
         <input type="checkbox" name="email" {$EMAIL_STATUS} value="1"/>
-        {'E-mail : [email]Email[/email]'|@translate}
+        {'E-mail : [email]Email[/email]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuSize"><a>&nbsp;</a></span>
         <input type="checkbox" name="size" {$SIZE_STATUS} value="1"/>
-        {'Font size : [size=X]text[/size]'|@translate}
+        {'Font size : [size=X]text[/size]'|translate}
       </label></li>
       <li><label>
         <span class="miuIcon miuColors"><a>&nbsp;</a></span>
         <input type="checkbox" name="color" {$COLOR_STATUS} value="1"/>
-        {'Font color : [color=color]text[/color]'|@translate}
+        {'Font color : [color=color]text[/color]'|translate}
       </label></li>
     </ul>
   </fieldset>
   
-  <p class="formButtons"><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"/></p>
+  <p class="formButtons"><input class="submit" type="submit" value="{'Submit'|translate}" name="submit"/></p>
 </form>
