Index: plugins/aboutConfig/_admin.php
===================================================================
--- plugins/aboutConfig/_admin.php	(revision 1315)
+++ plugins/aboutConfig/_admin.php	(revision 1294)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -12,8 +12,6 @@
 if (!defined('DC_CONTEXT_ADMIN')) { return; }
 
-$_menu['Plugins']->addItem('about:config','plugin.php?p=aboutConfig','index.php?pf=aboutConfig/icon.png',
+$_menu['System']->addItem('about:config','plugin.php?p=aboutConfig','index.php?pf=aboutConfig/icon.png',
 		preg_match('/plugin.php\?p=aboutConfig(&.*)?$/',$_SERVER['REQUEST_URI']),
 		$core->auth->isSuperAdmin());
-
-$core->tpl->getLoader()->addPath(dirname(__FILE__).'/admtpl/','aboutConfig');
 ?>
Index: plugins/aboutConfig/admtpl/index.html.twig
===================================================================
--- plugins/aboutConfig/admtpl/index.html.twig	(revision 1147)
+++ 	(revision )
@@ -1,80 +1,0 @@
-{% extends "layout.html.twig" %}
-
-{% block header %}
-  {{ parent() }}
-  {{ init_tabs() }}
-  <link rel="stylesheet" href="{{plugin_url}}aboutConfig/style/aboutConfig.css" type="text/css" media="screen" />
-  <script type="text/javascript" src="{{plugin_url}}aboutConfig/js/aboutConfig.js"></script>
-{% endblock %}
-
-{%block content %}
-  {{ parent() }}
-
-  {% tab local('local',__('blog settings')) %}
-    {% if local_settings is not empty %}
-    {% form 'local_nav_form' %}
-	<p class="anchor-nav">{{ form_field('local_nav') }} {{ form_field('local_nav_submit') }}</p>
-    {% endform %}
-    {% endif %}
-
-    {% form 'local_settings_form' %}
-    {% for ns, setting in local_settings %}
-	<table class="settings" id="local_{{ ns }}"><caption>{{ ns }}</caption>
-	<thead>
-	<tr>
-	<th class="nowrap">Setting ID</th>
-	<th>{{__('Value')}}</th>
-	<th>{{__('Type')}}</th>
-	<th class="maximal">{{__('Description')}}</th>
-	</tr>
-	</thead>
-	<tbody>
-    {% for key,value in setting %}
-    {% set fname = 'local_' ~ ns ~ '_' ~ key %}
-	<tr>
-	<td scope="raw"><label for="{{ fname }}">{% if value.global %}<strong>{{ key }}</strong>{% else %}{{ key }}{% endif %}</label></td>
-	<td>{% if value.type == 'boolean' %}{{ form_field(fname) }}{% else %}{{ form_field(fname,{'size':40}) }}{% endif %}</td>
-	<td>{{ value.type }}</td>
-	<td>{{ value.label }}</td>
-	</tr>
-    {% endfor %}
-	</tbody></table>
-    {% endfor %}
-	<p>{{ form_field('local_submit') }}</p>
-    {% endform %}
-  {% endtab %}
-
-  {% tab global('global',__('global settings')) %}
-    {% if global_settings is not empty %}
-    {% form 'global_nav_form' %}
-	<p class="anchor-nav">{{ form_field('global_nav') }} {{ form_field('global_nav_submit') }}</p>
-    {% endform %}
-    {% endif %}
-
-    {% form 'global_settings_form' %}
-    {% for ns, setting in global_settings %}
-	<table class="settings" id="global_{{ ns }}"><caption>{{ ns }}</caption>
-	<thead>
-	<tr>
-	<th class="nowrap">Setting ID</th>
-	<th>{{__('Value')}}</th>
-	<th>{{__('Type')}}</th>
-	<th class="maximal">{{__('Description')}}</th>
-	</tr>
-	</thead><tbody>
-    {% for key,value in setting %}
-    {% set fname = 'global_' ~ ns ~ '_' ~ key %}
-	<tr>
-	<td scope="raw"><label for="{{ fname }}">{{ key }}</label></td>
-	<td>{% if value.type == 'boolean' %}{{ form_field(fname) }}{% else %}{{ form_field(fname,{'size':40}) }}{% endif %}</td>
-	<td>{{ value.type }}</td>
-	<td>{{ value.label }}</td>
-	</tr>
-    {% endfor %}
-	</tbody></table>
-    {% endfor %}
-	<p>{{ form_field('global_submit') }}</p>
-    {% endform %}
-  {% endtab %}
-
-{% endblock %}
Index: plugins/aboutConfig/index.php
===================================================================
--- plugins/aboutConfig/index.php	(revision 1315)
+++ plugins/aboutConfig/index.php	(revision 1312)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -12,136 +12,229 @@
 if (!defined('DC_CONTEXT_ADMIN')) { return; }
 
-class adminPageAboutConfig
-{
-	public static $p_url = 'plugin.php?p=aboutConfig';
-	
-	# Update local settings
-	public static function updLocal($form)
-	{
-		self::updSettings($form);
-	}
-	
-	# Update global settings
-	public static function updGlobal($form)
-	{
-		self::updSettings($form,true);
-	}
-	
-	# Update settings
-	protected static function updSettings($form,$global=false)
-	{
-		global $core,$_ctx;
-		
-		$part = $global ? 'global' : 'local';
-		$prefix = $part.'_';
-		
-		try {
-			foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) {
-				$core->blog->settings->addNamespace($ns);
-				$ns_settings = $global ? 
-					$namespace->dumpGlobalSettings() : $namespace->dumpSettings();
-				
-				foreach ($ns_settings as $k => $v) {
-					// need to cast type
-					$f = (string) $form->{$prefix.$ns.'_'.$k};
-					settype($f,$v['type']);
-					
-					$core->blog->settings->$ns->put($k,$f,null,null,true,$global);
-					$form->{$prefix.$ns.'_'.$k} = $f;
-				}
+# Local navigation
+if (!empty($_POST['gs_nav'])) {
+	http::redirect($p_url.$_POST['gs_nav']);
+	exit;
+}
+if (!empty($_POST['ls_nav'])) {
+	http::redirect($p_url.$_POST['ls_nav']);
+	exit;
+}
+
+# Local settings update
+if (!empty($_POST['s']) && is_array($_POST['s']))
+{
+	try
+	{
+		foreach ($_POST['s'] as $ns => $s)
+		{
+			$core->blog->settings->addNamespace($ns);
+			
+			foreach ($s as $k => $v) 	{
+				$core->blog->settings->$ns->put($k,$v);
 			}
+			
 			$core->blog->triggerBlog();
-			
-			http::redirect(self::$p_url.'&upd=1&part='.$part);
-		}
-		catch (Exception $e) {
-			$_ctx->addError($e->getMessage());
-		}
-	}
-	
-	# Set nav and settings forms
-	public static function setForms($global=false)
-	{
-		global $core, $_ctx;
-		
-		$prefix = $global ? 'global_' : 'local_';
-		$action = $global ? 'updGlobal' : 'updLocal';
-		
-		if (!empty($_POST[$prefix.'nav'])) {
-			http::redirect(self::$p_url.$_POST[$prefix.'nav']);
-			exit;
 		}
 		
-		$nav_form = new dcForm($core,$prefix.'nav_form','plugin.php');
-		$settings_form = new dcForm($core,$prefix.'settings_form','plugin.php');
-		
-		$settings = $combo = array();
-		foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) {
-			$ns_settings = $global ? 
-				$namespace->dumpGlobalSettings() : $namespace->dumpSettings();
-			
-			foreach ($ns_settings as $k => $v) {
-				$settings[$ns][$k] = $v;
+		http::redirect($p_url.'&upd=1');
+	}
+	catch (Exception $e)
+	{
+		$core->error->add($e->getMessage());
+	}
+}
+
+# Global settings update
+if (!empty($_POST['gs']) && is_array($_POST['gs']))
+{
+	try
+	{
+		foreach ($_POST['gs'] as $ns => $s)
+		{
+			$core->blog->settings->addNamespace($ns);
+			
+			foreach ($s as $k => $v) 	{
+				$core->blog->settings->$ns->put($k,$v,null,null,true,true);
 			}
+			
+			$core->blog->triggerBlog();
 		}
 		
-		ksort($settings);
-		foreach ($settings as $ns => $s) {
-			$combo['#'.$prefix.$ns] = $ns;
-			ksort($s);
-			foreach ($s as $k => $v)	{
-				if ($v['type'] == 'boolean') {
-					$settings_form->addField(
-						new dcFieldCombo($prefix.$ns.'_'.$k,
-							'',array(1 => __('yes'),0 => __('no'))));
-				}
-				else {
-					$settings_form->addField(
-						new dcFieldText($prefix.$ns.'_'.$k,''));
-				}
-				$settings_form->{$prefix.$ns.'_'.$k} = $v['value'];
-			}
-		}
-		
-		$nav_form
-			->addField(
-				new dcFieldCombo($prefix.'nav','',$combo,array(
-					"label" => __('Goto:'))))
-			->addField(
-				new dcFieldSubmit($prefix.'nav_submit',__('OK')))
-			->addField(
-				new dcFieldHidden ('p','aboutConfig'))
-			;
-		
-		$settings_form
-			->addField(
-				new dcFieldSubmit($prefix.'submit',__('Save'),array(
-					'action' => array('adminPageAboutConfig',$action))))
-			->addField(
-				new dcFieldHidden ('p','aboutConfig'))
-			;
-		
-		$_ctx->{$prefix.'settings'} = $settings;
-		
-		$nav_form->setup();
-		$settings_form->setup();
-	}
-}
-
-# Local settings forms
-adminPageAboutConfig::setForms();
-
-# Global settings forms
-adminPageAboutConfig::setForms(true);
-
-# Commons
+		http::redirect($p_url.'&upd=1&part=global');
+	}
+	catch (Exception $e)
+	{
+		$core->error->add($e->getMessage());
+	}
+}
+
+$part = !empty($_GET['part']) && $_GET['part'] == 'global' ? 'global' : 'local';
+
+function settingLine($id,$s,$ns,$field_name,$strong_label)
+{
+	if ($s['type'] == 'boolean') {
+		$field = form::combo(array($field_name.'['.$ns.']['.$id.']',$field_name.'_'.$id),
+		array(__('yes') => 1, __('no') => 0),$s['value'] ? 1 : 0);
+	} else {
+		$field = form::field(array($field_name.'['.$ns.']['.$id.']',$field_name.'_'.$id),40,null,
+		html::escapeHTML($s['value']));
+	}
+	
+	$slabel = $strong_label ? '<strong>%s</strong>' : '%s';
+	
+	return
+	'<tr>'.
+	'<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'.
+	'<td>'.$field.'</td>'.
+	'<td>'.$s['type'].'</td>'.
+	'<td>'.html::escapeHTML($s['label']).'</td>'.
+	'</tr>';
+}
+?>
+<html>
+<head>
+  <title>about:config</title>
+  <?php echo dcPage::jsPageTabs($part); ?>
+  <style type="text/css">
+  table.settings { border: 1px solid #999; margin-bottom: 2em; }
+  table.settings th { background: #f5f5f5; color: #444; padding-top: 0.3em; padding-bottom: 0.3em; }
+  </style>
+	<script type="text/javascript">
+	//<![CDATA[
+	$(function() {
+		$("#gs_submit").hide();
+		$("#ls_submit").hide();
+		$("#gs_nav").change(function() {
+			window.location = $("#gs_nav option:selected").val();
+		})
+		$("#ls_nav").change(function() {
+			window.location = $("#ls_nav option:selected").val();
+		})
+	});
+	//]]>
+	</script>
+</head>
+
+<body>
+<?php
 if (!empty($_GET['upd'])) {
-	$_ctx->setAlert(__('Configuration successfully updated'));
-}
+	dcPage::message(__('Configuration successfully updated'));
+}
+
 if (!empty($_GET['upda'])) {
-	$_ctx->setAlert(__('Settings definition successfully updated'));
-}
-$_ctx->default_tab = !empty($_GET['part']) && $_GET['part'] == 'global' ? 'global' : 'local';
-$_ctx->fillPageTitle('about:config');
-$core->tpl->display('@aboutConfig/index.html.twig');
-?>
+	dcPage::message(__('Settings definition successfully updated'));
+}
+?>
+<h2><?php echo __('System'); ?> &rsaquo; <span class="page-title">about:config</span></h2>
+
+<div id="local" class="multi-part" title="<?php echo sprintf(__('Settings for %s'),html::escapeHTML($core->blog->name)); ?>">
+
+
+<?php
+$table_header = '<table class="settings" id="%s"><caption>%s</caption>'.
+'<thead>'.
+'<tr>'."\n".
+'  <th class="nowrap">Setting ID</th>'."\n".
+'  <th>'.__('Value').'</th>'."\n".
+'  <th>'.__('Type').'</th>'."\n".
+'  <th class="maximalx">'.__('Description').'</th>'."\n".
+'</tr>'."\n".
+'</thead>'."\n".
+'<tbody>';
+$table_footer = '</tbody></table>';
+
+$settings = array();
+foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) {
+	foreach ($namespace->dumpSettings() as $k => $v) {
+		$settings[$ns][$k] = $v;
+	}
+}
+ksort($settings);
+if (count($settings) > 0) {
+	$ns_combo = array();
+	foreach ($settings as $ns => $s) {
+		$ns_combo[$ns] = '#l_'.$ns;
+	}
+	echo 
+		'<form action="plugin.php" method="post">'.
+		'<p class="anchor-nav">'.
+		'<label for="ls_nav" class="classic">'.__('Goto:').'</label> '.form::combo('ls_nav',$ns_combo).
+		' <input type="submit" value="'.__('Ok').'" id="ls_submit" />'.
+		'<input type="hidden" name="p" value="aboutConfig" />'.
+		$core->formNonce().'</p></form>';
+}
+?>
+
+<form action="plugin.php" method="post">
+
+<?php
+foreach ($settings as $ns => $s)
+{
+	ksort($s);
+	echo sprintf($table_header,'l_'.$ns,$ns);
+	foreach ($s as $k => $v)
+	{
+		echo settingLine($k,$v,$ns,'s',!$v['global']);
+	}
+	echo $table_footer;
+}
+?>
+
+<p><input type="submit" value="<?php echo __('Save'); ?>" />
+<input type="hidden" name="p" value="aboutConfig" />
+<?php echo $core->formNonce(); ?></p>
+</form>
+</div>
+
+<div id="global" class="multi-part" title="<?php echo __('global settings'); ?>">
+
+<?php
+$settings = array();
+
+foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) {
+	foreach ($namespace->dumpGlobalSettings() as $k => $v) {
+		$settings[$ns][$k] = $v;
+	}
+}
+
+ksort($settings);
+
+if (count($settings) > 0) {
+	$ns_combo = array();
+	foreach ($settings as $ns => $s) {
+		$ns_combo[$ns] = '#g_'.$ns;
+	}
+	echo 
+		'<form action="plugin.php" method="post">'.
+		'<p class="anchor-nav">'.
+		'<label for="gs_nav" class="classic">'.__('Goto:').'</label> '.form::combo('gs_nav',$ns_combo).
+		' <input type="submit" value="'.__('Ok').'" id="gs_submit" />'.
+		'<input type="hidden" name="p" value="aboutConfig" />'.
+		$core->formNonce().'</p></form>';
+}
+?>
+
+<form action="plugin.php" method="post">
+
+<?php
+foreach ($settings as $ns => $s)
+{
+	ksort($s);
+	echo sprintf($table_header,'g_'.$ns,$ns);
+	foreach ($s as $k => $v)
+	{
+		echo settingLine($k,$v,$ns,'gs',false);
+	}
+	echo $table_footer;
+}
+?>
+
+<p><input type="submit" value="<?php echo __('Save'); ?>" />
+<input type="hidden" name="p" value="aboutConfig" />
+<?php echo $core->formNonce(); ?></p>
+</form>
+</div>
+
+</body>
+</html>
Index: plugins/aboutConfig/js/aboutConfig.js
===================================================================
--- plugins/aboutConfig/js/aboutConfig.js	(revision 1089)
+++ 	(revision )
@@ -1,10 +1,0 @@
-$(function() {
-	$("#global_nav_submit").hide();
-	$("#local_nav_submit").hide();
-	$("#global_nav").change(function() {
-		window.location = $("#global_nav option:selected").val();
-	})
-	$("#local_nav").change(function() {
-		window.location = $("#local_nav option:selected").val();
-	})
-});
Index: plugins/aboutConfig/style/aboutConfig.css
===================================================================
--- plugins/aboutConfig/style/aboutConfig.css	(revision 1070)
+++ 	(revision )
@@ -1,16 +1,0 @@
-table.settings {
-	border: 1px solid #999;
-	margin-bottom: 2em;
-}
-table.settings th {
-	background: #f5f5f5;
-	color: #444;
-	padding-top: 0.3em;
-	padding-bottom: 0.3em;
-}
-p.anchor-nav {
-	float: right;
-}
-p.anchor-nav label {
-	display: inline;
-}
Index: plugins/antispam/style.css
===================================================================
--- plugins/antispam/style.css	(revision 0)
+++ plugins/antispam/style.css	(revision 1330)
@@ -8,5 +8,4 @@
 	margin: 0.5em 0;
 	padding-left: 16px;
-	/*background: url(index.php?pf=antispam/feed.png) no-repeat center left;*/
 	background-color: transparent;
 	background-position: center left;
