Index: /extensions/bbcode_bar/bbcode_bar.inc.php
===================================================================
--- /extensions/bbcode_bar/bbcode_bar.inc.php	(revision 15997)
+++ /extensions/bbcode_bar/bbcode_bar.inc.php	(revision 15998)
@@ -3,5 +3,5 @@
 
 // add BBCodeBar to textarea
-function set_bbcode_bar()
+function set_bbcode_bar($prefilter='picture')
 {
   global $template, $conf, $pwg_loaded_plugins, $page;
@@ -17,5 +17,5 @@
 
   $template->assign('BBCODE_PATH', BBcode_PATH);
-  $template->set_prefilter('picture', 'set_bbcode_bar_prefilter');    
+  $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
@@ -23,5 +23,5 @@
   {
     $template->assign('BBC_smilies', true);
-    set_smiliessupport();
+    set_smiliessupport($prefilter);
   }  
 }
@@ -29,7 +29,7 @@
 function set_bbcode_bar_prefilter($content, &$smarty)
 {
-  $search = '<div id="commentAdd">';
-  $replace = file_get_contents(BBcode_PATH.'/template/bbcode_bar.tpl').$search;
-  return str_replace($search, $replace, $content);
+  $search = '#(<div id="guestbookAdd">|<div id="commentAdd">)#';
+  $replace = file_get_contents(BBcode_PATH.'/template/bbcode_bar.tpl').'$1';
+  return preg_replace($search, $replace, $content);
 }
 
Index: /extensions/bbcode_bar/index.php
===================================================================
--- /extensions/bbcode_bar/index.php	(revision 15997)
+++ /extensions/bbcode_bar/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/ar_SA/index.php
===================================================================
--- /extensions/bbcode_bar/language/ar_SA/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/ar_SA/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/ca_ES/index.php
===================================================================
--- /extensions/bbcode_bar/language/ca_ES/index.php	(revision 15998)
+++ /extensions/bbcode_bar/language/ca_ES/index.php	(revision 15998)
@@ -0,0 +1,7 @@
+<?php
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/bbcode_bar/language/cs_CZ/index.php
===================================================================
--- /extensions/bbcode_bar/language/cs_CZ/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/cs_CZ/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/de_DE/index.php
===================================================================
--- /extensions/bbcode_bar/language/de_DE/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/de_DE/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/en_UK/index.php
===================================================================
--- /extensions/bbcode_bar/language/en_UK/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/en_UK/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/es_ES/index.php
===================================================================
--- /extensions/bbcode_bar/language/es_ES/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/es_ES/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/fr_FR/index.php
===================================================================
--- /extensions/bbcode_bar/language/fr_FR/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/fr_FR/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/hu_HU/index.php
===================================================================
--- /extensions/bbcode_bar/language/hu_HU/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/hu_HU/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/index.php
===================================================================
--- /extensions/bbcode_bar/language/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/it_IT/index.php
===================================================================
--- /extensions/bbcode_bar/language/it_IT/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/it_IT/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/lv_LV/index.php
===================================================================
--- /extensions/bbcode_bar/language/lv_LV/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/lv_LV/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/nb_NO/index.php
===================================================================
--- /extensions/bbcode_bar/language/nb_NO/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/nb_NO/index.php	(revision 15998)
@@ -1,25 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
 // Recursive call
 $url = '../';
