Index: /plugins/muppet/_define.php
===================================================================
--- /plugins/muppet/_define.php	(revision 2339)
+++ /plugins/muppet/_define.php	(revision 2485)
@@ -17,5 +17,5 @@
 	/* Description*/	"Create and manage entries with others post types",
 	/* Author */		"Osku and contributors",
-	/* Version */		'0.5.3',
+	/* Version */		'0.6.1',
 	/* Permissions */	'usage'
 );
Index: /plugins/muppet/list.php
===================================================================
--- /plugins/muppet/list.php	(revision 2313)
+++ /plugins/muppet/list.php	(revision 2485)
@@ -2,5 +2,5 @@
 # -- BEGIN LICENSE BLOCK ----------------------------------
 #
-# This file is part of megapost, a plugin for Dotclear 2.
+# This file is part of muppet, a plugin for Dotclear 2.
 # 
 # Copyright (c) 2010 Osku and contributors
@@ -432,5 +432,5 @@
 	'<p class="col checkboxes-helpers"></p>'.
 	
-	'<p class="col right">'.__('Selected threads action:').' '.
+	'<p class="col right">'.__('Selected entries action:').' '.
 	form::combo('action',$combo_action).
 	'<input type="submit" value="'.__('ok').'" /></p>'.
Index: /plugins/muppet/_prepend.php
===================================================================
--- /plugins/muppet/_prepend.php	(revision 2313)
+++ /plugins/muppet/_prepend.php	(revision 2485)
@@ -15,15 +15,6 @@
 $__autoload['muppet'] = dirname(__FILE__).'/inc/class.setting.muppet.php';
 
+$core->blog->settings->addNamespace('muppet'); 
 require dirname(__FILE__).'/_widgets.php';
-
-function muppetSettings($core,$ns='muppet') {
-	if (version_compare(DC_VERSION,'2.2-alpha','>=')) {  
-		$core->blog->settings->addNamespace($ns); 
-		return $core->blog->settings->{$ns}; 
-	} else { 
-		$core->blog->settings->setNamespace($ns); 
-		return $core->blog->settings; 
-	}
-}
 
 $post_types = muppet::getPostTypes();
Index: /plugins/muppet/locales/fr/main.po
===================================================================
--- /plugins/muppet/locales/fr/main.po	(revision 2313)
+++ /plugins/muppet/locales/fr/main.po	(revision 2485)
@@ -1,429 +1,639 @@
+# Language: Français
+# Module: muppet - 0.6
+# Date: 2010-07-15 11:15:43
+# Translated with translater 1.4.1
 
 msgid ""
 msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: muppet 0.5\n"
+"Project-Id-Version: muppet 0.6\n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2010-06-06T16:10:47+00:00\n"
-"Last-Translator: Osku\n"
+"PO-Revision-Date: 2010-07-15T11:15:43+00:00\n"
+"Last-Translator: osku\n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#: _admin.php:19
+msgid "Content"
+msgstr "Contenu"
+
+#: _admin.php:29
+#: index.php:220
 msgid "manage the %s"
 msgstr "gérer les %s"
 
+#: _admin.php:37
 msgid "My types"
 msgstr "Mes types"
 
+#: _admin.php:48
 msgid "Move"
 msgstr "Déplacer"
 
+#: _admin.php:48
 msgid "Change post type"
 msgstr "Changer le type de billet"
 
+#: _admin.php:60
 msgid "Something wrong happened..."
 msgstr "Un problème est survenu..."
 
+#: _admin.php:83
 msgid "Entry"
 msgstr "Billet"
 
+#: _admin.php:94
 msgid "Select post type for these entries"
 msgstr "Sélectionner le type pour ces billets"
 
+#: _admin.php:96
 msgid "Choose post type:"
 msgstr "Choisir le type de billet :"
 
+#: _admin.php:103
+#: item.php:504
+#: item.php:619
 msgid "save"
 msgstr "enregistrer"
 
+#: _public.php:146
 msgid "You must provide a valid email address."
 msgstr "Vous devez indiquer une adresse email valide."
 
+#: _widgets.php:25
 msgid "Muppet: selected entries"
 msgstr "Muppet : billets sélectionnés"
 
+#: _widgets.php:26
+#: _widgets.php:40
+#: item.php:481
 msgid "Title:"
