Index: /extensions/theme_switch/tags/2.1/flags.tpl
===================================================================
--- /extensions/theme_switch/tags/2.1/flags.tpl	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/flags.tpl	(revision 7172)
@@ -0,0 +1,48 @@
+</ul>
+<ul class="categoryActions">
+<li class="theme_menuf">
+	<div>
+		<ul>
+			<li>
+				<a rel="nofollow" href="#">
+					<img class="theme_flag" src="{$theme_switch.Active.img}" alt="{$theme_switch.Active.alt}" title="{$theme_switch.Active.alt}"/>
+				</a>
+				<!--[if lte IE 6]>
+					<a rel="nofollow" href="#">
+						<img class="theme_flag" src="{$theme_switch.Active.img}" alt="{$theme_switch.Active.alt}" title="{$theme_switch.Active.alt}"/>
+						<table>
+							<tr>
+								<td>
+				<![endif]-->
+									<ul class="theme_flag-pan">
+									{foreach from=$theme_switch.flags key=code item=flag name=f}
+										<li>
+											<a rel="nofollow" href="{$SCRIPT_NAME}{$flag.url}">
+												<img class="theme_flags" src="{$flag.img}" alt="{$flag.alt}" title="{$flag.alt}"/>
+											</a>
+										</li>
+									{/foreach}
+									</ul>
+				<!--[if lte IE 6]>
+								</td>
+							</tr>
+						</table>
+					</a>
+				<![endif]-->
+			</li>
+		</ul>
+	</div>
+</li>
+{html_head}
+{if $themeconf.name =='Sylvia'}
+<link rel="stylesheet" type="text/css" href="{$ROOT_URL}{$THEME_SWITCH_PATH|@cat:'theme_switch.css'}"> 
+{else}
+<link rel="stylesheet" type="text/css" href="{$ROOT_URL}{$THEME_SWITCH_PATH|@cat:'theme_switch-default.css'}"> 
+{/if}
+{if Componant_exists($theme_SWITCH_PATH, 'theme_switch-local.css')}
+<link rel="stylesheet" type="text/css" href="{$ROOT_URL}{$THEME_SWITCH_PATH|@cat:'theme_switch-local.css'}"> 
+{/if}
+<!--[if lte IE 6]>
+<link rel="stylesheet" type="text/css" href="{$ROOT_URL}{$THEME_SWITCH_PATH|@cat:'theme_switch-ie6.css'}"> 
+<![endif]-->
+{/html_head}
Index: /extensions/theme_switch/tags/2.1/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/cs_CZ/description.txt
===================================================================
--- /extensions/theme_switch/tags/2.1/language/cs_CZ/description.txt	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/cs_CZ/description.txt	(revision 7172)
@@ -0,0 +1,1 @@
+Umožní přihlášenému i nepřihlášenému uživateli měnit vzhled galerie (témata) přepínačem přímo na hlavní stránce galerie. Založeno na doplňku Laguage switch (přepnutí jazyka). Přepínač může být seznam názvů témat (výchozí nastavení), nebo icon témat, záleží na konfiguraci v souboru main.inc.php. 
Index: /extensions/theme_switch/tags/2.1/language/cs_CZ/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/cs_CZ/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/cs_CZ/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/cs_CZ/plugin.lang.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/cs_CZ/plugin.lang.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/cs_CZ/plugin.lang.php	(revision 7172)
@@ -0,0 +1,25 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Pavel Budka                http://pbudka.co.cc |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['theme'] = 'Téma:';
+
+?>
Index: /extensions/theme_switch/tags/2.1/language/de_DE/description.txt
===================================================================
--- /extensions/theme_switch/tags/2.1/language/de_DE/description.txt	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/de_DE/description.txt	(revision 7172)
@@ -0,0 +1,1 @@
+Ermöglicht angemeldete oder nicht angemeldete Benutzer die Veränderung des Galerie-Layouts (durch die Umstellung auf ein anderes Thema) auf der Galerie-Startseite. Basierend auf "Language switch". Der Schalter kann Themanamen oder Themasymbole zeigen, dies hängt von der Konfiguration ab. Details finden Sie in der Datei main.inc.php.
Index: /extensions/theme_switch/tags/2.1/language/de_DE/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/de_DE/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/de_DE/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/de_DE/plugin.lang.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/de_DE/plugin.lang.php	(revision 7172)
@@ -0,0 +1,24 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Pavel Budka                http://pbudka.co.cc |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['theme'] = "Thema:";
+?>
Index: /extensions/theme_switch/tags/2.1/language/en_UK/description.txt
===================================================================
--- /extensions/theme_switch/tags/2.1/language/en_UK/description.txt	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/en_UK/description.txt	(revision 7172)
@@ -0,0 +1,1 @@
+Lets logged or unlogged user change appearance of gallery (via switching to different theme) on gallery home page. Based on Language switch. The switch can show theme names or theme icons, depends on configuration. See details in a file main.inc.php.
Index: /extensions/theme_switch/tags/2.1/language/en_UK/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/en_UK/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/en_UK/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/en_UK/plugin.lang.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/en_UK/plugin.lang.php	(revision 7172)
@@ -0,0 +1,24 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Pavel Budka                http://pbudka.co.cc |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['theme'] = "Theme:";
+?>
Index: /extensions/theme_switch/tags/2.1/language/es_ES/description.txt
===================================================================
--- /extensions/theme_switch/tags/2.1/language/es_ES/description.txt	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/es_ES/description.txt	(revision 7172)
@@ -0,0 +1,4 @@
+Permite cambiar el aspecto visual de la galería en la
+página principal, tanto a usuarios identificados como anónimos, mediante la
+elección de otro ‘tema’. El cambio aplicará literales o iconos del tema,
+dependiendo de la configuración. Vea los detalles en main.inc.php
Index: /extensions/theme_switch/tags/2.1/language/es_ES/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/es_ES/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/es_ES/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/es_ES/plugin.lang.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/es_ES/plugin.lang.php	(revision 7172)
@@ -0,0 +1,24 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Pavel Budka                http://pbudka.co.cc |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['theme'] = 'Tema:';
+?>
Index: /extensions/theme_switch/tags/2.1/language/fr_FR/description.txt
===================================================================
--- /extensions/theme_switch/tags/2.1/language/fr_FR/description.txt	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/fr_FR/description.txt	(revision 7172)
@@ -0,0 +1,2 @@
+Permet de Changer de thèmes sur la galerie facilement (invité et utilisateurs) à partir d'icônes ou d'une liste présente sur la page d'accueil.
+Voir les détails dans un fichier main.inc.php.
Index: /extensions/theme_switch/tags/2.1/language/fr_FR/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/fr_FR/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/fr_FR/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/fr_FR/plugin.lang.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/fr_FR/plugin.lang.php	(revision 7172)
@@ -0,0 +1,24 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Pavel Budka                http://pbudka.co.cc |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['theme'] = "Thème:";
+?>
Index: /extensions/theme_switch/tags/2.1/language/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/it_IT/description.txt
===================================================================
--- /extensions/theme_switch/tags/2.1/language/it_IT/description.txt	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/it_IT/description.txt	(revision 7172)
@@ -0,0 +1,1 @@
+Consente agli utenti registrati o non registrati a modificare l'aspetto della galleria (attraverso lo scambio di diversi temi) sul sito della galleria. Il Plug-in è basato su "Language switch". Il switch può mostrare i nomi dei temi o le icone dei temi, a seconda dalla configurazione. Per ulteriori dettagli controllate il file main.inc.php.
Index: /extensions/theme_switch/tags/2.1/language/it_IT/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/it_IT/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/it_IT/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/it_IT/plugin.lang.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/it_IT/plugin.lang.php	(revision 7172)
@@ -0,0 +1,24 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Pavel Budka                http://pbudka.co.cc |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['theme'] = "Tema:";
+?>
Index: /extensions/theme_switch/tags/2.1/language/sk_SK/description.txt
===================================================================
--- /extensions/theme_switch/tags/2.1/language/sk_SK/description.txt	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/sk_SK/description.txt	(revision 7172)
@@ -0,0 +1,1 @@
+Nechá zaznamenané alebo nezaznamenané používateľské zmeny vzhľadu galérie (cez prepínač na rôzne témy) na úvodnej stránke galérie. Na základe Prepínača jazyka. Prepínač môže zobraziť názvy tém alebo ikony tém, záleží na konfigurácii. Pozrite detaily v súbore main.inc.php.
Index: /extensions/theme_switch/tags/2.1/language/sk_SK/index.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/sk_SK/index.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/sk_SK/index.php	(revision 7172)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/theme_switch/tags/2.1/language/sk_SK/plugin.lang.php
===================================================================
--- /extensions/theme_switch/tags/2.1/language/sk_SK/plugin.lang.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/language/sk_SK/plugin.lang.php	(revision 7172)
@@ -0,0 +1,25 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Pavel Budka                http://pbudka.co.cc |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['theme'] = 'Téma:';
+
+?>
Index: /extensions/theme_switch/tags/2.1/main.inc.php
===================================================================
--- /extensions/theme_switch/tags/2.1/main.inc.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/main.inc.php	(revision 7172)
@@ -0,0 +1,49 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010      Pavel Budka               http://budkovi.ic.cz |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Theme Switch
+Version: 2.1.
+Description: Lets logged or unlogged user change appearance of gallery (via switching to different theme) on gallery home page. Based on Language switch. The switch can show theme names or theme icons, depends on configuration. See details in a file main.inc.php.
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=257
+Author: Pavel Budka
+Author URI: http://budkovi.ic.cz
+*/
+
+include_once(PHPWG_PLUGINS_PATH.'theme_switch/theme_switch.inc.php');
+$theme_controler = new theme_controler();
+add_event_handler('loading_lang', array(&$theme_controler, '_switch'), 5 );
+
+// If you want user to choose from icons then use following handler. 
+// Only themes which have screenshot.png icon provided will be provided to users.
+
+add_event_handler('loc_end_index', array(&$theme_controler, '_flags'), 85 );
+
+// If you want user to choose using select control then use following handler.
+// All available themes will be provided to users. 
+
+add_event_handler('loc_end_index', array(&$theme_controler, '_select'), 15 );
+
+// this is preparation for future version with configuration 
+// add_event_handler('get_admin_plugin_menu_links', array(&$theme_controler,'_theme_admin'));
+
+?>
Index: /extensions/theme_switch/tags/2.1/theme_switch-default.css
===================================================================
--- /extensions/theme_switch/tags/2.1/theme_switch-default.css	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/theme_switch-default.css	(revision 7172)
@@ -0,0 +1,16 @@
+.theme_flag-pan { width:530px; z-index:800; border-width:1px; border-style: solid; background-color: #999; padding: 2px 5px 10px 5px; }
+.content ul.categoryActions .theme_flag-pan a img.theme_flags { margin: 5px 2px 10px; }
+.content ul.categoryActions .theme_flag-pan a { margin: 0; }
+.theme_menuf { width:40px; height:24px; display: inline; } 
+.theme_menuf ul li a, .theme_menuf ul li a:visited {display:block; text-decoration:none; overflow:hidden;}
+.theme_menuf ul {padding:0; margin:0; list-style: none;}
+.theme_menuf ul li {float:left; position:relative; right: 0; top: 0;}
+.theme_menuf ul li ul {display: none;}/* specific to non IE browsers */
+.theme_menuf li a:hover { border:0 !important;}
+.theme_menuf .theme_flags {width:100px !important; ; height:60px; text-align:center; line-height:80px; border-width:1px !important; ; border-style: solid !important; }
+.theme_menuf .theme_flag {width:44px; height:27px; line-height:27px; text-align:center; border-width:1px !important; ; border-style: solid !important; }
+.theme_menuf ul li:hover ul {display:block; position:absolute; top:0px; left:-420px; }
+.theme_menuf ul li:hover ul li ul {display: none;}
+.theme_menuf ul li:hover ul li {display: block;}
+.theme_menuf ul li:hover ul li a {display:block;}
+.theme_menuf ul li:hover ul li:hover ul {display:block; position:absolute; left:0; top:0;}
Index: /extensions/theme_switch/tags/2.1/theme_switch-ie6.css
===================================================================
--- /extensions/theme_switch/tags/2.1/theme_switch-ie6.css	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/theme_switch-ie6.css	(revision 7172)
@@ -0,0 +1,6 @@
+.theme_menuf ul li a.hide, .theme_menuf ul li a:visited.hide {display:none;}
+.theme_menuf ul li a:hover ul li a.hide {display:none;}
+.theme_menuf ul li a:hover ul { display:block; position:absolute; top:-15%; left:-85%; }
+.theme_menuf ul li a:hover ul li a {display:block; }
+.theme_menuf ul li a:hover ul li a ul {visibility:hidden;}
+.theme_menuf ul li a:hover ul li a:hover ul {visibility:visible; position:absolute; left:105px; top:0;}
Index: /extensions/theme_switch/tags/2.1/theme_switch.css
===================================================================
--- /extensions/theme_switch/tags/2.1/theme_switch.css	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/theme_switch.css	(revision 7172)
@@ -0,0 +1,8 @@
+@import "theme_switch-default.css";
+
+.theme_flag-pan { border:1px solid; background-color: #111; }
+.theme_menuf .theme_flags {border-color: #000 !important; }
+
+.theme_flag-pan { 	border-radius: 8px; } /* round corners with CSS3 compliant browsers */
+.theme_flag-pan { -moz-border-radius:8px; } 
+.theme_flag-pan { -webkit-border-radius: 8px; }
Index: /extensions/theme_switch/tags/2.1/theme_switch.inc.php
===================================================================
--- /extensions/theme_switch/tags/2.1/theme_switch.inc.php	(revision 7172)
+++ /extensions/theme_switch/tags/2.1/theme_switch.inc.php	(revision 7172)
@@ -0,0 +1,182 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// | Theme switch plugin                                                   |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010      Pavel Budka               http://budkovi.ic.cz |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+if (!defined('THEME_SWITCH_PATH'))
+define('THEME_SWITCH_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+
+include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
+
+class theme_controler {
+static public function _switch()
+{
+  global $user, $template, $conf;
+
+  load_language('plugin.lang', dirname(__FILE__).'/');
+
+  if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
+  $same = $user['theme'];
+  if ( isset( $_GET['theme']) ) 
+  {
+    if ( !empty($_GET['theme']) and
+      file_exists( PHPWG_ROOT_PATH.'themes/'.$_GET['theme']) )
+    {
+      if (is_a_guest() or is_generic())
+        setcookie( 'pwg_theme_switch', $_GET['theme'],
+          time()+60*60*24*30, cookie_path() );
+      else
+      {
+        $query = 'UPDATE '.USER_INFOS_TABLE.'
+        SET theme = \''.$_GET['theme'].'\'
+        WHERE user_id = '.$user['id'].'
+        ;';
+        pwg_query($query);
+      }
+      $user['theme'] = $_GET['theme'];
+    }
+  }
+  else
+  // Users have $user['template']/$user['theme'] 
+  // Guest or generic members will use their cookied $user['template']/$user['theme'] !
+  if ((is_a_guest() or is_generic())
+    and isset( $_COOKIE['pwg_theme_switch'] ) )
+  {
+    $user['theme'] = $_COOKIE['pwg_theme_switch'];
+  }
+} // function _switch()
+
+static public function _installed_themes()
+// id, name, screenshot  
+{
+$themes = new themes();
+$themes->sort_fs_themes();
+$db_themes = $themes->get_db_themes();
+$db_theme_ids = array();
+foreach ($db_themes as $db_theme)
+{
+  array_push($db_theme_ids, $db_theme['id']);
+}
+
+$active_themes = array();
+
+
+foreach ($themes->fs_themes as $theme_id => $fs_theme)
+{
+  if (in_array($theme_id, $db_theme_ids))
+      array_push($active_themes, $fs_theme);
+}
+
+return $active_themes;
+} // function  _installed_themes()
+
+
+static public function _flags()
+// Lets user choose from icons 
+// Only themes which have gif icon provided in icons plugin directory will be provided to users.
+// Gif file name must be the same as theme's name and must be stored in sub directory named according to template's name.  
+{
+  global $user, $template, $conf, $lang;
+  
+  $available_theme = get_pwg_themes();
+
+  $url_starting = get_query_string_diff(array('theme'));
+  
+  foreach ( theme_controler::_installed_themes() as $theme ) {
+    $qlc_img =  $theme['screenshot']; // $conf['themes_dir'].'/'.$theme_id.'/'.'screenshot.png';
+         
+    if (file_exists($qlc_img)) {
+      
+      $qlc_url = str_replace(array('=&amp;','?&amp;'),array('&amp;','?'),
+                 add_url_params( $url_starting, array( 'theme' => $theme['id'] )));
+      if (isset($lang['theme']))
+        $qlc_alt = $lang['theme'].' '.ucwords( $theme['name'] );
+      else
+        $qlc_alt = ucwords( $theme['name'] );
+      $qlc_title =  $qlc_alt;
+      $qlc = array ( 
+        'url' => $qlc_url,
+        'alt' => $qlc_alt,
+        'img' => $qlc_img,
+        );
+      if ( $theme['id'] !== $user['theme'])
+        $lsw['flags'][$theme['id']] = $qlc ;
+      else $lsw['Active'] = $qlc;
+      }
+  } 
+    
+  $template->set_filename('theme_flags', dirname(__FILE__) . '/flags.tpl');
+  $lsw['side'] = ceil(sqrt(count($available_theme)));
+  $template->assign(array(
+    'theme_switch'=> $lsw,
+    'THEME_SWITCH_PATH' => THEME_SWITCH_PATH,
+  ));
+  $flags = $template->parse('theme_flags',true);
+  $template->clear_assign('theme_switch');
+  $template->concat( 'PLUGIN_INDEX_ACTIONS', $flags);
+} // function _flags()
+
+
+static public function _select()
+// Lets user choose using select control 
+// All available themes will be provided to users. 
+{
+  global $user, $template, $lang;
+  
+  $available_theme = get_pwg_themes();
+  $url_starting = get_query_string_diff(array('theme'));
+  $options='<li class="selector">'
+   .$lang['theme'].
+    '&nbsp;<select onchange="javasript:window.location=this.value">';
+  foreach ( theme_controler::_installed_themes() as $theme )
+  {
+    $qlc_url = str_replace(array('=&amp;','?&amp;'),array('&amp;','?'),
+      add_url_params( $url_starting, array( 'theme' => $theme['id']  ) ));
+    
+    if ( $theme['id'] == $user['theme'] )
+      $tmp='" selected="selected">';
+    else
+      $tmp='">';
+    $options=$options.'
+    <option label="'.$theme['name'].'" value="'.$qlc_url.$tmp.$theme['name'].'</option>';
+  }
+  $options=$options.'
+  </select></li>';
+  $template->concat( 'PLUGIN_INDEX_ACTIONS',$options);
+} //  function _select() 
+
+static public function _theme_admin($menu)
+// adds menu options for future configuration 
+{
+//  load_language('plugin.lang', dirname(__FILE__).'/');
+  array_push($menu, array('NAME' => 'Theme Switch',
+    'URL' => get_admin_plugin_menu_link(THEME_SWITCH_PATH.'admin/admin.php')));
+  return $menu;
+} // function _theme_admin()
+
+} // class theme_controler
+
+  /* {html_head} usage function */
+  /* See flags.tpl for example (due no catenation available) */
+if (!function_exists('Componant_exists')) {
+  function Componant_exists($path, $file)
+    { return file_exists( $path . $file); }
+}
+
+?>
