Index: /extensions/GuestBook/admin.php
===================================================================
--- /extensions/GuestBook/admin.php	(revision 26064)
+++ /extensions/GuestBook/admin.php	(revision 26065)
@@ -1,4 +1,4 @@
 <?php
-if(!defined('GUESTBOOK_PATH')) die('Hacking attempt!');
+defined('GUESTBOOK_PATH') or die('Hacking attempt!');
 
 global $template, $page;
Index: /extensions/GuestBook/admin/config.php
===================================================================
--- /extensions/GuestBook/admin/config.php	(revision 26064)
+++ /extensions/GuestBook/admin/config.php	(revision 26065)
@@ -1,4 +1,4 @@
 <?php
-if (!defined('GUESTBOOK_PATH')) die('Hacking attempt!');
+defined('GUESTBOOK_PATH') or die('Hacking attempt!');
 
 if (isset($_POST['submit']))
@@ -15,5 +15,5 @@
     
   conf_update_param('guestbook', serialize($conf['guestbook']));
-  array_push($page['infos'], l10n('Information data registered in database'));
+  $page['infos'][] = l10n('Information data registered in database');
 }
 
Index: /extensions/GuestBook/admin/pending.php
===================================================================
--- /extensions/GuestBook/admin/pending.php	(revision 26064)
+++ /extensions/GuestBook/admin/pending.php	(revision 26065)
@@ -12,12 +12,9 @@
   if (empty($_POST['comments']))
   {
-    array_push(
-      $page['errors'],
-      l10n('Select at least one comment')
-      );
+    $page['errors'][] =l10n('Select at least one comment');
   }
   else
   {
-    include_once( GUESTBOOK_PATH .'include/functions_comment.inc.php' );
+    include_once(GUESTBOOK_PATH .'include/functions_comment.inc.php');
     check_input_parameter('comments', $_POST, true, PATTERN_ID);
     
@@ -26,10 +23,7 @@
       validate_user_comment_guestbook($_POST['comments']);
 
-      array_push(
-        $page['infos'],
-        l10n_dec(
-          '%d user comment validated', '%d user comments validated',
-          count($_POST['comments'])
-          )
+      $page['infos'][] = l10n_dec(
+        '%d user comment validated', '%d user comments validated',
+        count($_POST['comments'])
         );
     }
@@ -39,10 +33,7 @@
       delete_user_comment_guestbook($_POST['comments']);
 
-      array_push(
-        $page['infos'],
-        l10n_dec(
-          '%d user comment rejected', '%d user comments rejected',
-          count($_POST['comments'])
-          )
+      $page['infos'][] =l10n_dec(
+        '%d user comment rejected', '%d user comments rejected',
+        count($_POST['comments'])
         );
     }
@@ -75,4 +66,5 @@
 ;';
 $result = pwg_query($query);
+
 while ($row = pwg_db_fetch_assoc($result))
 {
@@ -101,13 +93,12 @@
     );
 
-  array_push($list, $row['id']);
+  $list[] = $row['id'];
 }
 
-$template->assign('LIST', implode(',', $list) );
 
-$template->assign('F_ACTION', GUESTBOOK_ADMIN . '-pending');
-
+$template->assign(array(
+  'LIST' => implode(',', $list),
+  'F_ACTION' => GUESTBOOK_ADMIN . '-pending',
+  ));
 
 $template->set_filename('guestbook', realpath(GUESTBOOK_PATH . 'admin/template/pending.tpl'));
-
-?>
Index: /extensions/GuestBook/admin/template/config.tpl
===================================================================
--- /extensions/GuestBook/admin/template/config.tpl	(revision 26064)
+++ /extensions/GuestBook/admin/template/config.tpl	(revision 26065)
@@ -1,5 +1,5 @@
-{combine_css path=$GUESTBOOK_PATH|@cat:'template/style.css'}
+{combine_css path=$GUESTBOOK_PATH|cat:'template/style.css'}
 
-{footer_script}{literal}
+{footer_script}
 $('input[name="comments_validation"]').on('change', function() {
     $('#email_admin_on_comment_validation').toggle($(this).is(':checked'));
@@ -11,8 +11,9 @@
 })
 .trigger('change');
-{/literal}{/footer_script}
+{/footer_script}
+
 
 <div class="titrePage">
-  <h2>{'GuestBook'|@translate}</h2>
+  <h2>GuestBook</h2>
 </div>
 
@@ -23,5 +24,5 @@
     <li>
       <label>
-        <b>{'Number of comments per page'|@translate}</b>
+        <b>{'Number of comments per page'|translate}</b>
         <input type="text" size="3" maxlength="4" name="nb_comment_page" id="nb_comment_page" value="{$nb_comment_page}">
       </label>
@@ -31,5 +32,5 @@
       <label>
         <input type="checkbox" name="activate_rating" {if ($activate_rating)}checked="checked"{/if}>
-        <b>{'Activate rating'|@translate}</b>
+        <b>{'Activate rating'|translate}</b>
       </label>
     </li>
@@ -38,29 +39,29 @@
       <label>
         <input type="checkbox" name="comments_validation" {if ($comments_validation)}checked="checked"{/if}>
-        <b>{'Validation'|@translate}</b>
+        <b>{'Validation'|translate}</b>
       </label>
     </li>
 
     <li>
-      <strong>{'Notify administrators when a comment is'|@translate}</strong>
+      <strong>{'Notify administrators when a comment is'|translate}</strong>
 
       <label>
-        <input type="checkbox" name="email_admin_on_comment" {if ($email_admin_on_comment)}checked="checked"{/if}> {'added'|@translate}
+        <input type="checkbox" name="email_admin_on_comment" {if ($email_admin_on_comment)}checked="checked"{/if}> {'added'|translate}
       </label>
 
       <label id="email_admin_on_comment_validation">
-        <input type="checkbox" name="email_admin_on_comment_validation" {if ($email_admin_on_comment_validation)}checked="checked"{/if}> {'pending validation'|@translate}
+        <input type="checkbox" name="email_admin_on_comment_validation" {if ($email_admin_on_comment_validation)}checked="checked"{/if}> {'pending validation'|translate}
       </label>
     </li>
     
     <li>
-      <strong>{'Guests (not registered) permissions :'|@translate}</strong>
+      <strong>{'Guests (not registered) permissions :'|translate}</strong>
 
       <label>