-msgstr "Titre :"
-
+msgstr "Titre :"
+
+#: _widgets.php:26
 msgid "Best of me"
 msgstr "À retenir"
 
+#: _widgets.php:27
+#: _widgets.php:49
 msgid "Home page only"
 msgstr "Page d'accueil uniquement"
 
+#: _widgets.php:33
+#: _widgets.php:55
+#: index.php:183
 msgid "Type:"
-msgstr "Type :"
-
+msgstr "Type :"
+
+#: _widgets.php:39
 msgid "Muppet: last posts"
 msgstr "Muppet : derniers billets"
 
+#: _widgets.php:40
 msgid "Last entries"
 msgstr "Derniers billets"
 
+#: _widgets.php:42
 msgid "Uncategorized"
 msgstr "Non catégorisé"
 
+#: _widgets.php:46
+#: item.php:397
+#: list.php:393
 msgid "Category:"
-msgstr "Catégorie :"
-
+msgstr "Catégorie :"
+
+#: _widgets.php:48
 msgid "Entries limit:"
-msgstr "Nombre de billets maximum :"
-
+msgstr "Nombre de billets maximum :"
+
+#: index.php:28
+msgid "year/month/day/title"
+msgstr "année/mois/jour/titre"
+
+#: index.php:29
+msgid "year/month/title"
+msgstr "année/mois/titre"
+
+#: index.php:30
+msgid "year/title"
+msgstr "année/titre"
+
+#: index.php:31
+msgid "title"
+msgstr "titre"
+
+#: index.php:67
 msgid "Post type must contain at least 2 letters (only letters)."
 msgstr "Le type de billet doit contenir au moins 2 lettres (seulement des lettres)"
 
+#: index.php:72
 msgid "This post type is aleady used by another plugin."
 msgstr "Ce type de billet est déjà utilisé par une autre extension."
 
+#: index.php:78
 msgid "Name should be a nice word."
 msgstr "Le nom doit être un joli mot."
 
+#: index.php:113
 msgid "Configuration successfully saved."
 msgstr "Configuration enregistré avec succès."
 
+#: index.php:114
 msgid "Post type successuflly removed."
 msgstr "Le type de billet a été supprimé avec succès."
 
+#: index.php:129
 msgid "Muppet"
 msgstr "Muppet"
 
+#: index.php:151
 msgid "Supplementary post types"
 msgstr "Types de billet supplémentaires"
 
-msgid "My post types"
-msgstr "Mes types de billet"
-
+#: index.php:154
+msgid "New post type"
+msgstr "Nouveau type de billet"
+
+#: index.php:159
+msgid "Create a new post type"
+msgstr "Créer un nouveau type de billet"
+
+#: index.php:160
+msgid "Create"
+msgstr "Créer"
+
+#: index.php:171
+msgid "Modify a post type"
+msgstr "Modifier un type de billet"
+
+#: index.php:172
+msgid "Save"
+msgstr "Enregistrer"
+
+#: index.php:183
+#: index.php:185
+#: index.php:187
+#: index.php:190
+#: item.php:481
+#: item.php:489
+#: item.php:600
+#: item.php:613
+msgid "Required field"
+msgstr "Champ obligatoire"
+
+#: index.php:185
+#: index.php:219
+#: item.php:600
+msgid "Name:"
+msgstr "Nom :"
+
+#: index.php:187
+msgid "Plural form:"
+msgstr "Forme plurielle :"
+
+#: index.php:190
+msgid "Image:"
+msgstr "Image :"
+
+#: index.php:192
+#: index.php:221
+msgid "New post URL format:"
+msgstr "Format d'URL des nouveaux billets :"
+
+#: index.php:197
+#: list.php:261
+#: list.php:261
+msgid "Delete"
+msgstr "Supprimer"
+
+#: index.php:204
 msgid "No type has been defined yet."
 msgstr "Aucun type n'a été défini pour le moment."
 
+#: index.php:216
+#: index.php:218
 msgid "edit this post type"
 msgstr "modifier le type de billet"
 
-msgid "Type: <span class=\"hot\">%s</span>"
-msgstr "Type : <span class=\"hot\">%s</span>"
-
-msgid "Name:"
-msgstr "Nom :"
-
-msgid "Menu image:"
-msgstr "Image du menu :"
-
+#: index.php:220
 msgid "Permission:"
 msgstr "Permission :"
 
