Changeset 3770


Ignore:
Timestamp:
08/21/09 09:43:56 (10 years ago)
Author:
nikrou
Message:

fix problem of AK_BY_LINE not correctly use
need to fix management if AK_BY_LINE is not 2

Location:
extensions/akBookStyle/trunk
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • extensions/akBookStyle/trunk/MANIFEST

    r3761 r3770  
    1 akBookStyle/ak_thumbnails.tpl 
    21akBookStyle/MANIFEST 
    3 akBookStyle/.dist/akBookStyle/ak_thumbnails.tpl 
    4 akBookStyle/.dist/akBookStyle/MANIFEST 
    5 akBookStyle/.dist/akBookStyle/rsync_exclude.txt 
    6 akBookStyle/.dist/akBookStyle/COPYING 
    7 akBookStyle/.dist/akBookStyle/ak_reloaded_image.tpl 
    8 akBookStyle/.dist/akBookStyle/maintain.inc.php 
    9 akBookStyle/.dist/akBookStyle/ChangeLog.txt.php 
    10 akBookStyle/.dist/akBookStyle/Makefile 
    11 akBookStyle/.dist/akBookStyle/main.inc.php 
    12 akBookStyle/.git/config 
    13 akBookStyle/.git/index 
    14 akBookStyle/.git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 
    15 akBookStyle/.git/objects/d5/11905c1647a1e311e8b20d5930a37a9c2531cd 
    16 akBookStyle/.git/objects/0f/6733827adc46edcd0bcbcf1cfd150f131f460e 
    17 akBookStyle/.git/objects/34/b43a58044df7799f3ea5e373be8da4029abdd9 
    18 akBookStyle/.git/objects/95/fd8217672a76c56f40bb7cd1b7540459f2863b 
    19 akBookStyle/.git/objects/60/337648ff65296993d946a6434023be061af21f 
    20 akBookStyle/.git/objects/9c/599bcd0bc65c437beec36b93e8bd88e656ad6a 
    21 akBookStyle/.git/objects/5a/dd1dad1b2e2ba4f18f4e358857aae298f4bbf6 
    22 akBookStyle/.git/objects/5a/57132a9cab6d12f0d542a9807b9440a5d43af2 
    23 akBookStyle/.git/objects/a2/b8e1baecf1c7da2009bb3d4f2a6f564fb73b33 
    24 akBookStyle/.git/objects/b9/ad60567eeb459b2ad43158488ec9e49953733d 
    25 akBookStyle/.git/svn/.metadata 
    26 akBookStyle/.git/svn/trunk/unhandled.log 
    27 akBookStyle/.git/svn/trunk/.rev_map.68402e56-0260-453c-a942-63ccdbb3a9ee 
    28 akBookStyle/.git/description 
    29 akBookStyle/.git/info/exclude 
    30 akBookStyle/.git/hooks/applypatch-msg.sample 
    31 akBookStyle/.git/hooks/update.sample 
    32 akBookStyle/.git/hooks/pre-rebase.sample 
    33 akBookStyle/.git/hooks/prepare-commit-msg.sample 
    34 akBookStyle/.git/hooks/post-update.sample 
    35 akBookStyle/.git/hooks/pre-commit.sample 
    36 akBookStyle/.git/hooks/commit-msg.sample 
    37 akBookStyle/.git/hooks/post-receive.sample 
    38 akBookStyle/.git/hooks/post-commit.sample 
    39 akBookStyle/.git/hooks/pre-applypatch.sample 
    40 akBookStyle/.git/logs/refs/heads/master 
    41 akBookStyle/.git/logs/refs/remotes/trunk 
    42 akBookStyle/.git/refs/heads/master 
    43 akBookStyle/.git/refs/remotes/trunk 
    44 akBookStyle/.git/HEAD 
     2akBookStyle/css/ak_style.css 
    453akBookStyle/COPYING 
    46 akBookStyle/ak_reloaded_image.tpl 
     4akBookStyle/template/ak_thumbnails.tpl 
     5akBookStyle/template/admin.tpl 
     6akBookStyle/template/ak_reloaded_image.tpl 
     7akBookStyle/language/fr_FR/plugin.lang.php 
     8akBookStyle/language/en_UK/plugin.lang.php 
     9akBookStyle/admin.php 
     10akBookStyle/public.php 
     11akBookStyle/include/akContent.class.php 
     12akBookStyle/include/akConfig.class.php 
    4713akBookStyle/maintain.inc.php 
    4814akBookStyle/ChangeLog.txt.php 
    49 akBookStyle/.gitignore 
     15akBookStyle/CHANGELOG 
     16akBookStyle/init.php 
    5017akBookStyle/main.inc.php 
  • extensions/akBookStyle/trunk/css/ak_style.css

    r3764 r3770  
    1 table.ak_display {} 
    2 td table.thumbnails {} 
    3 tr.nline {} 
    4 td.ncol {} 
    5 a.load {} 
    6 a.load img {} 
    7 td.left {} 
    8 .ak_display a.navButton {} 
    9 .ak_display img.button {} 
    10 td.right {} 
    11 #reload {} 
    12 table.picture {} 
     1table.ak_display { 
     2} 
     3 
     4td table.thumbnails { 
     5} 
     6 
     7tr.nline { 
     8} 
     9 
     10td.ncol { 
     11} 
     12 
     13a.load { 
     14} 
     15 
     16a.load img { 
     17} 
     18 
     19td.left { 
     20} 
     21 
     22.ak_display a.navButton { 
     23} 
     24 
     25.ak_display img.button { 
     26} 
     27 
     28td.right { 
     29} 
     30 
     31#reload { 
     32} 
     33 
     34table.picture { 
     35} 
     36 
     37/******************/ 
     38#menubar, .titrePage {  
     39  display: none; 
     40} 
     41 
     42#content {  
     43  margin: 0; 
     44} 
  • extensions/akBookStyle/trunk/include/akContent.class.php

    r3764 r3770  
    2424  die('Hacking attempt!'); 
    2525} 
     26 
     27class akContent 
     28{ 
     29  public function __construct($config) { 
     30    $this->plugin_config = $config; 
     31  } 
     32 
     33  public function loc_begin_index_thumbnails($pictures) { 
     34    global $template; 
     35 
     36    $template->set_filenames(array('index_thumbnails'=> AK_PLUGIN_TEMPLATE . '/ak_thumbnails.tpl')); 
     37     
     38    $template->assign('AK_BY_LINE', 2); 
     39    $template->assign('AK_RELOADED_IMAGE_TPL', AK_PLUGIN_TEMPLATE. '/ak_reloaded_image.tpl'); 
     40    $template->assign('AK_PLUGIN_CSS', AK_PLUGIN_CSS); 
     41  } 
     42} 
    2643?> 
  • extensions/akBookStyle/trunk/public.php

    r3764 r3770  
    2424  die('Hacking attempt!'); 
    2525} 
     26 
     27include_once AK_PLUGIN_ROOT . "/include/akContent.class.php"; 
     28 
     29$public_content = new akContent($plugin_config); 
     30 
     31add_event_handler('loc_begin_index_thumbnails',  
     32                  array($public_content, 'loc_begin_index_thumbnails'), 
     33                  EVENT_HANDLER_PRIORITY_NEUTRAL, 
     34                  2             
     35                  ); 
    2636?> 
  • extensions/akBookStyle/trunk/template/ak_thumbnails.tpl

    r3764 r3770  
    1 {if !empty($thumbnails)} 
    2  
    31{* variables to be set  
    42 => by plugin: 
     
    2725{* all the following code will be splitted in different includes *} 
    2826 
     27{if !empty($thumbnails)} 
    2928<table class="ak_display"> 
    3029  <tr> 
     
    4241            </a> 
    4342          </td> 
    44           {if $smarty.foreach.tn.index % $AK_BY_LINE == 0} 
     43          {if ($smarty.foreach.tn.index+1) % $AK_BY_LINE == 0} 
    4544        </tr> 
    4645        {/if} 
    4746        {/foreach} 
     47 
     48        {*  
     49        need to be fix for AK_BY_LINE != 2  
     50        we must add <td></td> if count($thumbnails) % $AK_BY_LINE != 0 
     51        *} 
     52         
     53        {if ($smarty.foreach.tn.index) % $AK_BY_LINE == 0} 
     54        <td></td></tr> 
     55        {/if} 
    4856         
    4957        {if !empty($NAV_BAR) } {* thumbnails navigation bar *} 
     
    7078        {/if}  
    7179      </table> 
    72       {/if} 
    7380    </td> 
    7481     
    7582    <td> 
    76       {include file='ak_reloaded_image.tpl'|@get_extent:'picture_reload'}  
     83      {include file=$AK_RELOADED_IMAGE_TPL|@get_extent:'picture_reload'}  
    7784    </td> 
    7885  </tr> 
     
    8289{known_script id="jquery" src=$ROOT_URL|cat:"template-common/lib/jquery.packed.js"} 
    8390{html_head}  
    84 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}plugins/{$PLUGIN_NAME}/ak_style.css"> 
     91<link rel="stylesheet" type="text/css" href="{$AK_PLUGIN_CSS}/ak_style.css"> 
    8592{literal}  
    8693<script type="text/javascript">// <![CDATA[  
Note: See TracChangeset for help on using the changeset viewer.