-        <input type="checkbox" name="guest_can_view" {if ($guest_can_view)}checked="checked"{/if}> {'view comments'|@translate}
+        <input type="checkbox" name="guest_can_view" {if ($guest_can_view)}checked="checked"{/if}> {'view comments'|translate}
       </label>
 
       <label id="guest_can_add">
-        <input type="checkbox" name="guest_can_add" {if ($guest_can_add)}checked="checked"{/if}> {'add comment'|@translate}
+        <input type="checkbox" name="guest_can_add" {if ($guest_can_add)}checked="checked"{/if}> {'add comment'|translate}
       </label>
     </li>
@@ -69,5 +70,5 @@
 
   <p class="formButtons">
-		<input type="submit" name="submit" value="{'Save Settings'|@translate}">
+		<input type="submit" name="submit" value="{'Save Settings'|translate}">
 	</p>
 </form>
Index: /extensions/GuestBook/admin/template/pending.tpl
===================================================================
--- /extensions/GuestBook/admin/template/pending.tpl	(revision 26064)
+++ /extensions/GuestBook/admin/template/pending.tpl	(revision 26065)
@@ -1,54 +1,52 @@
-{combine_css path=$GUESTBOOK_PATH|@cat:'admin/template/style.css'}
+{combine_css path=$GUESTBOOK_PATH|cat:'admin/template/style.css'}
 
 <div class="titrePage">
-  <h2>{'GuestBook'|@translate}</h2>
+  <h2>GuestBook</h2>
 </div>
 