-msgid "Create a new post type"
-msgstr "Créer un nouveau type de billet"
-
-msgid "Create"
-msgstr "Créer"
-
-msgid "Modify a post type"
-msgstr "Modifier un type de billet"
-
-msgid "Save"
-msgstr "Enregistrer"
-
-msgid "Required field"
-msgstr "Champ obligatoire"
-
-msgid "Plural form:"
-msgstr "Forme plurielle :"
-
-msgid "Image:"
-msgstr "Image :"
-
-msgid "Delete"
-msgstr "Supprimer"
-
+#: index.php:232
 msgid "Statistics"
 msgstr "Statistiques"
 
-msgid "Retrieve types from database"
-msgstr "Récupérer les types de la base de données"
-
+#: index.php:243
 msgid "%s post"
 msgstr "%s billet"
 
+#: index.php:243
 msgid "%s posts"
 msgstr "%s billets"
 
+#: index.php:244
 msgid "with type <strong>%s</strong>."
 msgstr "avec le type <strong>%s</strong>."
 
+#: item.php:48
+#: list.php:377
 msgid "New"
 msgstr "Nouveau"
 
+#: item.php:90
+#: item.php:93
+#: item.php:96
 msgid "Most used"
 msgstr "Plus utilisées"
 
+#: item.php:90
+#: item.php:94
 msgid "Available"
 msgstr "Disponible"
 
+#: item.php:113
 msgid "This entry does not exist."
 msgstr "Ce billet n'existe pas."
 
+#: item.php:136
+#: item.php:392
 msgid "Edit"
 msgstr "Modifier"
 
+#: item.php:146
 msgid "next"
 msgstr "suivant"
 
+#: item.php:153
 msgid "previous"
 msgstr "précédent"
 
+#: item.php:307
 msgid "Are you sure you want to delete this entry?"
-msgstr "Êtes-vous certain de vouloir supprimer ce billet ?"
-
+msgstr "Êtes-vous certain de vouloir supprimer ce billet ?"
+
+#: item.php:330
 msgid "Entry has been successfully updated."
 msgstr "Billet mis à jour avec succès."
 
+#: item.php:333
 msgid "Entry has been successfully created."
 msgstr "Billet créé avec succès."
 
+#: item.php:336
 msgid "File has been successfully attached."
 msgstr "Fichier attaché avec succès."
 
+#: item.php:339
 msgid "Attachment has been successfully removed."
 msgstr "Pièce jointe retirée avec succès."
 
+#: item.php:349
 msgid "Don't forget to validate your XHTML conversion by saving your post."
 msgstr "Enregistrez votre billet pour valider la transformation en XHTML."
 
+#: item.php:356
 msgid "View"
 msgstr "Voir"
 
+#: item.php:363
 msgid "Preview"
 msgstr "Prévisualisation"
 
+#: item.php:401
+#: list.php:395
 msgid "Status:"
-msgstr "État :"
-
+msgstr "État :"
+
+#: item.php:405
 msgid "Published on:"
-msgstr "Publié le :"
-
+msgstr "Publié le :"
+
+#: item.php:408
 msgid "Text formating:"
-msgstr "Format du texte :"
-
+msgstr "Format du texte :"
+
+#: item.php:410
 msgid "Convert to XHTML"
 msgstr "Convertir en XHTML"
 
+#: item.php:414
 msgid "Accept comments"
 msgstr "Accepter les commentaires"
 
+#: item.php:416
 msgid "Accept trackbacks"
 msgstr "Accepter les rétroliens"
 
+#: item.php:418
+#: list.php:229
 msgid "Selected"
 msgstr "Sélectionné"
 
+#: item.php:420
+#: list.php:404
 msgid "Lang:"
-msgstr "Langue :"
-
+msgstr "Langue :"
+
+#: item.php:423
 msgid "Password:"
-msgstr "Mot de passe :"
-
+msgstr "Mot de passe :"
+
+#: item.php:428
 msgid "Basename:"
-msgstr "URL spécifique :"
-
+msgstr "URL spécifique :"
+
+#: item.php:432
 msgid "Warning: If you set the URL manually, it may conflict with another entry."
-msgstr "Attention : si vous indiquez l'URL manuellement, celle-ci peut entrer en conflit avec un autre billet."
-
+msgstr "Attention : si vous indiquez l'URL manuellement, celle-ci peut entrer en conflit avec un autre billet."
+
+#: item.php:439
 msgid "Attachments"
 msgstr "Pièces jointes"
 