Index: /extensions/bbcode_bar/language/nl_NL/index.php
===================================================================
--- /extensions/bbcode_bar/language/nl_NL/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/nl_NL/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/pl_PL/index.php
===================================================================
--- /extensions/bbcode_bar/language/pl_PL/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/pl_PL/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/pt_PT/index.php
===================================================================
--- /extensions/bbcode_bar/language/pt_PT/index.php	(revision 15998)
+++ /extensions/bbcode_bar/language/pt_PT/index.php	(revision 15998)
@@ -0,0 +1,7 @@
+<?php
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/bbcode_bar/language/ru_RU/index.php
===================================================================
--- /extensions/bbcode_bar/language/ru_RU/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/ru_RU/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/sk_SK/index.php
===================================================================
--- /extensions/bbcode_bar/language/sk_SK/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/sk_SK/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/language/uk_UA/index.php
===================================================================
--- /extensions/bbcode_bar/language/uk_UA/index.php	(revision 15998)
+++ /extensions/bbcode_bar/language/uk_UA/index.php	(revision 15998)
@@ -0,0 +1,7 @@
+<?php
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/bbcode_bar/language/zh_CN/index.php
===================================================================
--- /extensions/bbcode_bar/language/zh_CN/index.php	(revision 15997)
+++ /extensions/bbcode_bar/language/zh_CN/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/main.inc.php
===================================================================
--- /extensions/bbcode_bar/main.inc.php	(revision 15997)
+++ /extensions/bbcode_bar/main.inc.php	(revision 15998)
@@ -26,9 +26,25 @@
 function add_bbcode_bar() 
 {
-  global $page;
+  global $page, $pwg_loaded_plugins;
   
   if (isset($page['body_id']) AND $page['body_id'] == 'thePicturePage') 
   {
-    set_bbcode_bar();
+    $prefilter = 'picture';
+  }
+  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';
+  }
+  else if (isset($_GET['/guestbook'])) 
+  {
+    $prefilter = 'index';
+  }
+  
+  if (isset($prefilter))
+  {
+    set_bbcode_bar($prefilter);
   }
 }
Index: /extensions/bbcode_bar/template/bbcode_bar.tpl
===================================================================
--- /extensions/bbcode_bar/template/bbcode_bar.tpl	(revision 15997)
+++ /extensions/bbcode_bar/template/bbcode_bar.tpl	(revision 15998)
@@ -47,15 +47,15 @@
     {ldelim}name:'{'Font color : [color=color]text[/color]'|@translate}', className:'markItUpColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]', 
       dropMenu: [
-        {ldelim}name:'{'Yellow'|@translate}', openWith:'[color=yellow]', closeWidth:'[/color]', className:"col1-1" },
-        {ldelim}name:'{'Orange'|@translate}', openWith:'[color=orange]', closeWidth:'[/color]', className:"col1-2" },
-        {ldelim}name:'{'Red'|@translate}', openWith:'[color=red]', closeWidth:'[/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]', closeWidth:'[/color]', className:"col2-1" },
-        {ldelim}name:'{'Purple'|@translate}', openWith:'[color=purple]', closeWidth:'[/color]', className:"col2-2" },
-        {ldelim}name:'{'Green'|@translate}', openWith:'[color=green]', closeWidth:'[/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]', closeWidth:'[/color]', className:"col3-1" },
-        {ldelim}name:'{'Grey'|@translate}', openWith:'[color=gray]', closeWidth:'[/color]', className:"col3-2" },
-        {ldelim}name:'{'Black'|@translate}', openWith:'[color=black]', closeWidth:'[/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" }
       ]
     },
Index: /extensions/bbcode_bar/template/index.php
===================================================================
--- /extensions/bbcode_bar/template/index.php	(revision 15997)
+++ /extensions/bbcode_bar/template/index.php	(revision 15998)
@@ -1,26 +1,3 @@
 <?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
 $url = '../';
 header( 'Request-URI: '.$url );
Index: /extensions/bbcode_bar/template/markitup/images/index.php
===================================================================
--- /extensions/bbcode_bar/template/markitup/images/index.php	(revision 15998)
+++ /extensions/bbcode_bar/template/markitup/images/index.php	(revision 15998)
@@ -0,0 +1,7 @@
+<?php
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/bbcode_bar/template/markitup/index.php
===================================================================
--- /extensions/bbcode_bar/template/markitup/index.php	(revision 15998)
+++ /extensions/bbcode_bar/template/markitup/index.php	(revision 15998)
@@ -0,0 +1,7 @@
+<?php
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/bbcode_bar/template/markitup/style.markitup.css
===================================================================
--- /extensions/bbcode_bar/template/markitup/style.markitup.css	(revision 15997)
+++ /extensions/bbcode_bar/template/markitup/style.markitup.css	(revision 15998)
@@ -19,5 +19,4 @@
   font:12px 'Courier New', Courier, monospace;
   padding:5px;
-  clear:both;
   overflow:auto;
 }
