Index: themes/berlin/_define.php
===================================================================
--- themes/berlin/_define.php	(revision 3427)
+++ themes/berlin/_define.php	(revision 3531)
@@ -15,5 +15,5 @@
 	/* Description*/		"Dotclear 2.7+ default theme",
 	/* Author */			"Dotclear Team",
-	/* Version */			'1.1',
+	/* Version */			'1.2',
 	/* Properties */		array(
 								'type' => 'theme',
Index: themes/berlin/_public.php
===================================================================
--- themes/berlin/_public.php	(revision 3427)
+++ themes/berlin/_public.php	(revision 3531)
@@ -1,3 +1,5 @@
 <?php
+namespace themes\berlin;
+
 # -- BEGIN LICENSE BLOCK ---------------------------------------
 # This file is part of Berlin, a theme for Dotclear
@@ -11,8 +13,8 @@
 if (!defined('DC_RC_PATH')) { return; }
 
-l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main');
+\l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main');
 //__('Show menu').__('Hide menu').__('Navigation');
 
-$core->addBehavior('publicHeadContent',array('behaviorBerlinTheme','publicHeadContent'));
+$core->addBehavior('publicHeadContent',array(__NAMESPACE__.'\behaviorBerlinTheme','publicHeadContent'));
 
 class behaviorBerlinTheme
@@ -20,7 +22,5 @@
 	public static function publicHeadContent()
 	{
-//		global $core,$_ctx;
-
-		echo dcUtils::jsVars(array(
+		echo \dcUtils::jsVars(array(
 			'dotclear_berlin_show_menu' => __('Show menu'),
 			'dotclear_berlin_hide_menu' => __('Hide menu'),
Index: themes/customCSS/_define.php
===================================================================
--- themes/customCSS/_define.php	(revision 2566)
+++ themes/customCSS/_define.php	(revision 3531)
@@ -16,5 +16,5 @@
 	/* Description*/		"A CSS customizable theme",
 	/* Author */			"Olivier",
-	/* Version */			'1.1',
+	/* Version */			'1.2',
 	array(
 		'type'		=>		'theme'
Index: themes/customCSS/_public.php
===================================================================
--- themes/customCSS/_public.php	(revision 2566)
+++ themes/customCSS/_public.php	(revision 3531)
@@ -1,3 +1,5 @@
 <?php
+namespace themes\customcss;
+
 # -- BEGIN LICENSE BLOCK ---------------------------------------
 #
@@ -12,5 +14,5 @@
 if (!defined('DC_RC_PATH')) { return; }
 
-$core->addBehavior('publicHeadContent',array('tplCustomTheme','publicHeadContent'));
+$core->addBehavior('publicHeadContent',array(__NAMESPACE__.'\tplCustomTheme','publicHeadContent'));
 
 class tplCustomTheme
Index: themes/ductile/_define.php
===================================================================
--- themes/ductile/_define.php	(revision 2581)
+++ themes/ductile/_define.php	(revision 3531)
@@ -15,5 +15,5 @@
 	/* Description*/		"Mediaqueries compliant elegant theme",
 	/* Author */			"Dotclear Team",
-	/* Version */			'1.4',
+	/* Version */			'1.5',
 	/* Properties */		array(
 								'standalone_config' => true,
Index: themes/ductile/_prepend.php
===================================================================
--- themes/ductile/_prepend.php	(revision 3421)
+++ themes/ductile/_prepend.php	(revision 3531)
@@ -1,3 +1,5 @@
 <?php
+namespace themes\ductile;
+
 # -- BEGIN LICENSE BLOCK ---------------------------------------
 # This file is part of Ductile, a theme for Dotclear
@@ -17,5 +19,5 @@
 
 # Behaviors
-$GLOBALS['core']->addBehavior('adminPageHTMLHead',array('tplDuctileThemeAdmin','adminPageHTMLHead'));
+$GLOBALS['core']->addBehavior('adminPageHTMLHead',array(__NAMESPACE__.'\tplDuctileThemeAdmin','adminPageHTMLHead'));
 
 class tplDuctileThemeAdmin
@@ -30,6 +32,6 @@
 		if (!$core->auth->user_prefs->accessibility->nodragdrop) {
 			echo
-				dcPage::jsLoad('js/jquery/jquery-ui.custom.js').
-				dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js');
+				\dcPage::jsLoad('js/jquery/jquery-ui.custom.js').
+				\dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js');
 				echo <<<EOT
 <script type="text/javascript">
Index: themes/ductile/_public.php
===================================================================
--- themes/ductile/_public.php	(revision 2716)
+++ themes/ductile/_public.php	(revision 3531)
@@ -1,3 +1,5 @@
 <?php
+namespace themes\ductile;
+
 # -- BEGIN LICENSE BLOCK ---------------------------------------
 # This file is part of Ductile, a theme for Dotclear
@@ -12,16 +14,16 @@
 if (!defined('DC_RC_PATH')) { return; }
 
-l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main');
+\l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main');
 
 # Behaviors
-$core->addBehavior('publicHeadContent',array('tplDuctileTheme','publicHeadContent'));
-$core->addBehavior('publicInsideFooter',array('tplDuctileTheme','publicInsideFooter'));
+$core->addBehavior('publicHeadContent',array(__NAMESPACE__.'\tplDuctileTheme','publicHeadContent'));
+$core->addBehavior('publicInsideFooter',array(__NAMESPACE__.'\tplDuctileTheme','publicInsideFooter'));
 
 # Templates
-$core->tpl->addValue('ductileEntriesList',array('tplDuctileTheme','ductileEntriesList'));
-$core->tpl->addBlock('EntryIfContentIsCut',array('tplDuctileTheme','EntryIfContentIsCut'));
-$core->tpl->addValue('ductileNbEntryPerPage',array('tplDuctileTheme','ductileNbEntryPerPage'));
-$core->tpl->addValue('ductileLogoSrc',array('tplDuctileTheme','ductileLogoSrc'));
-$core->tpl->addBlock('IfPreviewIsNotMandatory',array('tplDuctileTheme','IfPreviewIsNotMandatory'));
+$core->tpl->addValue('ductileEntriesList',array(__NAMESPACE__.'\tplDuctileTheme','ductileEntriesList'));
+$core->tpl->addBlock('EntryIfContentIsCut',array(__NAMESPACE__.'\tplDuctileTheme','EntryIfContentIsCut'));
+$core->tpl->addValue('ductileNbEntryPerPage',array(__NAMESPACE__.'\tplDuctileTheme','ductileNbEntryPerPage'));
+$core->tpl->addValue('ductileLogoSrc',array(__NAMESPACE__.'\tplDuctileTheme','ductileLogoSrc'));
+$core->tpl->addBlock('IfPreviewIsNotMandatory',array(__NAMESPACE__.'\tplDuctileTheme','IfPreviewIsNotMandatory'));
 
 class tplDuctileTheme
@@ -29,5 +31,5 @@
 	public static function ductileNbEntryPerPage($attr)
 	{
-		return '<?php tplDuctileTheme::ductileNbEntryPerPageHelper(); ?>';
+		return '<?php '.__NAMESPACE__.'\tplDuctileTheme::ductileNbEntryPerPageHelper(); ?>';
 	}
 
@@ -110,5 +112,5 @@
 
 		// Get all _entry-*.html in tpl folder of theme
-		$list_types_templates = files::scandir($tpl_path);
+		$list_types_templates = \files::scandir($tpl_path);
 		if (is_array($list_types_templates)) {
 			foreach ($list_types_templates as $v) {
@@ -126,5 +128,5 @@
 		$default = isset($attr['default']) ? trim($attr['default']) : 'short';
 		$ret = '<?php '."\n".
-			'switch (tplDuctileTheme::ductileEntriesListHelper(\''.$default.'\')) {'."\n";
+			'switch ('.__NAMESPACE__.'\tplDuctileTheme::ductileEntriesListHelper(\''.$default.'\')) {'."\n";
 
 		foreach ($list_types as $v) {
@@ -159,5 +161,5 @@
 	public static function ductileLogoSrc($attr)
 	{
-		return '<?php echo tplDuctileTheme::ductileLogoSrcHelper(); ?>';
+		return '<?php echo '.__NAMESPACE__.'\tplDuctileTheme::ductileLogoSrcHelper(); ?>';
 	}
 
@@ -225,5 +227,5 @@
 				$default = true;
 			} else {
-				$s = array_filter($s,array('tplDuctileTheme', 'cleanStickers'));
+				$s = array_filter($s,'self::cleanStickers');
 				if (count($s) == 0) {
 					$default = true;
@@ -317,5 +319,5 @@
 				# Main font
 				$selectors = 'body, .supranav li a span, #comments.me, a.comment-number';
-				dcThemeConfig::prop($css,$selectors,'font-family',$s['body_webfont_family']);
+				\dcThemeConfig::prop($css,$selectors,'font-family',$s['body_webfont_family']);
 			}
 		}
@@ -335,5 +337,5 @@
 				# Secondary font
 				$selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer';
-				dcThemeConfig::prop($css,$selectors,'font-family',$s['alternate_webfont_family']);
+				\dcThemeConfig::prop($css,$selectors,'font-family',$s['alternate_webfont_family']);
 			}
 		}
@@ -373,25 +375,25 @@
 		# Blog description
 		$selectors = '#blogdesc';
-		if (isset($s['subtitle_hidden'])) dcThemeConfig::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null));
+		if (isset($s['subtitle_hidden'])) \dcThemeConfig::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null));
 
 		# Main font
 		$selectors = 'body, .supranav li a span, #comments.me, a.comment-number';
-		if (isset($s['body_font'])) dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['body_font']));
+		if (isset($s['body_font'])) \dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['body_font']));
 
 		# Secondary font
 		$selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer';
-		if (isset($s['alternate_font'])) dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font']));
+		if (isset($s['alternate_font'])) \dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font']));
 
 		# Inside posts links font weight
 		$selectors = '.post-excerpt a, .post-content a';
-		if (isset($s['post_link_w'])) dcThemeConfig::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal'));
+		if (isset($s['post_link_w'])) \dcThemeConfig::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal'));
 
 		# Inside posts links colors (normal, visited)
 		$selectors = '.post-excerpt a:link, .post-excerpt a:visited, .post-content a:link, .post-content a:visited';
-		if (isset($s['post_link_v_c'])) dcThemeConfig::prop($css,$selectors,'color',$s['post_link_v_c']);
+		if (isset($s['post_link_v_c'])) \dcThemeConfig::prop($css,$selectors,'color',$s['post_link_v_c']);
 
 		# Inside posts links colors (hover, active, focus)
 		$selectors = '.post-excerpt a:hover, .post-excerpt a:active, .post-excerpt a:focus, .post-content a:hover, .post-content a:active, .post-content a:focus';
-		if (isset($s['post_link_f_c'])) dcThemeConfig::prop($css,$selectors,'color',$s['post_link_f_c']);
+		if (isset($s['post_link_f_c'])) \dcThemeConfig::prop($css,$selectors,'color',$s['post_link_f_c']);
 
 		# Style directives
@@ -410,29 +412,29 @@
 		# Blog title font weight
 		$selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus';
-		if (isset($s['blog_title_w'])) dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal'));
+		if (isset($s['blog_title_w'])) \dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal'));
 
 		# Blog title font size
 		$selectors = 'h1';
-		if (isset($s['blog_title_s'])) dcThemeConfig::prop($css_large,$selectors,'font-size',$s['blog_title_s']);
+		if (isset($s['blog_title_s'])) \dcThemeConfig::prop($css_large,$selectors,'font-size',$s['blog_title_s']);
 
 		# Blog title color
 		$selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus';
-		if (isset($s['blog_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['blog_title_c']);
+		if (isset($s['blog_title_c'])) \dcThemeConfig::prop($css_large,$selectors,'color',$s['blog_title_c']);
 
 		# Post title font weight
 		$selectors = 'h2.post-title, h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus';
-		if (isset($s['post_title_w'])) dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal'));
+		if (isset($s['post_title_w'])) \dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal'));
 
 		# Post title font size
 		$selectors = 'h2.post-title';
-		if (isset($s['post_title_s'])) dcThemeConfig::prop($css_large,$selectors,'font-size',$s['post_title_s']);
+		if (isset($s['post_title_s'])) \dcThemeConfig::prop($css_large,$selectors,'font-size',$s['post_title_s']);
 
 		# Post title color
 		$selectors = 'h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus';
-		if (isset($s['post_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['post_title_c']);
+		if (isset($s['post_title_c'])) \dcThemeConfig::prop($css_large,$selectors,'color',$s['post_title_c']);
 
 		# Simple title color (title without link)
 		$selectors = '#content-info h2, .post-title, .post h3, .post h4, .post h5, .post h6, .arch-block h3';
-		if (isset($s['post_simple_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['post_simple_title_c']);
+		if (isset($s['post_simple_title_c'])) \dcThemeConfig::prop($css_large,$selectors,'color',$s['post_simple_title_c']);
 
 		# Style directives for large screens
@@ -454,25 +456,25 @@
 		# Blog title font weight
 		$selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus';
-		if (isset($s['blog_title_w_m'])) dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal'));
+		if (isset($s['blog_title_w_m'])) \dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal'));
 
 		# Blog title font size
 		$selectors = 'h1';
-		if (isset($s['blog_title_s_m'])) dcThemeConfig::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']);
+		if (isset($s['blog_title_s_m'])) \dcThemeConfig::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']);
 
 		# Blog title color
 		$selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus';
-		if (isset($s['blog_title_c_m'])) dcThemeConfig::prop($css_small,$selectors,'color',$s['blog_title_c_m']);
+		if (isset($s['blog_title_c_m'])) \dcThemeConfig::prop($css_small,$selectors,'color',$s['blog_title_c_m']);
 
 		# Post title font weight
 		$selectors = 'h2.post-title, h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus';
-		if (isset($s['post_title_w_m'])) dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal'));
+		if (isset($s['post_title_w_m'])) \dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal'));
 
 		# Post title font size
 		$selectors = 'h2.post-title';
-		if (isset($s['post_title_s_m'])) dcThemeConfig::prop($css_small,$selectors,'font-size',$s['post_title_s_m']);
+		if (isset($s['post_title_s_m'])) \dcThemeConfig::prop($css_small,$selectors,'font-size',$s['post_title_s_m']);
 
 		# Post title color
 		$selectors = 'h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus';
-		if (isset($s['post_title_c_m'])) dcThemeConfig::prop($css_small,$selectors,'color',$s['post_title_c_m']);
+		if (isset($s['post_title_c_m'])) \dcThemeConfig::prop($css_small,$selectors,'color',$s['post_title_c_m']);
 
 		# Style directives for small screens