+#: item.php:455
 msgid "open"
 msgstr "ouvrir"
 
+#: item.php:459
 msgid "remove"
 msgstr "supprimer"
 
+#: item.php:468
 msgid "No attachment."
-msgstr "Aucune pièce jointe."
-
+msgstr "Aucune pièce jointe"
+
+#: item.php:470
 msgid "Add files to this entry"
 msgstr "Ajouter un fichier au billet"
 
+#: item.php:485
 msgid "Excerpt:"
-msgstr "Extrait :"
-
+msgstr "Extrait :"
+
+#: item.php:490
 msgid "Content:"
-msgstr "Contenu :"
-
+msgstr "Contenu :"
+
+#: item.php:494
 msgid "Notes:"
-msgstr "Notes :"
-
+msgstr "Notes :"
+
+#: item.php:506
+#: item.php:546
 msgid "delete"
 msgstr "supprimer"
 
+#: item.php:538
 msgid "publish"
 msgstr "publier"
 
+#: item.php:539
 msgid "unpublish"
 msgstr "hors ligne"
 
+#: item.php:540
 msgid "mark as pending"
 msgstr "en attente"
 
+#: item.php:541
 msgid "mark as junk"
 msgstr "indésirable"
 
+#: item.php:552
+#: item.php:566
+#: list.php:48
 msgid "Comments"
 msgstr "Commentaires"
 
+#: item.php:558
+#: list.php:49
 msgid "Trackbacks"
 msgstr "Rétroliens"
 
+#: item.php:563
 msgid "No trackback"
 msgstr "Aucun rétrolien"
 
+#: item.php:570
 msgid "No comment"
 msgstr "Aucun commentaire"
 
+#: item.php:578
 msgid "Selected comments action:"
-msgstr "Action sur les commentaires sélectionnés :"
-
+msgstr "Action sur les commentaires sélectionnés :"
+
+#: item.php:582
+#: list.php:436
 msgid "ok"
 msgstr "ok"
 
+#: item.php:595
+#: item.php:596
 msgid "Add a comment"
 msgstr "Ajouter un commentaire"
 
+#: item.php:604
 msgid "Email:"
-msgstr "Email :"
-
+msgstr "Email :"
+
+#: item.php:608
 msgid "Web site:"
-msgstr "Site web :"
-
+msgstr "Site web :"
+
+#: item.php:613
 msgid "Comment:"
-msgstr "Commentaire :"
-
+msgstr "Commentaire :"
+
+#: item.php:631
+#: list.php:47
+#: list.php:227
 msgid "Author"
 msgstr "Auteur"
 
+#: item.php:632
+#: list.php:45
+#: list.php:224
 msgid "Date"
 msgstr "Date"
 
+#: item.php:633
 msgid "IP address"
 msgstr "Adresse IP"
 
+#: item.php:634
+#: list.php:50
+#: list.php:228
+#: list.php:242
 msgid "Status"
 msgstr "État"
 
+#: item.php:645
+#: list.php:85
 msgid "published"
 msgstr "publié"
 
+#: item.php:648
+#: list.php:88
 msgid "unpublished"
 msgstr "non publié"
 
+#: item.php:651
+#: list.php:94
 msgid "pending"
 msgstr "en attente"
 
+#: item.php:654
 msgid "junk"
 msgstr "indésirable"
 
+#: item.php:665
+#: list.php:129
 msgid "%Y-%m-%d %H:%M"
-msgstr "%d-%m-%Y %H:%M"
-
+msgstr "%d/%m/%Y %H:%M"
+
+#: item.php:669
 msgid "Edit this comment"
 msgstr "Modifier ce commentaire"
 
+#: list.php:33
 msgid "No entry"
 msgstr "Pas de billet"
 
+#: list.php:44
+#: list.php:225
 msgid "Title"
 msgstr "Titre"
 
+#: list.php:46
+#: list.php:226
 msgid "Category"
 msgstr "Catégorie"
 
+#: list.php:57
+#: list.php:70
 msgid "Page(s)"
 msgstr "Page(s)"
 
+#: list.php:91
 msgid "scheduled"
 msgstr "programmé"
 
+#: list.php:101
 msgid "None"
 msgstr "Aucun"
 