-{footer_script}{literal}
-jQuery(document).ready(function(){
-  function highlighComments() {
-    jQuery(".checkComment").each(function() {
-      var parent = jQuery(this).parent('tr');
-      if (jQuery(this).children("input[type=checkbox]").is(':checked')) {
-        jQuery(parent).addClass('selectedComment'); 
-      }
-      else {
-        jQuery(parent).removeClass('selectedComment'); 
-      }
-    });
+{footer_script}
+function highlighComments() {
+  jQuery(".checkComment").each(function() {
+    var parent = jQuery(this).parent('tr');
+    if (jQuery(this).children("input[type=checkbox]").is(':checked')) {
+      jQuery(parent).addClass('selectedComment'); 
+    }
+    else {
+      jQuery(parent).removeClass('selectedComment'); 
+    }
+  });
+}
+
+jQuery(".checkComment").click(function(event) {
+  var checkbox = jQuery(this).children("input[type=checkbox]");
+  if (event.target.type !== 'checkbox') {
+    jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked'));
   }
+  highlighComments();
+});
 
-  jQuery(".checkComment").click(function(event) {
-    var checkbox = jQuery(this).children("input[type=checkbox]");
-    if (event.target.type !== 'checkbox') {
-      jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked'));
-    }
-    highlighComments();
+jQuery("#commentSelectAll").click(function() {
+  jQuery(".checkComment input[type=checkbox]").attr('checked', true);
+  highlighComments();
+  return false;
+});
+
+jQuery("#commentSelectNone").click(function() {
+  jQuery(".checkComment input[type=checkbox]").attr('checked', false);
+  highlighComments();
+  return false;
+});
+
+jQuery("#commentSelectInvert").click(function() {
+  jQuery(".checkComment input[type=checkbox]").each(function() {
+    jQuery(this).attr('checked', !$(this).is(':checked'));
   });
+  highlighComments();
+  return false;
+});
+{/footer_script}
 
-  jQuery("#commentSelectAll").click(function () {
-    jQuery(".checkComment input[type=checkbox]").attr('checked', true);
-    highlighComments();
-    return false;
-  });
 
-  jQuery("#commentSelectNone").click(function () {
-    jQuery(".checkComment input[type=checkbox]").attr('checked', false);
-    highlighComments();
-    return false;
-  });
-
-  jQuery("#commentSelectInvert").click(function () {
-    jQuery(".checkComment input[type=checkbox]").each(function() {
-      jQuery(this).attr('checked', !$(this).is(':checked'));
-    });
-    highlighComments();
-    return false;
-  });
-
-});
-{/literal}{/footer_script}
-
-{if !empty($comments) }
+{if !empty($comments)}
 <form method="post" action="{$F_ACTION}" id="pendingComments">
   
@@ -74,17 +72,17 @@
 
   <p class="checkActions">
-    {'Select:'|@translate}
-    <a href="#" id="commentSelectAll">{'All'|@translate}</a>,
-    <a href="#" id="commentSelectNone">{'None'|@translate}</a>,
-    <a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
+    {'Select:'|translate}
+    <a href="#" id="commentSelectAll">{'All'|translate}</a>,
+    <a href="#" id="commentSelectNone">{'None'|translate}</a>,
+    <a href="#" id="commentSelectInvert">{'Invert'|translate}</a>
   </p>
 
   <p class="bottomButtons">
-    <input class="submit" type="submit" name="validate" value="{'Validate'|@translate}">
-    <input class="submit" type="submit" name="reject" value="{'Reject'|@translate}">
+    <input class="submit" type="submit" name="validate" value="{'Validate'|translate}">
+    <input class="submit" type="submit" name="reject" value="{'Reject'|translate}">
   </p>
 
 </form>
 {else}
-{'No pending comment'|@translate}
+{'No pending comment'|translate}
 {/if}
Index: /extensions/GuestBook/include/events.inc.php
===================================================================
--- /extensions/GuestBook/include/events.inc.php	(revision 26064)
+++ /extensions/GuestBook/include/events.inc.php	(revision 26065)
@@ -4,8 +4,8 @@
 function gb_admin_menu($menu) 
 {
-  array_push($menu, array(
+  $menu[] = array(
     'NAME' => 'GuestBook',
     'URL' => GUESTBOOK_ADMIN,
-  ));
+  );
   return $menu;
 }
@@ -24,9 +24,9 @@
   if ( ($block = $menu->get_block('mbMenu')) != null )
   {
-    array_push($block->data, array(
+    $block->data[] = array(
       'URL' => GUESTBOOK_URL,
       'TITLE' => l10n('GuestBook'),
       'NAME' => l10n('GuestBook')
-    ));
+    );
   }
 }
@@ -38,7 +38,9 @@
   if ($tokens[0] == 'guestbook')
   {
-    add_event_handler('loc_begin_page_header', 'gb_page_header');
+    $page['section'] = 'guestbook';
+    $page['body_id'] = 'theGuestBook';
+    $page['is_external'] = true;
+    $page['is_homepage'] = false;
     
-    $page['section'] = 'guestbook';
     $page['title'] = l10n('GuestBook');
     $page['section_title'] = '<a href="'.get_gallery_home_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].l10n('GuestBook');
@@ -46,33 +48,16 @@
 }
 
-function gb_page_header()
-{
-  global $page;
-  $page['body_id'] = 'theGuestBook';
-}
-
 function gb_index() 
 {
   global $template, $page, $conf;
-  
-  if (is_a_guest() && !$conf['guestbook']['guest_can_view'])
-  {
-    access_denied();
-  }
 
   if (isset($page['section']) and $page['section'] == 'guestbook')
   {
+    if (is_a_guest() && !$conf['guestbook']['guest_can_view'])
+    {
+      access_denied();
+    }
+  
     include(GUESTBOOK_PATH . '/include/guestbook.inc.php');
   }
 }
-
-/*function gb_register_stuffs_module($modules)
-{
-  array_push($modules, array(
-    'path' => GUESTBOOK_PATH . '/stuffs_module',
-    'name' => GB_NAME,
-    'description' => l10n('gb_stuffs_desc'),
-  ));
-
-  return $modules;
-}*/
Index: /extensions/GuestBook/include/functions.inc.php
===================================================================
--- /extensions/GuestBook/include/functions.inc.php	(revision 26064)
+++ /extensions/GuestBook/include/functions.inc.php	(revision 26065)
@@ -1,8 +1,8 @@
 <?php
-if (!defined('GUESTBOOK_PATH')) die('Hacking attempt!');
+defined('GUESTBOOK_PATH') or die('Hacking attempt!');
 
 function get_stars($score, $path)
 {
-  if ($score === null) return null;
+  if (!isset($score)) return null;
   
   $max = 5;
@@ -10,5 +10,5 @@
   $floor = floor($score);
   
-  $html = null;
+  $html = '';
   for ($i=1; $i<=$floor; $i++)
   {
Index: /extensions/GuestBook/include/functions_comment.inc.php
===================================================================
--- /extensions/GuestBook/include/functions_comment.inc.php	(revision 26064)
+++ /extensions/GuestBook/include/functions_comment.inc.php	(revision 26065)
@@ -1,8 +1,7 @@
 <?php
-if (!defined('GUESTBOOK_PATH')) die('Hacking attempt!');
+defined('GUESTBOOK_PATH') or die('Hacking attempt!');
 
 include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
-add_event_handler('user_comment_check_guestbook', 'user_comment_check',
-  EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+
 
 function insert_user_comment_guestbook( &$comm, $key )
@@ -10,5 +9,5 @@
   global $conf, $user, $page;
 
-  $comm = array_merge( $comm,
+  $comm = array_merge($comm,
     array(
       'ip' => $_SERVER['REMOTE_ADDR'],
@@ -19,17 +18,17 @@
   if (!$conf['guestbook']['comments_validation'] or is_admin())
   {
-    $comment_action='validate'; //one of validate, moderate, reject
-  }
-  else
-  {
-    $comment_action='moderate'; //one of validate, moderate, reject
-  }
-
-  // display author field if the user status is guest or generic
+    $comment_action='validate';
+  }
+  else
+  {
+    $comment_action='moderate';
+  }
+
+  // author
   if (!is_classic_user())
   {
-    if ( empty($comm['author']) )
-    {
-      array_push($page['errors'], l10n('Please enter your username'));
+    if (empty($comm['author']))
+    {
+      $page['errors'][] = l10n('Please enter your username');
       $comment_action='reject';
     }
@@ -37,15 +36,16 @@
     {
       $comm['author_id'] = $conf['guest_id'];
-      // if a guest try to use the name of an already existing user, he must be
-      // rejected
+      // if a guest try to use the name of an already existing user,
+      // he must be rejected
       $query = '
 SELECT COUNT(*) AS user_exists
   FROM '.USERS_TABLE.'
-  WHERE '.$conf['user_fields']['username']." = '".addslashes($comm['author'])."'";
-      $row = pwg_db_fetch_assoc( pwg_query( $query ) );
+  WHERE '.$conf['user_fields']['username']." = '".addslashes($comm['author'])."'
+;";
+      $row = pwg_db_fetch_assoc(pwg_query($query));
       
-      if ( $row['user_exists'] == 1 )
+      if ($row['user_exists'] == 1)
       {
-        array_push($page['errors'], l10n('This login is already used by another user') );
+        $page['errors'][] = l10n('This login is already used by another user');
         $comment_action='reject';
       }
@@ -58,10 +58,12 @@
   }
 
-  if ( empty($comm['content']) )
-  { // empty comment content
-    $comment_action='reject';
-  }
-
-  if ( !verify_ephemeral_key(@$key) )
+  // content
+  if (empty($comm['content']))
+  {
+    $comment_action='reject';
+  }
+
+  // key
+  if (!verify_ephemeral_key(@$key))
   {
     $comment_action='reject';
@@ -70,27 +72,27 @@
   
   // email
-  if ( empty($comm['email']) and is_classic_user() and !empty($user['email']) )
+  if (empty($comm['email']) and is_classic_user() and !empty($user['email']))
   {
     $comm['email'] = $user['email'];
   }
-  else if ( empty($comm['email']) and $conf['comments_email_mandatory'] )
-  {
-    array_push($page['errors'], l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'));
-    $comment_action='reject';
-  }
-  else if ( !empty($comm['email']) and !email_check_format($comm['email']) )
-  {
-    array_push($page['errors'], l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'));
+  else if (empty($comm['email']) and $conf['comments_email_mandatory'])
+  {
+    $page['errors'][] = l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)');
+    $comment_action='reject';
+  }
+  else if (!empty($comm['email']) and !email_check_format($comm['email']))
+  {
+    $page['errors'][] = l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)');
     $comment_action='reject';
   }
   
   // website
-  if ( !empty($comm['website']) and !preg_match('/^(https?:\/\/)/i', $comm['website']) )
+  if (!empty($comm['website']) and !preg_match('/^(https?:\/\/)/i', $comm['website']))
   {
     $comm['website'] = 'http://'.$comm['website'];
   }
-  if ( !empty($comm['website']) and !url_check_format($comm['website']) )
-  {
-    array_push($page['errors'], l10n('invalid website address'));
+  if (!empty($comm['website']) and !url_check_format($comm['website']))
+  {
+    $page['errors'][] = l10n('invalid website address');
     $comment_action='reject';
   }
@@ -125,5 +127,5 @@
     if ($counter > 0)
     {
-      array_push($page['errors'], l10n('Anti-flood system : please wait for a moment before trying to post another comment') );
+      $page['errors'][] = l10n('Anti-flood system : please wait for a moment before trying to post another comment');
       $comment_action='reject';
     }
@@ -131,9 +133,7 @@
   
   // perform more spam check
-  $comment_action = trigger_event('user_comment_check_guestbook',
-      $comment_action, $comm
-    );
-
-  if ( $comment_action!='reject' )
+  $comment_action = trigger_event('user_comment_check', $comment_action, $comm);
+
+  if ($comment_action!='reject')
   {
     $query = '
@@ -175,6 +175,5 @@
       $comment_url = add_url_params(GUESTBOOK_URL, array('comment_id'=>$comm['id']));
 
-      $keyargs_content = array
-      (
+      $keyargs_content = array(
         get_l10n_args('Author: %s', stripslashes($comm['author']) ),
         get_l10n_args('Comment: %s', stripslashes($comm['content']) ),
@@ -189,6 +188,5 @@
       }
 
-      pwg_mail_notification_admins
-      (
+      pwg_mail_notification_admins(
         get_l10n_args('Comment by %s', stripslashes($comm['author']) ),
         $keyargs_content
@@ -196,4 +194,5 @@
     }
   }
+  
   return $comment_action;
 }
@@ -205,18 +204,18 @@
   $comment_action = 'validate';
 
-  if ( !verify_ephemeral_key($post_key) )
-  {
-    $comment_action='reject';
-  }
-  elseif (!$conf['guestbook']['comments_validation'] or is_admin()) // should the updated comment must be validated
-  {
-    $comment_action='validate'; //one of validate, moderate, reject
-  }
-  else
-  {
-    $comment_action='moderate'; //one of validate, moderate, reject
-  }
-
-  if ( $comment_action!='reject' )
+  if (!verify_ephemeral_key($post_key))
+  {
+    $comment_action='reject';
+  }
+  else if (!$conf['guestbook']['comments_validation'] or is_admin()) // should the updated comment must be validated
+  {
+    $comment_action='validate';
+  }
+  else
+  {
+    $comment_action='moderate';
+  }
+
+  if ($comment_action!='reject')
   {
     $user_where_clause = '';
@@ -244,6 +243,5 @@
       $comment_url = add_url_params(GUESTBOOK_URL, array('comment_id'=>$comm['id']));
 
-      $keyargs_content = array
-      (
+      $keyargs_content = array(
         get_l10n_args('Author: %s', stripslashes($GLOBALS['user']['username']) ),
         get_l10n_args('Comment: %s', stripslashes($comment['content']) ),
@@ -254,6 +252,5 @@
       );
 
-      pwg_mail_notification_admins
-      (
+      pwg_mail_notification_admins(
         get_l10n_args('Comment by %s', stripslashes($GLOBALS['user']['username']) ),
         $keyargs_content
@@ -274,4 +271,5 @@
 ;';
   $result = pwg_query($query);
+
   if (pwg_db_num_rows($result) == 0)
   {
@@ -296,11 +294,15 @@
   if (!is_admin())
   {
-    $user_where_clause = '   AND author_id = \''.$GLOBALS['user']['id'].'\'';
+    $user_where_clause = ' AND author_id = \''.$GLOBALS['user']['id'].'\'';
   }
   
   if (is_array($comment_id))
+  {
     $where_clause = 'id IN('.implode(',', $comment_id).')';
-  else
+  }
+  else
+  {
     $where_clause = 'id = '.$comment_id;
+  }
     
   $query = '
@@ -315,7 +317,11 @@
 {
   if (is_array($comment_id))
+  {
     $where_clause = 'id IN('.implode(',', $comment_id).')';
-  else
+  }
+  else
+  {
     $where_clause = 'id = '.$comment_id;
+  }
     
   $query = '
Index: /extensions/GuestBook/include/guestbook.inc.php
===================================================================
--- /extensions/GuestBook/include/guestbook.inc.php	(revision 26064)
+++ /extensions/GuestBook/include/guestbook.inc.php	(revision 26065)
@@ -4,5 +4,5 @@
 global $user;
 
-include(GUESTBOOK_PATH . '/include/functions.inc.php');
+include(GUESTBOOK_PATH . 'include/functions.inc.php');
 
 $url_self = empty($page['start']) ? GUESTBOOK_URL : add_url_params(GUESTBOOK_URL, array('start' => $page['start']));
@@ -106,11 +106,11 @@
 // |                                add comment                            |
 // +-----------------------------------------------------------------------+
-if ( isset( $_POST['content'] ) && (!is_a_guest() || $conf['guestbook']['guest_can_add']))
+if (isset($_POST['content']) && (!is_a_guest() || $conf['guestbook']['guest_can_add']))
 {
   $comm = array(
-    'author' => trim( @$_POST['author'] ),
-    'email' => trim( @$_POST['email'] ),
-    'content' => trim( $_POST['content'] ),
-    'website' => trim( $_POST['website'] ),
+    'author' => trim(@$_POST['author']),
+    'email' => trim(@$_POST['email']),
+    'content' => trim($_POST['content']),
+    'website' => trim($_POST['website']),
     'rate' => @$_POST['score'],
    );
@@ -123,11 +123,12 @@
   {
     case 'moderate':
-      array_push($page['infos'], l10n('An administrator must authorize your comment before it is visible.') );
+      $page['infos'][] = l10n('An administrator must authorize your comment before it is visible.');
     case 'validate':
-      array_push($page['infos'], l10n('Your comment has been registered'));
+      $page['infos'][] = l10n('Your comment has been registered');
       break;
     case 'reject':
       set_status_header(403);
-      array_push($page['errors'], l10n('Your comment has NOT been registered because it did not pass the validation rules') );
+      $template->assign('GB_OPEN', true);
+      $page['errors'][] = l10n('Your comment has NOT been registered because it did not pass the validation rules');
       break;
     default:
@@ -136,6 +137,6 @@
 
   // allow plugins to notify what's going on
-  trigger_action( 'user_comment_insertion',
-      array_merge($comm, array('action'=>$comment_action) )
+  trigger_action('user_comment_insertion',
+      array_merge($comm, array('action'=>$comment_action))
     );
 }
@@ -145,11 +146,11 @@
 // +-----------------------------------------------------------------------+
 $where_clauses = array('1=1');
-if ( !is_admin() )
-{
-  array_push($where_clauses, 'validated = \'true\'');
+if (!is_admin())
+{
+  $where_clauses[] = 'validated = \'true\'';
 }
 if (isset($_GET['comment_id']))
 {
-  array_push($where_clauses, 'com.id = '.pwg_db_real_escape_string($_GET['comment_id']));
+  $where_clauses[] = 'com.id = '.pwg_db_real_escape_string($_GET['comment_id']);
 }
 
@@ -161,5 +162,5 @@
   WHERE '.implode(' AND ', $where_clauses).'
 ;';
-$row = pwg_db_fetch_assoc( pwg_query( $query ) );
+$row = pwg_db_fetch_assoc(pwg_query($query));
 
 // navigation bar creation
@@ -178,10 +179,8 @@
   );
 
-$template->assign(
-  array(
-    'COMMENT_COUNT' => $row['nb_comments'],
-    'navbar' => $navigation_bar,
-    )
-  );
+$template->assign(array(
+  'COMMENT_COUNT' => $row['nb_comments'],
+  'navbar' => $navigation_bar,
+  ));
   
 if ($row['nb_comments'] > 0)
@@ -223,11 +222,10 @@
     }
 
-    $tpl_comment =
-      array(
-        'ID' => $row['id'],
-        'AUTHOR' => trigger_event('render_comment_author', $author),
-        'DATE' => format_date($row['date'], true),
-        'CONTENT' => trigger_event('render_comment_content',$row['content']),
-        'WEBSITE' => $row['website'],
+    $tpl_comment = array(
+      'ID' => $row['id'],
+      'AUTHOR' => trigger_event('render_comment_author', $author),
+      'DATE' => format_date($row['date'], true),
+      'CONTENT' => trigger_event('render_comment_content', $row['content']),
+      'WEBSITE' => $row['website'],
       );
       
@@ -276,11 +274,11 @@
       {
         $tpl_comment['U_VALIDATE'] = add_url_params(
-                $url_self,
-                array(
-                  'action' => 'validate_comment',
-                  'comment_to_validate' => $row['id'],
-                  'pwg_token' => get_pwg_token(),
-                  )
-                );
+          $url_self,
+          array(
+            'action' => 'validate_comment',
+            'comment_to_validate' => $row['id'],
+            'pwg_token' => get_pwg_token(),
+            )
+          );
       }
     }
@@ -316,19 +314,22 @@
 
   $template->assign('comment_add',
-      array(
-        'F_ACTION' => $url_self,
-        'KEY' => get_ephemeral_key(3),
-        'CONTENT' => $content,
-        'IS_LOGGED' => is_classic_user(),
-        'AUTHOR' => $author,
-        'WEBSITE' => $website,
-        'EMAIL' => $email,
-        'ACTIVATE_RATING' => $conf['guestbook']['activate_rating'],
-        'EMAIL_MANDATORY' => $conf['comments_email_mandatory'],
-      ));
-}
-
-$template->assign('ABS_GUESTBOOK_PATH', realpath(GUESTBOOK_PATH) . '/');
-$template->assign('GUESTBOOK_PATH', GUESTBOOK_PATH);
-
-$template->set_filename('index', realpath(GUESTBOOK_PATH . 'template/guestbook.tpl'));
+    array(
+      'F_ACTION' => $url_self,
+      'KEY' => get_ephemeral_key(3),
+      'CONTENT' => $content,
+      'IS_LOGGED' => is_classic_user(),
+      'AUTHOR' => $author,
+      'WEBSITE' => $website,
+      'EMAIL' => $email,
+      'ACTIVATE_RATING' => $conf['guestbook']['activate_rating'],
+      'EMAIL_MANDATORY' => $conf['comments_email_mandatory'],
+    ));
+}
+
+$template->assign(array(
+  'GUESTBOOK_PATH' => GUESTBOOK_PATH,
+  'ABS_GUESTBOOK_PATH' => realpath(GUESTBOOK_PATH) . '/',
+  ));
+
+$template->set_filename('guestbook', realpath(GUESTBOOK_PATH . 'template/guestbook.tpl'));
+$template->assign_var_from_handle('CONTENT', 'guestbook');
Index: tensions/GuestBook/include/install.inc.php
===================================================================
--- /extensions/GuestBook/include/install.inc.php	(revision 26064)
+++ 	(revision )
@@ -1,63 +1,0 @@
-<?php
-defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
-
-function guestbook_install() 
-{
-  global $conf, $prefixeTable;
-  
-  if (empty($conf['guestbook']))
-  {
-    $new_conf = array(
-      'comments_validation' => false,
-      'email_admin_on_comment' => false,
-      'email_admin_on_comment_validation' => true,
-      'nb_comment_page' => 15,
-      'activate_rating' => true,
-      'guest_can_view' => true,
-      'guest_can_add' => true,
-      );
-  
-    $conf['guestbook'] = serialize($new_conf);
-    conf_update_param('guestbook', $conf['guestbook']);
-  }
-  else
-  {
-    $old_conf = is_string($conf['guestbook']) ? unserialize($conf['guestbook']) : $conf['guestbook'];
-    
-    if (!isset($old_conf['guest_can_view']))
-    {
-      $old_conf['guest_can_view'] = true;
-      $old_conf['guest_can_add'] = true;
-    }
-    
-    $conf['guestbook'] = serialize($old_conf);
-    conf_update_param('guestbook', $conf['guestbook']);
-  }
-  
-  pwg_query('
-CREATE TABLE IF NOT EXISTS `' . $prefixeTable . 'guestbook` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `date` datetime NOT NULL DEFAULT "0000-00-00 00:00:00",
-  `author` varchar(255) NOT NULL,
-  `author_id` smallint(5) DEFAULT NULL,
-  `anonymous_id` varchar(45) NOT NULL,
-  `email` varchar(255) DEFAULT NULL,
-  `website` varchar(255) DEFAULT NULL,
-  `content` longtext NOT NULL,
-  `rate` float(5,2) unsigned DEFAULT NULL,
-  `validated` enum("true","false") NOT NULL DEFAULT "false",
-  `validation_date` datetime DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8
-;');
-}
-
-function guestbook_uninstall()
-{
-  global $prefixeTable, $conf;
-  
-  pwg_query('DROP TABLE `' . $prefixeTable . 'guestbook`;');
-  pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE `param` = "guestbook";');
-  
-  unset($conf['guestbook']);
-}
Index: /extensions/GuestBook/main.inc.php
===================================================================
--- /extensions/GuestBook/main.inc.php	(revision 26064)
+++ /extensions/GuestBook/main.inc.php	(revision 26065)
@@ -9,10 +9,11 @@
 */
 
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
 
+// TODO akismet
 global $prefixeTable;
 
 
-defined('GUESTBOOK_ID') or define('GUESTBOOK_ID', basename(dirname(__FILE__)));
+define('GUESTBOOK_ID',      basename(dirname(__FILE__)));
 define('GUESTBOOK_PATH' ,   PHPWG_PLUGINS_PATH . GUESTBOOK_ID . '/');
 define('GUESTBOOK_TABLE' ,  $prefixeTable . 'guestbook');
@@ -26,5 +27,4 @@
 add_event_handler('init', 'guestbook_init');
 
-// admin page
 if (defined('IN_ADMIN'))
 {
@@ -32,52 +32,20 @@
 }
 
-// menu entry
 add_event_handler('blockmanager_apply', 'gb_menubar_apply', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
 
-// guestbook section
 add_event_handler('loc_end_section_init', 'gb_section_init');
 add_event_handler('loc_end_index', 'gb_index');
-
-// stuff
-// add_event_handler('get_stuffs_modules', 'gb_register_stuffs_module')
 
 
 function guestbook_init()
 {
-  global $conf, $pwg_loaded_plugins;
+  global $conf;
   
-  // apply upgrade if needed
-  if (
-    GUESTBOOK_VERSION == 'auto' or
-    $pwg_loaded_plugins[GUESTBOOK_ID]['version'] == 'auto' or
-    version_compare($pwg_loaded_plugins[GUESTBOOK_ID]['version'], GUESTBOOK_VERSION, '<')
-  )
-  {
-    // call install function
-    include_once(GUESTBOOK_PATH . 'include/install.inc.php');
-    guestbook_install();
-    
-    // update plugin version in database
-    if ( $pwg_loaded_plugins[GUESTBOOK_ID]['version'] != 'auto' and GUESTBOOK_VERSION != 'auto' )
-    {
-      $query = '
-UPDATE '. PLUGINS_TABLE .'
-SET version = "'. GUESTBOOK_VERSION .'"
-WHERE id = "'. GUESTBOOK_ID .'"';
-      pwg_query($query);
-      
-      $pwg_loaded_plugins[GUESTBOOK_ID]['version'] = GUESTBOOK_VERSION;
-      
-      if (defined('IN_ADMIN'))
-      {
-        $_SESSION['page_infos'][] = 'GuestBook updated to version '. GUESTBOOK_VERSION;
-      }
-    }
-  }
+  include_once(GUESTBOOK_PATH . 'maintain.inc.php');
+  $maintain = new GuestBook_maintain(GUESTBOOK_ID);
+  $maintain->autoUpdate(GUESTBOOK_VERSION, 'install');
   
-  // load plugin language file
   load_language('plugin.lang', GUESTBOOK_PATH);
   
-  // prepare plugin configuration
   $conf['guestbook'] = unserialize($conf['guestbook']);
 }
Index: /extensions/GuestBook/maintain.inc.php
===================================================================
--- /extensions/GuestBook/maintain.inc.php	(revision 26064)
+++ /extensions/GuestBook/maintain.inc.php	(revision 26065)
@@ -1,27 +1,81 @@
 <?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
 
-defined('GUESTBOOK_ID') or define('GUESTBOOK_ID', basename(dirname(__FILE__)));
-include_once(PHPWG_PLUGINS_PATH . GUESTBOOK_ID . '/include/install.inc.php');
+class GuestBook_maintain extends PluginMaintain
+{
+  private $installed = false;
+  
+  private $default_conf = array(
+    'comments_validation' => false,
+    'email_admin_on_comment' => false,
+    'email_admin_on_comment_validation' => true,
+    'nb_comment_page' => 15,
+    'activate_rating' => true,
+    'guest_can_view' => true,
+    'guest_can_add' => true,
+    );
 
-// Installation
-function plugin_install()
-{
-  guestbook_install();
-  define('guestbook_installed', true);
-}
+  function install($plugin_version, &$errors=array())
+  {
+    global $conf, $prefixeTable;
+  
+    if (empty($conf['guestbook']))
+    {
+      $conf['guestbook'] = serialize($this->default_conf);
+      conf_update_param('guestbook', $conf['guestbook']);
+    }
+    else
+    {
+      $old_conf = is_string($conf['guestbook']) ? unserialize($conf['guestbook']) : $conf['guestbook'];
+      
+      if (!isset($old_conf['guest_can_view']))
+      {
+        $old_conf['guest_can_view'] = true;
+        $old_conf['guest_can_add'] = true;
+      }
+      
+      $conf['guestbook'] = serialize($old_conf);
+      conf_update_param('guestbook', $conf['guestbook']);
+    }
+  
+    pwg_query('
+CREATE TABLE IF NOT EXISTS `' . $prefixeTable . 'guestbook` (
+  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `date` datetime NOT NULL DEFAULT "0000-00-00 00:00:00",
+  `author` varchar(255) NOT NULL,
+  `author_id` smallint(5) DEFAULT NULL,
+  `anonymous_id` varchar(45) NOT NULL,
+  `email` varchar(255) DEFAULT NULL,
+  `website` varchar(255) DEFAULT NULL,
+  `content` longtext NOT NULL,
+  `rate` float(5,2) unsigned DEFAULT NULL,
+  `validated` enum("true","false") NOT NULL DEFAULT "false",
+  `validation_date` datetime DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8
+;');
 
-// Activation
-function plugin_activate()
-{
-  if (!defined('guestbook_installed'))
+    $this->installed = true;
+  }
+
+  function activate($plugin_version, &$errors=array())
   {
-    guestbook_install();
+    if (!$this->installed)
+    {
+      $this->install($plugin_version, $errors);
+    }
+  }
+
+  function deactivate()
+  {
+  }
+
+  function uninstall()
+  {
+    global $prefixeTable;
+  
+    pwg_query('DROP TABLE `' . $prefixeTable . 'guestbook`;');
+
+    conf_delete_param('guestbook');
   }
 }
-
-// Uninstallation
-function plugin_uninstall()
-{
-  guestbook_uninstall();
-}
Index: /extensions/GuestBook/template/comment_list.tpl
===================================================================
--- /extensions/GuestBook/template/comment_list.tpl	(revision 26064)
+++ /extensions/GuestBook/template/comment_list.tpl	(revision 26065)
@@ -6,21 +6,21 @@
     <div class="actions" style="float:right;font-size:90%">
     {if isset($comment.U_DELETE)}
-      <a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
-        {'Delete'|@translate}
+      <a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|translate|@escape:javascript}');">
+        {'Delete'|translate}
       </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT) or isset($comment.U_CANCEL)} | {/if}
     {/if}
     {if isset($comment.U_CANCEL)}
       <a href="{$comment.U_CANCEL}">
-        {'Cancel'|@translate}
+        {'Cancel'|translate}
       </a>{if isset($comment.U_VALIDATE)} | {/if}
     {/if}
     {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
       <a class="editComment" href="{$comment.U_EDIT}#edit_comment">
-        {'Edit'|@translate}
+        {'Edit'|translate}
       </a>{if isset($comment.U_VALIDATE)} | {/if}
     {/if}
     {if isset($comment.U_VALIDATE)}
       <a href="{$comment.U_VALIDATE}">
-        {'Validate'|@translate}
+        {'Validate'|translate}
       </a>
     {/if}&nbsp;
@@ -37,5 +37,5 @@
 
     <div class="commentHeader">
-      {'%s says on %s :'|@translate|@sprintf:$author:$date}<br>
+      {'%s says on %s :'|translate:$author:$date}<br>
       {if $comment.STARS}{$comment.STARS}{/if}
       {if $comment.EMAIL} <a href="mailto:{$comment.EMAIL}">{$comment.EMAIL}</a>{/if}
@@ -44,10 +44,10 @@
     <a name="edit_comment"></a>
     <form method="post" action="{$comment.U_EDIT}" id="editComment">
-      <p><label>{'Edit a comment'|@translate} :</label></p>
+      <p><label>{'Edit a comment'|translate} :</label></p>
       <p><textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></p>
       <p><input type="hidden" name="key" value="{$comment.KEY}">
         <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}">
         <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}">
-        <input type="submit" value="{'Submit'|@translate}">
+        <input type="submit" value="{'Submit'|translate}">
       </p>
     </form>
Index: /extensions/GuestBook/template/guestbook.tpl
===================================================================
--- /extensions/GuestBook/template/guestbook.tpl	(revision 26064)
+++ /extensions/GuestBook/template/guestbook.tpl	(revision 26065)
@@ -1,46 +1,50 @@
-{combine_css path=$GUESTBOOK_PATH|@cat:"template/style.css"}
-{combine_script id="livevalidation" load="footer" path=$GUESTBOOK_PATH|@cat:"template/livevalidation.min.js"}
+{combine_css path=$GUESTBOOK_PATH|cat:'template/style.css'}
+{combine_script id='livevalidation' load='footer' path=$GUESTBOOK_PATH|cat:'template/livevalidation.min.js'}
 
 {footer_script require='jquery,livevalidation'}
-{if !$comment_add.IS_LOGGED}
-var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true });
-author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your username'|@translate}" });
-{/if}
+(function() {
+  {if !$comment_add.IS_LOGGED}
+  var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true });
+  author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your username'|translate}" });
+  {/if}
 
-{if $comment_add.EMAIL_MANDATORY and (!$comment_add.IS_LOGGED or empty($comment_add.EMAIL))}
-var email = new LiveValidation('email', {ldelim} onlyOnSubmit: true });
-email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your e-mail'|@translate}" });
-email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|@translate}" });
-{/if}
+  {if $comment_add.EMAIL_MANDATORY and (!$comment_add.IS_LOGGED or empty($comment_add.EMAIL))}
+  var email = new LiveValidation('email', {ldelim} onlyOnSubmit: true });
+  email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your e-mail'|translate}" });
+  email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|translate}" });
+  {/if}
 
-var website = new LiveValidation('website', {ldelim} onlyOnSubmit: true });
-website.add(Validate.Format, {ldelim} pattern: /^https?:\/\/[^\s\/$.?#].[^\s]*$/i,
-  failureMessage: "{'invalid website address'|@translate}"});
+  var website = new LiveValidation('website', {ldelim} onlyOnSubmit: true });
+  website.add(Validate.Format, {ldelim} pattern: /^https?:\/\/[^\s\/$.?#].[^\s]*$/i,
+    failureMessage: "{'invalid website address'|translate}"});
 
-var content = new LiveValidation('contentid', {ldelim} onlyOnSubmit: true });
-content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|@translate}" });
+  var content = new LiveValidation('contentid', {ldelim} onlyOnSubmit: true });
+  content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|translate}" });
   
-jQuery("#addComment").hide();
-jQuery("#guestbookAdd").css('width','180px');
-jQuery("#expandForm").click(function() {ldelim}
-  jQuery("#guestbookAdd").animate({ldelim}"width": "550px"}, function() {ldelim}
-    jQuery("#expandForm").slideUp();
-    jQuery("#addComment").slideDown("slow");
+  {if !isset($GB_OPEN)}
+  jQuery('#addComment').hide();
+  jQuery('#guestbookAdd').css('width', '180px');
+  jQuery('#expandForm').click(function() {ldelim}
+    jQuery('#guestbookAdd').animate({ldelim}'width': '550px'}, function() {ldelim}
+      jQuery('#expandForm').slideUp();
+      jQuery('#addComment').slideDown('slow');
+    });
   });
-});
+  {/if}
 
