Index: /extensions/akBookStyle/trunk/MANIFEST
===================================================================
--- /extensions/akBookStyle/trunk/MANIFEST	(revision 3769)
+++ /extensions/akBookStyle/trunk/MANIFEST	(revision 3770)
@@ -1,50 +1,17 @@
-akBookStyle/ak_thumbnails.tpl
 akBookStyle/MANIFEST
-akBookStyle/.dist/akBookStyle/ak_thumbnails.tpl
-akBookStyle/.dist/akBookStyle/MANIFEST
-akBookStyle/.dist/akBookStyle/rsync_exclude.txt
-akBookStyle/.dist/akBookStyle/COPYING
-akBookStyle/.dist/akBookStyle/ak_reloaded_image.tpl
-akBookStyle/.dist/akBookStyle/maintain.inc.php
-akBookStyle/.dist/akBookStyle/ChangeLog.txt.php
-akBookStyle/.dist/akBookStyle/Makefile
-akBookStyle/.dist/akBookStyle/main.inc.php
-akBookStyle/.git/config
-akBookStyle/.git/index
-akBookStyle/.git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904
-akBookStyle/.git/objects/d5/11905c1647a1e311e8b20d5930a37a9c2531cd
-akBookStyle/.git/objects/0f/6733827adc46edcd0bcbcf1cfd150f131f460e
-akBookStyle/.git/objects/34/b43a58044df7799f3ea5e373be8da4029abdd9
-akBookStyle/.git/objects/95/fd8217672a76c56f40bb7cd1b7540459f2863b
-akBookStyle/.git/objects/60/337648ff65296993d946a6434023be061af21f
-akBookStyle/.git/objects/9c/599bcd0bc65c437beec36b93e8bd88e656ad6a
-akBookStyle/.git/objects/5a/dd1dad1b2e2ba4f18f4e358857aae298f4bbf6
-akBookStyle/.git/objects/5a/57132a9cab6d12f0d542a9807b9440a5d43af2
-akBookStyle/.git/objects/a2/b8e1baecf1c7da2009bb3d4f2a6f564fb73b33
-akBookStyle/.git/objects/b9/ad60567eeb459b2ad43158488ec9e49953733d
-akBookStyle/.git/svn/.metadata
-akBookStyle/.git/svn/trunk/unhandled.log
-akBookStyle/.git/svn/trunk/.rev_map.68402e56-0260-453c-a942-63ccdbb3a9ee
-akBookStyle/.git/description
-akBookStyle/.git/info/exclude
-akBookStyle/.git/hooks/applypatch-msg.sample
-akBookStyle/.git/hooks/update.sample
-akBookStyle/.git/hooks/pre-rebase.sample
-akBookStyle/.git/hooks/prepare-commit-msg.sample
-akBookStyle/.git/hooks/post-update.sample
-akBookStyle/.git/hooks/pre-commit.sample
-akBookStyle/.git/hooks/commit-msg.sample
-akBookStyle/.git/hooks/post-receive.sample
-akBookStyle/.git/hooks/post-commit.sample
-akBookStyle/.git/hooks/pre-applypatch.sample
-akBookStyle/.git/logs/refs/heads/master
-akBookStyle/.git/logs/refs/remotes/trunk
-akBookStyle/.git/refs/heads/master
-akBookStyle/.git/refs/remotes/trunk
-akBookStyle/.git/HEAD
+akBookStyle/css/ak_style.css
 akBookStyle/COPYING
-akBookStyle/ak_reloaded_image.tpl
+akBookStyle/template/ak_thumbnails.tpl
+akBookStyle/template/admin.tpl
+akBookStyle/template/ak_reloaded_image.tpl
+akBookStyle/language/fr_FR/plugin.lang.php
+akBookStyle/language/en_UK/plugin.lang.php
+akBookStyle/admin.php
+akBookStyle/public.php
+akBookStyle/include/akContent.class.php
+akBookStyle/include/akConfig.class.php
 akBookStyle/maintain.inc.php
 akBookStyle/ChangeLog.txt.php
-akBookStyle/.gitignore
+akBookStyle/CHANGELOG
+akBookStyle/init.php
 akBookStyle/main.inc.php