+#: list.php:106
 msgid "protected"
 msgstr "protégé"
 
+#: list.php:111
+#: list.php:208
 msgid "selected"
 msgstr "sélectionné"
 
+#: list.php:117
 msgid "%d attachment"
 msgstr "%d annexe"
 
+#: list.php:117
 msgid "%d attachments"
 msgstr "%d annexes"
 
+#: list.php:209
 msgid "not selected"
 msgstr "non sélectionné"
 
+#: list.php:233
 msgid "Descending"
 msgstr "Décroissant"
 
+#: list.php:234
 msgid "Ascending"
 msgstr "Croissant"
 
+#: list.php:243
 msgid "Publish"
 msgstr "Publier"
 
+#: list.php:244
 msgid "Unpublish"
-msgstr "Hors ligne"
-
+msgstr "Mettre hors ligne"
+
+#: list.php:245
 msgid "Schedule"
 msgstr "Programmer"
 
+#: list.php:246
 msgid "Mark as pending"
-msgstr "En attente"
-
+msgstr "Mettre en attente"
+
+#: list.php:249
 msgid "Mark"
 msgstr "Marquer"
 
+#: list.php:250
 msgid "Mark as selected"
-msgstr "Sélectionné"
-
+msgstr "Sélectionner"
+
+#: list.php:251
 msgid "Mark as unselected"
-msgstr "Non sélectionné"
-
+msgstr "Désélectionner"
+
+#: list.php:253
+#: list.php:256
+#: list.php:256
 msgid "Change"
 msgstr "Changer"
 
+#: list.php:253
 msgid "Change category"
 msgstr "Changer la catégorie"
 
+#: list.php:257
 msgid "Change author"
 msgstr "Changer l'auteur"
 
+#: list.php:369
 msgid "Are you sure you want to delete selected entries?"
 msgstr "Êtes-vous certain de vouloir supprimer les billets sélectionnés ?"
 
+#: list.php:383
+#: list.php:388
 msgid "Filters"
 msgstr "Filtres"
 
+#: list.php:391
 msgid "Author:"
-msgstr "Auteur :"
-
+msgstr "Auteur :"
+
+#: list.php:400
 msgid "Selected:"
-msgstr "Sélectionné :"
-
+msgstr "Sélectionné :"
+
+#: list.php:402
 msgid "Month:"
-msgstr "Mois :"
-
+msgstr "Mois :"
+
+#: list.php:409
 msgid "Order by:"
-msgstr "Trier par :"
-
+msgstr "Trier par :"
+
+#: list.php:411
 msgid "Sort:"
-msgstr "Trier :"
-
+msgstr "Ordre :"
+
+#: list.php:414
 msgid "Entries per page"
 msgstr "Billets par page"
 
+#: list.php:418
 msgid "filter"
 msgstr "filtre"
 
-msgid "Selected threads action:"
-msgstr "Action sur les discussions sélectionnées :"
-
+#: list.php:434
+msgid "Selected entries action:"
+msgstr "Action sur les billets sélectionnés :"
+
Index: /plugins/muppet/_public.php
===================================================================
--- /plugins/muppet/_public.php	(revision 2313)
+++ /plugins/muppet/_public.php	(revision 2485)
@@ -2,9 +2,10 @@
 # -- BEGIN LICENSE BLOCK ----------------------------------
 #
-# This file is part of Dotclear 2.
+# This file is part of muppet, a plugin for Dotclear 2.
+# 
+# Copyright (c) 2010 Osku and contributors
 #
-# Copyright (c) 2003-2009 Olivier Meunier and contributors
 # Licensed under the GPL version 2.0 license.
-# See LICENSE file or
+# A copy of this license is available in LICENSE at
 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 #
@@ -270,6 +271,14 @@
 			}
 		}
