Index: /extensions/Piwecard/admin/consult.php
===================================================================
--- /extensions/Piwecard/admin/consult.php	(revision 19924)
+++ /extensions/Piwecard/admin/consult.php	(revision 19925)
@@ -29,5 +29,5 @@
 	{
 		$me->delete_allinvalid_ecard();
-		redirect( ECARD_ADMIN . '-consult);
+		redirect( ECARD_ADMIN . '-consult');
 	}
 } 
Index: /extensions/Piwecard/css/piwecard.css
===================================================================
--- /extensions/Piwecard/css/piwecard.css	(revision 19924)
+++ /extensions/Piwecard/css/piwecard.css	(revision 19925)
@@ -1,2 +1,5 @@
+/* +-----------------------------------------------------------------------+
+ * | Ecard form                                                            |
+ * +-----------------------------------------------------------------------+ */
 #addECardForm {
 	line-height: 1.5em;
@@ -65,2 +68,28 @@
 	font-weight: bold;
 }
+
+/* +-----------------------------------------------------------------------+
+ * | Publish ecard                                                         |
+ * +-----------------------------------------------------------------------+ */
+#ecard .ecard_invalid {
+	font-style: italic;
+	font-weight: bold;
+}
+
+#ecard .ecard_center {
+	width: 100%;
+	text-align: center;
+}
+
+#ecard #ecard_image_title {
+	font-size: 0.8em;
+}
+
+#ecard #ecard_image_author {
+	font-size: 0.8em;
+	font-style: italic;
+}
+
+#ecard .ecard_top_space {
+	margin-top: 3em;
+}
Index: /extensions/Piwecard/include/config_param.inc.php
===================================================================
--- /extensions/Piwecard/include/config_param.inc.php	(revision 19924)
+++ /extensions/Piwecard/include/config_param.inc.php	(revision 19925)
@@ -15,5 +15,5 @@
 		'%ecardmessage%'	=> isset($_POST['ecard_message']) ? $_POST['ecard_message'] : ''  ,	
 		'%pictureurl%'		=> DerivativeImage::thumb_url($image_element) ,
-		'%pictureinfos%'		=> isset($image_element['picture_infos']) ? $image_element['picture_infos'] : ''  ,
+		'%pictureinfos%'	=> isset($image_element['picture_infos']) ? $image_element['picture_infos'] : ''  ,
 		);
 
Index: /extensions/Piwecard/include/default_values.inc.php
===================================================================
--- /extensions/Piwecard/include/default_values.inc.php	(revision 19924)
+++ /extensions/Piwecard/include/default_values.inc.php	(revision 19925)
@@ -7,9 +7,10 @@
 
 // message for the mail when only a link is sent
-$ecard_default_values['message_link'] = "Bonjour %recipientname%! 
+$ecard_default_values['message_link'] = 
+"Bonjour %recipientname% ! 
 %yourname% vous a envoy&eacute; une eCard depuis le site %website%. 
-Vous pouvez la consulter sur %ecardurl%.
-	A bientot sur %website% (%websiteurl%) !
-	Le Webmaster";
+Vous pouvez la consulter sur %ecardurl% .
+A bientot sur %website% (%websiteurl% ) !
+Le Webmaster";
 
 
@@ -26,10 +27,10 @@
 
 $ecard_default_values['active_parameter'] = true;	// Add function for a user to choice the valid duration for an ecard
-$ecard_default_values['message_HTML'] = 'Bonjour %recipientname%! 
+$ecard_default_values['message_HTML'] = 'Bonjour %recipientname% ! 
 <b>%yourname%</b> vous a envoy&eacute; une eCard depuis le site <a href="%websiteurl%">%website%</a> :
 
 <b>%ecardsubject%<b>
 	<a href="%ecardurl%"> 
-	<img class="theImage" src="%pictureurl%"/> 
+	<img class="theImage" src="%pictureurl%" /> 
 	</a>
 	%pictureinfos%
@@ -41,5 +42,5 @@
 Le Webmaster';
 
-$ecard_default_values['ecard_showinfos']	= false;	// Default : dont show infos under image in ecard
+$ecard_default_values['ecard_showinfos']	= true;	// Default : show infos under image in ecard
 $ecard_default_values['defaultmail']	    = '';	    // Default mail used for guest user
 ?>
