Index: plugins/widgets/_default_widgets.php
===================================================================
--- plugins/widgets/_default_widgets.php	(revision 665)
+++ plugins/widgets/_default_widgets.php	(revision 1063)
@@ -18,40 +18,67 @@
 $__widgets = new dcWidgets;
 
-$__widgets->create('search',__('Search engine'),array('defaultWidgets','search'));
+$__widgets->create('search',__('Search engine'),array('defaultWidgets','search'),null,'Search engine form');
 $__widgets->search->setting('title',__('Title:'),__('Search'));
+$__widgets->search->setting('homeonly',__('Display on:'),0,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->search->setting('content_only',__('Content only'),0,'check');
+$__widgets->search->setting('class',__('CSS class:'),'');
 
-$__widgets->create('navigation',__('Navigation links'),array('defaultWidgets','navigation'));
+$__widgets->create('navigation',__('Navigation links'),array('defaultWidgets','navigation'),null,'List of navigation links');
 $__widgets->navigation->setting('title',__('Title:'),'');
+$__widgets->navigation->setting('homeonly',__('Display on:'),0,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->navigation->setting('content_only',__('Content only'),0,'check');
+$__widgets->navigation->setting('class',__('CSS class:'),'');
 
-$__widgets->create('bestof',__('Selected entries'),array('defaultWidgets','bestof'));
+$__widgets->create('bestof',__('Selected entries'),array('defaultWidgets','bestof'),null,'List of selected entries');
 $__widgets->bestof->setting('title',__('Title:'),__('Best of me'));
 $__widgets->bestof->setting('orderby',__('Sort:'),'asc','combo',array(__('Ascending') => 'asc', __('Descending') => 'desc'));
-$__widgets->bestof->setting('homeonly',__('Home page only'),1,'check');
+$__widgets->bestof->setting('homeonly',__('Display on:'),1,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->bestof->setting('content_only',__('Content only'),0,'check');
+$__widgets->bestof->setting('class',__('CSS class:'),'');
 
-$__widgets->create('langs',__('Blog languages'),array('defaultWidgets','langs'));
+$__widgets->create('langs',__('Blog languages'),array('defaultWidgets','langs'),null,'List of available languages');
 $__widgets->langs->setting('title',__('Title:'),__('Languages'));
-$__widgets->langs->setting('homeonly',__('Home page only'),1,'check');
+$__widgets->langs->setting('homeonly',__('Display on:'),1,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->langs->setting('content_only',__('Content only'),0,'check');
+$__widgets->langs->setting('class',__('CSS class:'),'');
 
-$__widgets->create('categories',__('Categories list'),array('defaultWidgets','categories'));
+$__widgets->create('categories',__('Categories list'),array('defaultWidgets','categories'),null,'List of categories');
 $__widgets->categories->setting('title',__('Title:'),__('Categories'));
 $__widgets->categories->setting('postcount',__('With entries counts'),0,'check');
+$__widgets->categories->setting('homeonly',__('Display on:'),0,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->categories->setting('content_only',__('Content only'),0,'check');
+$__widgets->categories->setting('class',__('CSS class:'),'');
 
-$__widgets->create('subscribe',__('Subscribe links'),array('defaultWidgets','subscribe'));
+$__widgets->create('subscribe',__('Subscribe links'),array('defaultWidgets','subscribe'),null,'RSS or Atom feed subscription links');
 $__widgets->subscribe->setting('title',__('Title:'),__('Subscribe'));
 $__widgets->subscribe->setting('type',__('Feeds type:'),'atom','combo',array('Atom' => 'atom', 'RSS' => 'rss2'));
-$__widgets->subscribe->setting('homeonly',__('Home page only'),0,'check');
+$__widgets->subscribe->setting('homeonly',__('Display on:'),1,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->subscribe->setting('content_only',__('Content only'),0,'check');
+$__widgets->subscribe->setting('class',__('CSS class:'),'');
 
-$__widgets->create('feed',__('Feed reader'),array('defaultWidgets','feed'));
+$__widgets->create('feed',__('Feed reader'),array('defaultWidgets','feed'),null,'Last entries from feed');
 $__widgets->feed->setting('title',__('Title:'),__('Somewhere else'));
 $__widgets->feed->setting('url',__('Feed URL:'),'');
 $__widgets->feed->setting('limit',__('Entries limit:'),10);
-$__widgets->feed->setting('homeonly',__('Home page only'),1,'check');
+$__widgets->feed->setting('homeonly',__('Display on:'),1,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->feed->setting('content_only',__('Content only'),0,'check');
+$__widgets->feed->setting('class',__('CSS class:'),'');
 
-$__widgets->create('text',__('Text'),array('defaultWidgets','text'));
+$__widgets->create('text',__('Text'),array('defaultWidgets','text'),null,'Simple text');
 $__widgets->text->setting('title',__('Title:'),'');
 $__widgets->text->setting('text',__('Text:'),'','textarea');
-$__widgets->text->setting('homeonly',__('Home page only'),0,'check');
+$__widgets->text->setting('homeonly',__('Display on:'),0,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->text->setting('content_only',__('Content only'),0,'check');
+$__widgets->text->setting('class',__('CSS class:'),'');
 
-$__widgets->create('lastposts',__('Last entries'),array('defaultWidgets','lastposts'));
+$__widgets->create('lastposts',__('Last entries'),array('defaultWidgets','lastposts'),null,'List of last entries published');
 $__widgets->lastposts->setting('title',__('Title:'),__('Last entries'));
 $rs = $core->blog->getCategories(array('post_type'=>'post'));
@@ -66,11 +93,16 @@
 }
 $__widgets->lastposts->setting('limit',__('Entries limit:'),10);
-$__widgets->lastposts->setting('homeonly',__('Home page only'),1,'check');
+$__widgets->lastposts->setting('homeonly',__('Display on:'),1,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->lastposts->setting('content_only',__('Content only'),0,'check');
+$__widgets->lastposts->setting('class',__('CSS class:'),'');
 
-
-$__widgets->create('lastcomments',__('Last comments'),array('defaultWidgets','lastcomments'));
+$__widgets->create('lastcomments',__('Last comments'),array('defaultWidgets','lastcomments'),null,'List of last comments posted');
 $__widgets->lastcomments->setting('title',__('Title:'),__('Last comments'));
 $__widgets->lastcomments->setting('limit',__('Comments limit:'),10);
-$__widgets->lastcomments->setting('homeonly',__('Home page only'),1,'check');
+$__widgets->lastcomments->setting('homeonly',__('Display on:'),1,'combo',
+	array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2));
+$__widgets->lastcomments->setting('content_only',__('Content only'),0,'check');
+$__widgets->lastcomments->setting('class',__('CSS class:'),'');
 
 # --BEHAVIOR-- initWidgets
Index: plugins/widgets/_define.php
===================================================================
--- plugins/widgets/_define.php	(revision 665)
+++ plugins/widgets/_define.php	(revision 965)
@@ -16,5 +16,5 @@
 	/* Description*/		"Widgets for your blog sidebars",
 	/* Author */			"Olivier Meunier & Dotclear Team",
-	/* Version */			'3',
+	/* Version */			'3.1',
 	array(
 		'permissions' =>	'admin',
Index: plugins/widgets/_public.php
===================================================================
--- plugins/widgets/_public.php	(revision 671)
+++ plugins/widgets/_public.php	(revision 936)
@@ -22,13 +22,20 @@
 	public static function tplWidgets($attr)
 	{
-		$type = isset($attr['type']) ? $attr['type'] : 'nav';
-		
+		$type = isset($attr['type']) ? $attr['type'] : '';
+
 		# widgets to disable
 		$disable = isset($attr['disable']) ? trim($attr['disable']) : '';
 		
-		return
-		'<?php '.
-		"publicWidgets::widgetsHandler('".addslashes($type)."','".addslashes($disable)."'); ".
-		' ?>';
+		if ($type == '') {
+			$res = "publicWidgets::widgetsHandler('nav','".addslashes($disable)."');"."\n".
+				"   publicWidgets::widgetsHandler('extra','".addslashes($disable)."');"."\n".
+				"   publicWidgets::widgetsHandler('custom','".addslashes($disable)."');"."\n";
+		} else {
+			if (!in_array($type, array('nav','extra','custom'))) {
+				$type = 'nav';
+			}
+			$res = "publicWidgets::widgetsHandler('".addslashes($type)."','".addslashes($disable)."');";
+		}
+		return '<?php '.$res.' ?>';
 	}
 	
Index: plugins/widgets/_widgets_functions.php
===================================================================
--- plugins/widgets/_widgets_functions.php	(revision 862)
+++ plugins/widgets/_widgets_functions.php	(revision 1063)
@@ -18,8 +18,13 @@
 		global $core;
 		
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
+			return;
+		}
+
 		$value = isset($GLOBALS['_search']) ? html::escapeHTML($GLOBALS['_search']) : '';
 		
 		return
-		'<div id="search">'.
+		($w->content_only ? '' : '<div id="search"'.($w->class ? ' class="'.html::escapeHTML($w->class).'"' : '').'>').
 		($w->title ? '<h2><label for="q">'.html::escapeHTML($w->title).'</label></h2>' : '').
 		'<form action="'.$core->blog->url.'" method="get">'.
@@ -29,5 +34,5 @@
 		'</fieldset>'.
 		'</form>'.
-		'</div>';
+		($w->content_only ? '' : '</div>');
 	}
 	
@@ -36,6 +41,11 @@
 		global $core;
 		
-		$res =
-		'<div id="topnav">'.
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
+			return;
+		}
+
+		$res =
+		($w->content_only ? '' : '<div id="topnav"'.($w->class ? ' class="'.html::escapeHTML($w->class).'"' : '').'>').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
 		'<ul>';
@@ -53,5 +63,5 @@
 		__('Archives').'</a></li>'.
 		'</ul>'.
-		'</div>';
+		($w->content_only ? '' : '</div>');
 		
 		return $res;
@@ -62,4 +72,9 @@
 		global $core, $_ctx;
 		
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
+			return;
+		}
+
 		$rs = $core->blog->getCategories(array('post_type'=>'post'));
 		if ($rs->isEmpty()) {
@@ -68,5 +83,5 @@
 		
 		$res =
-		'<div class="categories">'.
+		($w->content_only ? '' : '<div class="categories'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '');
 		
@@ -102,5 +117,5 @@
 			$res .= str_repeat('</li></ul>',-($ref_level - $level));
 		}
-		$res .= '</div>';
+		$res .= ($w->content_only ? '' : '</div>');
 		
 		return $res;
@@ -111,5 +126,6 @@
 		global $core;
 		
-		if ($w->homeonly && $core->url->type != 'default') {
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
 			return;
 		}
@@ -128,5 +144,5 @@
 		
 		$res =
-		'<div class="selected">'.
+		($w->content_only ? '' : '<div class="selected'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
 		'<ul>';
@@ -136,5 +152,5 @@
 		}
 		
-		$res .= '</ul></div>';
+		$res .= '</ul>'.($w->content_only ? '' : '</div>');
 		
 		return $res;
@@ -145,5 +161,6 @@
 		global $core, $_ctx;
 		
-		if ($w->homeonly && $core->url->type != 'default' && $core->url->type != 'lang') {
+		if (($w->homeonly == 1 && $core->url->type != 'default' && $core->url->type != 'lang') ||
+			($w->homeonly == 2 && ($core->url->type == 'default' || $core->url->type == 'lang'))) {
 			return;
 		}
@@ -157,5 +174,5 @@
 		$langs = l10n::getISOcodes();
 		$res =
-		'<div class="langs">'.
+		($w->content_only ? '' : '<div class="langs'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
 		'<ul>';
@@ -176,5 +193,5 @@
 		}
 		
-		$res .= '</ul></div>';
+		$res .= '</ul>'.($w->content_only ? '' : '</div>');
 		
 		return $res;
@@ -185,5 +202,6 @@
 		global $core;
 		
-		if ($w->homeonly && $core->url->type != 'default') {
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
 			return;
 		}
@@ -196,5 +214,5 @@
 		
 		$res =
-		'<div class="syndicate">'.
+		($w->content_only ? '' : '<div class="syndicate'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
 		'<ul>';
@@ -215,5 +233,5 @@
 		}
 		
-		$res .= '</ul></div>';
+		$res .= '</ul>'.($w->content_only ? '' : '</div>');
 		
 		return $res;
@@ -228,5 +246,6 @@
 		global $core;
 		
-		if ($w->homeonly && $core->url->type != 'default') {
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
 			return;
 		}
@@ -244,5 +263,5 @@
 		
 		$res =
-		'<div class="feed">'.
+		($w->content_only ? '' : '<div class="feed'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
 		'<ul>';
@@ -269,5 +288,5 @@
 		}
 		
-		$res .= '</ul></div>';
+		$res .= '</ul>'.($w->content_only ? '' : '</div>');
 		
 		return $res;
@@ -278,13 +297,14 @@
 		global $core;
 		
-		if ($w->homeonly && $core->url->type != 'default') {
-			return;
-		}
-		
-		$res =
-		'<div class="text">'.
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
+			return;
+		}
+		
+		$res =
+		($w->content_only ? '' : '<div class="text'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
 		$w->text.
-		'</div>';
+		($w->content_only ? '' : '</div>');
 		
 		return $res;
@@ -295,5 +315,6 @@
 		global $core;
 		
-		if ($w->homeonly && $core->url->type != 'default') {
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
 			return;
 		}
@@ -329,5 +350,5 @@
 		
 		$res =
-		'<div class="lastposts">'.
+		($w->content_only ? '' : '<div class="lastposts'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
 		'<ul>';
@@ -338,5 +359,5 @@
 		}
 		
-		$res .= '</ul></div>';
+		$res .= '</ul>'.($w->content_only ? '' : '</div>');
 		
 		return $res;
@@ -347,5 +368,6 @@
 		global $core;
 		
-		if ($w->homeonly && $core->url->type != 'default') {
+		if (($w->homeonly == 1 && $core->url->type != 'default') ||
+			($w->homeonly == 2 && $core->url->type == 'default')) {
 			return;
 		}
@@ -359,5 +381,5 @@
 		}
 		
-		$res = '<div class="lastcomments">'.
+		$res = ($w->content_only ? '' : '<div class="lastcomments'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">').
 		($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
 		'<ul>';
@@ -373,5 +395,5 @@
 		}
 		
-		$res .= '</ul></div>';
+		$res .= '</ul>'.($w->content_only ? '' : '</div>');
 		
 		return $res;
Index: plugins/widgets/class.widgets.php
===================================================================
--- plugins/widgets/class.widgets.php	(revision 270)
+++ plugins/widgets/class.widgets.php	(revision 954)
@@ -36,7 +36,7 @@
 	}
 	
-	public function create($id,$name,$callback,$append_callback=null)
-	{
-		$this->__widgets[$id] = new dcWidget($id,$name,$callback);
+	public function create($id,$name,$callback,$append_callback=null,$desc='')
+	{
+		$this->__widgets[$id] = new dcWidget($id,$name,$callback,$desc);
 		$this->__widgets[$id]->append_callback = $append_callback;
 	}
@@ -135,4 +135,5 @@
 	private $id;
 	private $name;
+	private $desc;
 	private $public_callback = null;
 	public $append_callback = null;
@@ -148,9 +149,10 @@
 	}
 	
-	public function __construct($id,$name,$callback)
+	public function __construct($id,$name,$callback,$desc='')
 	{
 		$this->public_callback = $callback;
 		$this->id = $id;
 		$this->name = $name;
+		$this->desc = $desc;
 	}
 	
@@ -163,4 +165,9 @@
 	{
 		return $this->name;
+	}
+
+	public function desc()
+	{
+		return $this->desc;
 	}
 	
Index: plugins/widgets/index.php
===================================================================
--- plugins/widgets/index.php	(revision 735)
+++ plugins/widgets/index.php	(revision 954)
@@ -34,4 +34,12 @@
 	__('custom') => 'custom'
 );
+
+function literalNullString($v)
+{
+	if ($v == '') {
+		return '&lt;'.__('empty string').'&gt;';
+	}
+	return $v;
+}
 
 # Adding widgets to sidebars
@@ -193,5 +201,5 @@
 	'<div>'.form::hidden(array('w[void][0][id]'),html::escapeHTML($w->id())).
 	'<p class="widget-name">'.form::field(array('w[void][0][order]'),2,3,0,'hideControl').' '.
-	$w->name().'</p>'.
+	$w->name().($w->desc() != '' ? ' <span class="form-note">('.__($w->desc()).')</span>' : '').'</p>'.
 	'<p class="js-remove"><label class="classic">'.__('Append to:').' '.
 	form::combo(array('addw['.$w->id().']'),$append_combo).'</label></p>'.
@@ -259,5 +267,6 @@
 	$widget_elements->content .=
 	'<dt><strong>'.html::escapeHTML($w->name()).'</strong> ('.
-	__('Widget ID:').' <strong>'.html::escapeHTML($w->id()).'</strong>)</dt>'.
+	__('Widget ID:').' <strong>'.html::escapeHTML($w->id()).'</strong>)'.
+	($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</dt>'.
 	'<dd>';
 	
@@ -274,13 +283,14 @@
 			switch ($s['type']) {
 				case 'check':
-					$s_type = '0|1';
+					$s_type = __('boolean').", ".__('possible values:')." <code>0</code> ".__('or')." <code>1</code>";
 					break;
 				case 'combo':
-					$s_type = implode('|',$s['options']);
+					$s['options'] = array_map("literalNullString", $s['options']);
+					$s_type = __('listitem').", ".__('possible values:')." <code>".implode('</code>, <code>',$s['options'])."</code>";
 					break;
 				case 'text':
 				case 'textarea':
 				default:
-					$s_type = 'text';
+					$s_type = __('string');
 					break;
 			}
@@ -321,9 +331,9 @@
 		'<div>'.form::hidden(array($iname.'[id]'),html::escapeHTML($w->id())).
 		'<p class="widget-name">'.form::field(array($iname.'[order]'),2,3,(string) $i,'js-hide','',0,'title="'.__('order').'"').' '.
-		$w->name().'</p>'.
+		$w->name().($w->desc() != '' ? ' <span class="form-note">('.__($w->desc()).')</span>' : '').'</p>'.
 		'<p class="removeWidget js-remove"><label class="classic">'.
 		form::checkbox(array($iname.'[_rem]'),'1',0).' '.__('Remove widget').
 		'</label></p>'.
-		'<div class="widgetSettings">'.$w->formSettings($iname,&$j).'</div>'.
+		'<div class="widgetSettings">'.$w->formSettings($iname,$j).'</div>'.
 		'</div>';
 		