-		
-		$rs = $core->blog->getPosts($params);
+
+		if ($w->tag)
+		{
+			$params['meta_id'] = $w->tag;
+			$rs = $core->meta->getPostsByMeta($params);
+		}
+		else
+		{
+			$rs = $core->blog->getPosts($params);
+		}
 		
 		if ($rs->isEmpty()) {
Index: /plugins/muppet/item.php
===================================================================
--- /plugins/muppet/item.php	(revision 2327)
+++ /plugins/muppet/item.php	(revision 2485)
@@ -2,5 +2,5 @@
 # -- BEGIN LICENSE BLOCK ----------------------------------
 #
-# This file is part of megapost, a plugin for Dotclear 2.
+# This file is part of muppet, a plugin for Dotclear 2.
 # 
 # Copyright (c) 2010 Osku and contributors
@@ -21,4 +21,6 @@
 
 dcPage::check($my_types[$type]['perm'].',contentadmin');
+
+$GLOBALS['page_url_format'] = isset($my_types[$type]['urlformat']) ? $my_types[$type]['urlformat'] : '{t}' ;
 
 $redir_url = $p_url.'&type='.$type;
@@ -207,5 +209,5 @@
 	
 	# Magic tweak :)
-	//$core->blog->settings->system->post_url_format = $page_url_format;
+	$core->blog->settings->system->post_url_format = $page_url_format;
 	
 	$cur->post_type = $type;
@@ -310,4 +312,5 @@
   dcPage::jsToolBar().
   dcPage::jsModal().
+  dcPage::jsMetaEditor().
   dcPage::jsLoad('js/_post.js').
   dcPage::jsLoad('js/_comments.js').
Index: /plugins/muppet/inc/class.setting.muppet.php
===================================================================
--- /plugins/muppet/inc/class.setting.muppet.php	(revision 2313)
+++ /plugins/muppet/inc/class.setting.muppet.php	(revision 2485)
@@ -17,5 +17,5 @@
 	{
 		global $core;
-		return muppetSettings($core);
+		return $core->blog->settings->muppet;
 	}
 	
@@ -34,5 +34,4 @@
 	public static function typeIsExcluded($type)
 	{
-		$s = self::setting();
 		$excluded = self::getExcludePostTypes();
 		if (array_key_exists($type,array_flip($excluded)))
@@ -48,5 +47,4 @@
 	public static function typeExists($type)
 	{
-		$s = self::setting();
 		$my_types = self::getPostTypes();
 		if (array_key_exists($type,$my_types))
@@ -68,5 +66,6 @@
 			'plural' => $values['plural'],
 			'icon' => $values['icon'],
-			'perm' => 'manage'.$type
+			'perm' => 'manage'.$type,
+			'urlformat' => $values['urlformat']
 		);
 		$s->put('muppet_types',serialize($current_types),'string','My supplementary post types');
@@ -86,5 +85,6 @@
 					'plural' => $v['plural'],
 					'icon' => $v['icon'],
-					'perm' => 'manage'.$k
+					'perm' => 'manage'.$k,
+					'urlformat' => $v['urlformat']
 				);
 			}
@@ -97,6 +97,5 @@
 	public static function removePostType($type)
 	{
-		global $core;
-		$s = muppetSettings($core);
+		$s = self::setting();
 		$current_types = self::getPostTypes();
 		unset($current_types[$type]);
Index: /plugins/muppet/_install.php
===================================================================
--- /plugins/muppet/_install.php	(revision 2313)
+++ /plugins/muppet/_install.php	(revision 2485)
@@ -22,5 +22,5 @@
 }
 
-$s = muppetSettings($core);
+$s = $core->blog->settings->muppet;
 $excludetypes = array('post','pages','gal','galitem','thread','related','pollsfactory');
 
Index: /plugins/muppet/_widgets.php
===================================================================
--- /plugins/muppet/_widgets.php	(revision 2313)
+++ /plugins/muppet/_widgets.php	(revision 2485)
@@ -2,9 +2,10 @@
 # -- BEGIN LICENSE BLOCK ----------------------------------
 #
-# This file is part of Dotclear 2.
+# This file is part of muppet, a plugin for Dotclear 2.
+# 
+# Copyright (c) 2010 Osku and contributors
 #
-# Copyright (c) 2003-2009 Olivier Meunier and contributors
 # Licensed under the GPL version 2.0 license.
-# See LICENSE file or
+# A copy of this license is available in LICENSE at
 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 #
@@ -37,6 +38,6 @@
 	{
 		global $core;
-		$w->create('lastthreadsMuppetWidget',__('Muppet: last posts'),array('widgetsMuppet','lastpostsWidget'));;
-		$w->lastthreadsMuppetWidget->setting('title',__('Title:'),__('Last entries'));
+		$w->create('lastpostsMuppetWidget',__('Muppet: last posts'),array('widgetsMuppet','lastpostsWidget'));;
+		$w->lastpostsMuppetWidget->setting('title',__('Title:'),__('Last entries'));
 		$rs = $core->blog->getCategories();
 		$categories = array('' => '', __('Uncategorized') => 'null');
@@ -44,8 +45,11 @@
 			$categories[str_repeat('&nbsp;&nbsp;',$rs->level-1).'&bull; '.html::escapeHTML($rs->cat_title)] = $rs->cat_id;
 		}