Index: /extensions/akBookStyle/trunk/css/ak_style.css
===================================================================
--- /extensions/akBookStyle/trunk/css/ak_style.css	(revision 3769)
+++ /extensions/akBookStyle/trunk/css/ak_style.css	(revision 3770)
@@ -1,12 +1,44 @@
-table.ak_display {}
-td table.thumbnails {}
-tr.nline {}
-td.ncol {}
-a.load {}
-a.load img {}
-td.left {}
-.ak_display a.navButton {}
-.ak_display img.button {}
-td.right {}
-#reload {}
-table.picture {}
+table.ak_display {
+}
+
+td table.thumbnails {
+}
+
+tr.nline {
+}
+
+td.ncol {
+}
+
+a.load {
+}
+
+a.load img {
+}
+
+td.left {
+}
+
+.ak_display a.navButton {
+}
+
+.ak_display img.button {
+}
+
+td.right {
+}
+
+#reload {
+}
+
+table.picture {
+}
+
+/******************/
+#menubar, .titrePage { 
+  display: none;
+}
+
+#content { 
+  margin: 0;
+}
Index: /extensions/akBookStyle/trunk/include/akContent.class.php
===================================================================
--- /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 3770)
+++ /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 3770)
@@ -0,0 +1,43 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | akBookStyle  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2009      Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009      vdigital                                       |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH')) {
+  die('Hacking attempt!');
+}
+
+class akContent
+{
+  public function __construct($config) {
+    $this->plugin_config = $config;
+  }
+
+  public function loc_begin_index_thumbnails($pictures) {
+    global $template;
+
+    $template->set_filenames(array('index_thumbnails'=> AK_PLUGIN_TEMPLATE . '/ak_thumbnails.tpl'));
+    
+    $template->assign('AK_BY_LINE', 2);
+    $template->assign('AK_RELOADED_IMAGE_TPL', AK_PLUGIN_TEMPLATE. '/ak_reloaded_image.tpl');
+    $template->assign('AK_PLUGIN_CSS', AK_PLUGIN_CSS);
+  }
+}
+?>
Index: /extensions/akBookStyle/trunk/public.php
===================================================================
--- /extensions/akBookStyle/trunk/public.php	(revision 3769)
+++ /extensions/akBookStyle/trunk/public.php	(revision 3770)
@@ -24,3 +24,13 @@
   die('Hacking attempt!');
 }
+
+include_once AK_PLUGIN_ROOT . "/include/akContent.class.php";
+
+$public_content = new akContent($plugin_config);
+
+add_event_handler('loc_begin_index_thumbnails', 
+		  array($public_content, 'loc_begin_index_thumbnails'),
+		  EVENT_HANDLER_PRIORITY_NEUTRAL,
+		  2	       
+		  );
 ?>
Index: /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl	(revision 3769)
+++ /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl	(revision 3770)
@@ -1,4 +1,2 @@
-{if !empty($thumbnails)}
-
 {* variables to be set 
  => by plugin:
@@ -27,4 +25,5 @@
 {* all the following code will be splitted in different includes *}
 
+{if !empty($thumbnails)}
 <table class="ak_display">
   <tr>
@@ -42,8 +41,17 @@
 	    </a>
 	  </td>
-	  {if $smarty.foreach.tn.index % $AK_BY_LINE == 0}
+	  {if ($smarty.foreach.tn.index+1) % $AK_BY_LINE == 0}
 	</tr>
 	{/if}
 	{/foreach}
+
+	{* 
+	need to be fix for AK_BY_LINE != 2 
+	we must add <td></td> if count($thumbnails) % $AK_BY_LINE != 0
+	*}
+	
+	{if ($smarty.foreach.tn.index) % $AK_BY_LINE == 0}
+	<td></td></tr>
+	{/if}
 	
 	{if !empty($NAV_BAR) } {* thumbnails navigation bar *}
@@ -70,9 +78,8 @@
 	{/if} 
       </table>
-      {/if}
     </td>
     
     <td>
-      {include file='ak_reloaded_image.tpl'|@get_extent:'picture_reload'} 
+      {include file=$AK_RELOADED_IMAGE_TPL|@get_extent:'picture_reload'} 
     </td>
   </tr>
@@ -82,5 +89,5 @@
 {known_script id="jquery" src=$ROOT_URL|cat:"template-common/lib/jquery.packed.js"}
 {html_head} 
-<link rel="stylesheet" type="text/css" href="{$ROOT_URL}plugins/{$PLUGIN_NAME}/ak_style.css">
+<link rel="stylesheet" type="text/css" href="{$AK_PLUGIN_CSS}/ak_style.css">
 {literal} 
 <script type="text/javascript">// <![CDATA[ 