-jQuery("#website").on('blur', function() {ldelim}
-  var val = $(this).val();
-  if (val.substr(0, 4) != 'http') {ldelim}
-    $(this).val('http://'+ val);
-  }
-});
+  jQuery('#website').on('blur', function() {ldelim}
+    var val = $(this).val();
+    if (val.substr(0, 4) != 'http') {ldelim}
+      $(this).val('http://'+ val);
+    }
+  });
+}());
 {/footer_script}
 
 {if $comment_add.ACTIVATE_RATING}
-  {combine_script id="jquery.raty" path=$GUESTBOOK_PATH|@cat:"template/jquery.raty/jquery.raty.min.js"}
+  {combine_script id='jquery.raty' path=$GUESTBOOK_PATH|cat:'template/jquery.raty/jquery.raty.min.js'}
   {footer_script}
-  jQuery("#comment_rate").raty({ldelim}
-    path: "{$ROOT_URL}{$GUESTBOOK_PATH}template/jquery.raty/",
+  jQuery('#comment_rate').raty({ldelim}
+    path: '{$ROOT_URL}{$GUESTBOOK_PATH}template/jquery.raty/',
     half: true
   });
@@ -49,23 +53,7 @@
 
 
-{* <!-- Menubar & titrePage --> *}
-{if $themeconf.name == "stripped" or $themeconf.parent == "stripped"}
-  {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/stripped.tpl'}
-  {assign var="clear" value="true"}
-{elseif $themeconf.name == "simple-grey" or $themeconf.parent == "simple"}
-  {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/simple.tpl'}
-  {assign var="clear" value="true"}
-{else}
-  {include file=$ABS_GUESTBOOK_PATH|@cat:'template/themes/default.tpl'}
-{/if}
-
-{if isset($errors) or not empty($infos)}
-{include file='infos_errors.tpl'}
-{/if}
-
-
 {if isset($comment_add)}
 <div id="guestbookAdd">
-  <h4 id="expandForm">{'Sign the guestbook'|@translate}</h4>
+  <h4 id="expandForm">{'Sign the guestbook'|translate}</h4>
   <form method="post" action="{$comment_add.F_ACTION}" id="addComment" class="contact">
     <table>
@@ -73,5 +61,5 @@
       <tr>
         <td>
-          <label for="author">{'Author'|@translate}* :</label>
+          <label for="author">{'Author'|translate}* :</label>
         {if $comment_add.IS_LOGGED}
           {$comment_add.AUTHOR}
@@ -82,5 +70,5 @@
         </td>
         <td>
-          <label for="email">{'Email address'|@translate}{if $comment_add.EMAIL_MANDATORY}*{/if} ({'not publicly visible'|@translate}) :</label>
+          <label for="email">{'Email address'|translate}{if $comment_add.EMAIL_MANDATORY}*{/if} ({'not publicly visible'|translate}) :</label>
           <input type="text" name="email" id="email" value="{$comment_add.EMAIL}">
         </td>
@@ -90,10 +78,10 @@
       {if $comment_add.ACTIVATE_RATING}
         <td>
-          <label>{'Rate'|@translate} :</label>
+          <label>{'Rate'|translate} :</label>
           <span id="comment_rate"></span>
         </td>
       {/if}
         <td>
-          <label for="website">{'Website'|@translate} :</label>
+          <label for="website">{'Website'|translate} :</label>
           <input type="text" name="website" id="website" value="{$comment_add.WEBSITE}">
         </td>
@@ -101,5 +89,5 @@
       <tr>
         <td colspan="2">
-          <label for="contentid">{'Comment'|@translate}* :</label>
+          <label for="contentid">{'Comment'|translate}* :</label>
           <textarea name="content" id="contentid" rows="7">{$comment_add.CONTENT}</textarea>
         </td>
@@ -107,6 +95,6 @@
       <tr>
         <td colspan="2">
-          <input type="submit" value="{'Send'|@translate}"> 
-          {'* : mandatory fields'|@translate}
+          <input type="submit" value="{'Send'|translate}"> 
+          {'* : mandatory fields'|translate}
         </td>
       </tr>
@@ -118,5 +106,5 @@
 {/if}
 
-<p class="comment_count">{'There are %d messages'|@translate|@sprintf:$COMMENT_COUNT}</p>
+<p class="comment_count">{'There are %d messages'|translate:$COMMENT_COUNT}</p>
 
 {if isset($comments)}
@@ -124,12 +112,8 @@
   {if !empty($navbar)}
     <div id="pictureCommentNavBar">
-      {include file='navigation_bar.tpl'|@get_extent:'navbar'}
+      {include file='navigation_bar.tpl'|get_extent:'navbar'}
     </div>
   {/if}
-  {include file=$ABS_GUESTBOOK_PATH|@cat:'template/comment_list.tpl'}
+  {include file=$ABS_GUESTBOOK_PATH|cat:'template/comment_list.tpl'}
 </div>
 {/if}
-
-{if $clear}<div style="clear: both;"></div>
-</div>{/if}
-</div>{* <!-- content --> *}
Index: /extensions/GuestBook/template/style-clear.css
===================================================================
--- /extensions/GuestBook/template/style-clear.css	(revision 26065)
+++ /extensions/GuestBook/template/style-clear.css	(revision 26065)
@@ -0,0 +1,24 @@
+#guestbookAdd {
+  background: #ccc;
+  background: -moz-linear-gradient(top, #ccc 0%, #bbb 100%);
+  background: -webkit-linear-gradient(top, #ccc 0%, #bbb 100%);
+  background: -o-linear-gradient(top, #ccc 0%, #bbb 100%);
+  background: -ms-linear-gradient(top, #ccc 0%, #bbb 100%);
+  background: linear-gradient(top, #ccc 0%, #bbb 100%);
+  border-color:#eee;
+  box-shadow:5px 5px 5px rgba(0, 0, 0, 0.20);
+  color:#444;
+}
+
+#guestbookAdd h4:hover {
+  color:#111;
+}
+
+.commentHeader  {
+  background:#ccc;
+  color:#444;
+}
+
+.commentHeader a {
+  color:#005E89;
+}