-		$w->lastthreadsMuppetWidget->setting('category',__('Category:'),'','combo',$categories);
+		$w->lastpostsMuppetWidget->setting('category',__('Category:'),'','combo',$categories);
 		unset($rs,$categories);
-		$w->lastthreadsMuppetWidget->setting('limit',__('Entries limit:'),10);
-		$w->lastthreadsMuppetWidget->setting('homeonly',__('Home page only'),1,'check');
+		if ($core->plugins->moduleExists('tags')) {
+			$w->lastpostsMuppetWidget->setting('tag',__('Tag:'),'');
+		}
+		$w->lastpostsMuppetWidget->setting('limit',__('Entries limit:'),10);
+		$w->lastpostsMuppetWidget->setting('homeonly',__('Home page only'),1,'check');
 		$ty = muppet::getPostTypes();
 		$types = array('' => '');
@@ -53,5 +57,5 @@
 			$types[ucfirst($v['name'])] = $k;
 		}
-		$w->lastthreadsMuppetWidget->setting('posttype',__('Type:'),'','combo',$types);
+		$w->lastpostsMuppetWidget->setting('posttype',__('Type:'),'','combo',$types);
 		unset($ty,$types);
 	}
Index: /plugins/muppet/_admin.php
===================================================================
--- /plugins/muppet/_admin.php	(revision 2327)
+++ /plugins/muppet/_admin.php	(revision 2485)
@@ -17,5 +17,5 @@
 if (!empty($my_types))
 {
-	$_menu['Muppet'] = new dcMenu('muppet-menu','Muppet');
+	$_menu['Muppet'] = new dcMenu('muppet-menu',__('Content'));
 	foreach ($my_types as $k => $v)
 	{
Index: /plugins/muppet/index.php
===================================================================
--- /plugins/muppet/index.php	(revision 2339)
+++ /plugins/muppet/index.php	(revision 2485)
@@ -20,7 +20,16 @@
 $edit = (!empty($_REQUEST['edit'])) ? $_REQUEST['edit'] : '';
 
-$newtype = $name = $plural = '';
+$newtype = $name = $plural = $post_url = '';
 $counts = array();
 $icon = 'image-1.png';
+
+# Post URL combo
+$post_url_combo = array(
+	__('year/month/day/title') => '{y}/{m}/{d}/{t}',
+	__('year/month/title') => '{y}/{m}/{t}',
+	__('year/title') => '{y}/{t}',
+	__('title') => '{t}',
+	__('id') => '{id}'
+);
 
 if (!empty($type))
@@ -53,4 +62,5 @@
 	$plural = trim($_POST['plural']);
 	$icon = $_POST['icon'];
+	$post_url = $_POST['urlformat'];
 
 	if (!preg_match('/^([a-z]{2,})$/',$type))
@@ -73,5 +83,6 @@
 		'name' =>  mb_strtolower($name),
 		'plural' => mb_strtolower($plural),
-		'icon' => $_POST['icon']
+		'icon' => $_POST['icon'],
+		'urlformat' => $_POST['urlformat'],
 	);
 
@@ -139,29 +150,11 @@
 <?php
 echo
-'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Supplementary post types').'</h2>';
+'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Supplementary post types');
+if (!$add_type) {
+	echo ' &rsaquo; <a class="button" id="muppet-control" href="#">'.
+	__('New post type').'</a>';
+}
+echo '</h2>';
 echo $msg;