Index: /extensions/Piwecard/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Piwecard/language/fr_FR/plugin.lang.php	(revision 19924)
+++ /extensions/Piwecard/language/fr_FR/plugin.lang.php	(revision 19925)
@@ -17,5 +17,5 @@
 $lang['ecard_send']						= 'Envoyer';
 $lang['ecard_cancel']					= 'Annuler';
-$lang['ecard_validity_label']				= 'Durée de validité';
+$lang['ecard_validity_label']			= 'Durée de validité';
 $lang['ecard_send_method']				= 'Méthode d\'envoi';
 $lang['ecard_maillink']					= 'Mail avec lien';
Index: /extensions/Piwecard/maintain.inc.php
===================================================================
--- /extensions/Piwecard/maintain.inc.php	(revision 19924)
+++ /extensions/Piwecard/maintain.inc.php	(revision 19925)
@@ -6,5 +6,4 @@
 
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
 
 function plugin_install() {
@@ -17,5 +16,5 @@
 	// ecard description
 		$q = 'CREATE TABLE `' . $prefixeTable . 'ecard` (
-					  `numero` CHAR(15) not null,
+					  `numero` CHAR(64) not null,
 					  `nomexp` CHAR(100) not null,
 					  `nomdest` CHAR(100) not null,
Index: /extensions/Piwecard/publish.php
===================================================================
--- /extensions/Piwecard/publish.php	(revision 19924)
+++ /extensions/Piwecard/publish.php	(revision 19925)
@@ -4,23 +4,17 @@
 global $template;
 
-$me = new ecard();
+$ecard = new ecard();
 
-$num = explode('ecard/' , $_SERVER['REQUEST_URI']);
-$numero = $num[1];
+$ecard_id = explode('ecard/', $_SERVER['REQUEST_URI']);
+$ecard_id = $ecard_id[1];
 
-//echo "numero=".$numero;
+if (isset($ecard_id) and $ecard_id != '' and $ecard->is_valid($ecard_id)) {
+	$query = 'SELECT * FROM '.ECARD_TABLE.' WHERE numero = "'.$ecard_id.'";';
+	$result = pwg_query($query);
+	$result_array = mysql_fetch_assoc($result);
 
-if (isset($num[1]) and $num[1] != '' and $me->is_valid($numero))
-{
-
-	$query = 'SELECT * FROM '.ECARD_TABLE.' WHERE numero = "'.$numero.'";';
-	$result = pwg_query($query);
-	$tableau = mysql_fetch_assoc($result);
-
-	if (isset($tableau['numero']))
-		{
-	 // Recover img infos.
-		$query = 'SELECT DISTINCT * FROM ' . IMAGES_TABLE.' AS img'
-				.' WHERE img.id = '.$tableau['image'].';';
+	if (isset($result_array['numero'])) {
+		//Recover img infos.
+		$query = 'SELECT DISTINCT * FROM '.IMAGES_TABLE.' AS img WHERE img.id = '.$result_array['image'].';';
 		$result = pwg_query($query);
 
@@ -35,45 +29,24 @@
 		);
 		unset_make_full_url();
-	/*
-		foreach ($tableau as $i => $v)
-		echo '['.$i.']='.$v."\n";
 
-		echo "id=".$row['id'];
-		echo "file=".$row['file'];
-	*/
-	// Envoi de la page
-		$template->assign( 'ecard', array(
-				'sujet' => $tableau['sujet'],
-				'img' => $tableau['image'],
-				'message' => $tableau['message'],
-				'url'	=> $url,
-				'name'  => $row['name'],
-				'thumb'	=> DerivativeImage::thumb_url($row),
-				'img' 	=> DerivativeImage::url(IMG_LARGE, $row),
-				'adrexp' => $tableau['adrexp'],
-				'nomexp' => $tableau['nomexp'],
-				'title'	 => $me->my_config['ecard_showinfos'] ? $row['name'] : null,
-				'author' => $me->my_config['ecard_showinfos'] ? $row['author'] : null
+		//Assign variables to template
+		$template->assign('ecard', array(
+				'subject' 		=> $result_array['sujet'],
+				'image' 		=> $result_array['image'],
+				'message' 		=> $result_array['message'],
+				'url'			=> $url,
+				'name' 			=> $row['name'],
+				'image' 		=> DerivativeImage::url(IMG_LARGE, $row),
+				'sender_email' 	=> $result_array['adrexp'],
+				'sender_name' 	=> $result_array['nomexp'],
+				'image_title'	=> $ecard->my_config['ecard_showinfos'] ? $row['name'] : null,
+				'image_author' 	=> $ecard->my_config['ecard_showinfos'] ? $row['author'] : null
 				));
 		
-		}  
-
-	 
-	 $template->assign(array(
-	  'TITLE' => "ecard : ".$tableau['sujet']));
-
+	}
 }
 $template->set_filenames(array('ecard_result' =>  ECARD_ROOT.'/template/publish.tpl'));
 $template->concat('PLUGIN_INDEX_CONTENT_BEGIN', $template->parse('ecard_result', true));
   
-  
-$template->assign('PLUGIN_INDEX_ACTIONS' , '
-<li><a href="' . make_index_url() . '" title="' . l10n('return to homepage') . '">
-  <img src="' . $template->get_themeconf('icon_dir') . '/home.png" class="button" alt="' . l10n('home') . '"/></a>
-</li>');
-
-
 $template->clear_assign(array('U_MODE_POSTED', 'U_MODE_CREATED'));
-$template->clear_assign('MENUBAR');
-
 ?>
Index: /extensions/Piwecard/template/publish.tpl
===================================================================
--- /extensions/Piwecard/template/publish.tpl	(revision 19924)
+++ /extensions/Piwecard/template/publish.tpl	(revision 19925)
@@ -1,61 +1,26 @@
-<div class="ecard">
-{if !isset($ecard)}
-<i><b>{'ecard_invalid_ecard'|@translate}</b></i>
-{else}
-	<fieldset> 
-		<legend><img class="thumbnail" src="{$ecard.thumb}" alt="{$ecard.name}" title="{$ecard.name}"/></legend> 
+<div id="ecard">
+	{if !isset($ecard)}
+		<span class="ecard_invalid">{'ecard_invalid_ecard'|@translate}</span>
+	{else}
+		<fieldset>
+			<legend>{$ecard.subject}</legend>
+			<div class="ecard_center">
+				<a href="{$ecard.url}" alt="{$ecard.url}"> 
+					<img class="theImage" src="{$ecard.image}" alt="{$ecard.name}" title="{$ecard.name}"/> 
+				</a>
 
-	<table width="100%" border="0" cellpadding="5">
-		<tr>
-			<td>
-				<i>{'ecard_infos'|@translate} </i>
-				
-			</td>
-		</tr>
-
-		<tr>
-			<td>
-				<b><h2><div align="center">{$ecard.sujet}</div></h2></b>
-				
-			</td>
-		</tr>
-		<tr>
-			<td>
-				<div align="center">
-					<a href="{$ecard.url}"> 
-					<img class="theImage" src="{$ecard.img}" alt="{$ecard.name}" title="{$ecard.name}"/> 
-					</a>
-
-				<br>
-				{if isset($ecard.title)}
-				<tr>
-					<td align="center">
-					<small><i>{$ecard.title} </i>{if isset($ecard.author)}(<u>{$ecard.author}</u>){/if}</small>
-					</td>
-				</tr>
+			</div>
+			<div class="ecard_center">
+				{if isset($ecard.image_title)}
+					<span id="ecard_image_title">{$ecard.image_title} </span><span id="ecard_image_author">{if isset($ecard.image_author)}({$ecard.image_author}){/if}</span>
 				{/if}
-				</div>
-			</td>
-		</tr>
-		<tr>
-			<td><div align="center"></div>
-			</td>
-		</tr>
-		<tr>
-			<td>
-			<div align="center">{$ecard.message}
-			</div><br>
-			</td>
-		</tr>
-		<tr>
-			<td><div align="center"></div>
-			</td>
-		</tr>
-		<tr>
-			<td><div align="center"><hr>{'ecard_publish_bottom'|@translate} <a href='mailto:{$ecard.adrexp}'>{$ecard.nomexp}</a> .</div>
-			</td>
-		</tr>
-	</table>
-	</fieldset> 
-{/if}
+			</div>
+			<div class="ecard_center ecard_top_space">
+				{$ecard.message}
+			</div>
+			<hr class="ecard_top_space" />
+			<div class="ecard_center">
+				{'ecard_publish_bottom'|@translate} <a href="mailto:{$ecard.sender_email}" alt="{$ecard.sender_email}">{$ecard.sender_name}</a>.
+			</div>
+	{/if}
 </div>