-echo '<h3>'.__('My post types').'</h3>';
-if (empty($my_types))
-{
-	echo '<p>'.__('No type has been defined yet.').'</p>';
-}
-else
-{
-	foreach ($my_types as $k => $v)
-	{
-		$plural = empty($v['plural']) ? $v['name'].'s' : $v['plural'];
-		$redir = 'plugin.php?p=muppet&amp;edit=';
-		
-		echo
-		'<div class="post" style="width:180px; float:left;">'.
-		'<h4><a class="none" href="'.$redir.$k.'"><img src="images/edit-mini.png" alt="" title="'.__('edit this post type').'" /></a>&nbsp;'.sprintf(__('Type: <span class="hot">%s</span>'),$k).'</h4>'.
-		'<dl class="list">'.
-		'<dt>'.__('Name:').'</dt><dd>'.$v['name'].'&nbsp;('.$plural.')</dd>'.
-		'<dt>'.__('Menu image:').'</dt><dd><img src="index.php?pf=muppet/img/'.$v['icon'].'" alt="'.$v['icon'].'" /></dd>'.
-		'<dt>'.__('Permission:').'</dt><dd>'.sprintf(__('manage the %s'),$plural).'</dd>'.
-		'</dl>'.
-		'</div>';
-	}
-}
 
 $legend = __('Create a new post type');
@@ -176,4 +169,5 @@
 		$plural = $my_types[$edit]['plural'];
 		$icon = $my_types[$edit]['icon'];
+		$post_url = $my_types[$edit]['urlformat'];
 		$legend = __('Modify a post type');
 		$label_add = __('Save');
@@ -182,10 +176,4 @@
 
 $preview_icon = '<img class="icon" src="index.php?pf=muppet/img/'.$icon.'" alt="'.$icon.'" title="'.$icon.'" id="icon-preview" />';
-
-
-if (!$add_type) {
-	echo '<div class="clear" id="new-type"><p><a class="new" id="muppet-control" href="#">'.
-	__('Create a new post type').'</a></p></div>';
-}
 
 echo
@@ -203,4 +191,6 @@
 '<p><label class="classic required" title="'.__('Required field').'">'.__('Image:').' '.
 form::combo('icon',$icons,$icon).'</label>'.$preview_icon.'</p>'.
+'<p><label class="" >'.__('New post URL format:').' '.
+form::combo('urlformat',$post_url_combo,$post_url).'</label></p>'.
 '<p>'.form::hidden(array('p'),'muppet').
 $core->formNonce().
@@ -211,15 +201,41 @@
 '</form></div>';
 
+if (empty($my_types))
+{
+	echo '<p>'.__('No type has been defined yet.').'</p>';
+}
+else
+{
+	echo '<div class="media-list">';
+	foreach ($my_types as $k => $v)
+	{
+		$plural = empty($v['plural']) ? $v['name'].'s' : $v['plural'];
+		$redir = 'plugin.php?p=muppet&amp;edit=';
+		
+		echo
+		'<div class="media-item">
+		<a class="media-icon media-link" href="'.$redir.$k.'" title="'.__('edit this post type').'" ><img src="index.php?pf=muppet/img/'.$v['icon'].'" alt="'.$v['icon'].'" /></a>
+		<ul class="list">
+		<li><h3><a href="'.$redir.$k.'" title="'.__('edit this post type').'" >'.$k.'</a></h3></li>
+		<li><strong>'.__('Name:').'</strong> '.$v['name'].'&nbsp;- <em>'.$plural.'</em></li>
+		<li><strong>'.__('Permission:').'</strong> '.sprintf(__('manage the %s'),$plural).'</li>
+		<li><strong>'.__('New post URL format:').'</strong> '.$v['urlformat'].'</li>
+		</ul>
+		</div>';
+	}
+	echo '</div>';
+}
+
 if (empty($counts))
 {
 	echo
-	'<form action="'.$p_url.'" method="post" id="get-infos">'.
-	'<h3>'.__('Statistics').'</h3>'.
-	'<p><input type="submit" name="getinfo" value="'.__('Retrieve types from database').'" /> '.
+	'<form action="'.$p_url.'" method="post" id="get-infos">
+	<p class="clear right"><input type="submit" name="getinfo" value="'.__('Statistics').'" /> '.
 	$core->formNonce().
-	form::hidden(array('p'),'muppet').'</p>'.
-	'</form>';
-}
-else
+	form::hidden(array('p'),'muppet').
+	'</p>
+	</form>';
+}
+if (!empty($counts))
 {
 	$line = '';
@@ -230,10 +246,8 @@
 	}
 	echo 
-	'<div class="col">'.
-	'<h3>'.__('Statistics').'</h3>'.
-	'<ul>'.$line.'</ul>'.
-	'</div>';
-}
-
+	'<div class="clear col">
+	<ul>'.$line.'</ul>
+	</div>';
+}
 ?>
 </body>
