Changeset 10853 for extensions


Ignore:
Timestamp:
May 12, 2011, 11:27:21 AM (13 years ago)
Author:
flop25
Message:

really compatible 2.2

Location:
extensions/akBookStyle/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/akBookStyle/trunk/css/admin.css

    r5432 r10853  
    1 #content {
    2   text-align: left;
    3   padding-left: 20px;
    4 }
    5 
    6 fieldset, fieldset p {
    7   text-align: left;
    8 }
    9 
    10 fieldset p.field  input[type="radio"], fieldset p.field  input[type="checkbox"] {
    11   margin:0 3px 0 15px;
    12 }
     1#content{text-align:left;padding-left:20px;}
     2fieldset,fieldset p{text-align:left;}
     3fieldset p.field input[type="radio"],fieldset p.field input[type="checkbox"]{margin:0 3px 0 15px;}
  • extensions/akBookStyle/trunk/css/style.css

    r5445 r10853  
    1 table.ak_display {
    2   margin:auto;
    3   min-width:99%;
    4   width:99%;
    5 }
    6 
    7 table.ak_display tr td, table.ak_display_horizontal tr td {
    8   vertical-align: middle;
    9 }
    10 
    11 td table.thumbnails tr td img {
    12   filter: alpha(opacity=70);
    13   opacity: 0.7;
    14   -moz-opacity: 0.7;
    15   -khtml-opacity: 0.7;
    16 }
    17 
    18 td.ak_pic {
    19   min-width:640px;
    20   text-align:center;
    21 }
    22 
    23 td.navbar {
    24   width: 24px;
    25   padding: 200px 0 0 0;
    26 }
    27 
    28 #akPreviousPicture, #akNextPicture {
    29   visibility: hidden;
    30 }
    31 
    32 td.ncol {
    33   padding: 2px;
    34 }
    35 
    36 td table.thumbnails tr td.selected, td table.thumbnails tr td.ncol:hover {
    37   background-color: #FF0000;
    38 }
    39 
    40 td table.thumbnails tr td.selected img, td table.thumbnails tr td.ncol:hover img {
    41   filter: alpha(opacity=100);
    42   opacity: 1;
    43   -moz-opacity: 1;
    44   -khtml-opacity: 1;
    45 }
    46 
    47 td.left {
    48   text-align: right;
    49 }
    50 
    51 td.right {
    52   text-align: left;
    53 }
    54 
    55 .fleft {
    56   float: left;
    57 }
    58 
    59 .fright {
    60   float: right;
    61 }
    62 
    63 .clipwrapper {
    64   position:relative;
    65 }
    66 
    67 .clip {
    68   position:absolute;
    69 }
    70 
    71 a.selected img, a.load:hover img {
    72   filter: alpha(opacity=100);
    73   opacity: 1;
    74   -moz-opacity: 1;
    75   -khtml-opacity: 1;
    76 }
    77 
    78 a.hide {
    79   visibility: hidden;
    80 }
    81 
    82 #akBack {
    83   position:fixed;
    84   right:20px;
    85   top:20px;
    86 }
    87 
    88 /******************/
    89 #theHeader, #menubar, .navigationBar, .titrePage {
    90   display: none;
    91 }
    92 
    93 #content {
    94   margin: 0;
    95 }
     1table.ak_display{margin:auto;min-width:99%;width:99%;}
     2table.ak_display tr td,table.ak_display_horizontal tr td{vertical-align:middle;}
     3td table.thumbnails tr td img{filter:alpha(opacity=70);opacity:.7;-moz-opacity:.7;-khtml-opacity:.7;}
     4td.ak_pic{text-align:center;}
     5td.navbar{width:24px;padding:200px 0 0 0;}
     6#akPreviousPicture,#akNextPicture{visibility:hidden;}
     7td.ncol{padding:2px;}
     8td table.thumbnails tr td.selected,td table.thumbnails tr td.ncol:hover{background-color:#F00;}
     9td table.thumbnails tr td.selected img,td table.thumbnails tr td.ncol:hover img{filter:alpha(opacity=100);opacity:1;-moz-opacity:1;-khtml-opacity:1;}
     10td.left{text-align:right;}
     11td.right{text-align:left;}
     12.fleft{float:left;}
     13.fright{float:right;}
     14.clipwrapper{position:relative;}
     15.clip{position:absolute;}
     16a.selected img,a.load:hover img{filter:alpha(opacity=100);opacity:1;-moz-opacity:1;-khtml-opacity:1;}
     17a.hide{visibility:hidden;}
     18#akBack{position:fixed;right:20px;top:20px;}
     19#theHeader,#menubar,.navigationBar,.titrePage{display:none;}
     20#content{margin:0 !important;}
     21.ak_pic img { max-width:640px;}
  • extensions/akBookStyle/trunk/include/akContent.class.php

    r9286 r10853  
    8989    $template->assign('AK_THUMBNAILS_LOC', $this->plugin_config->ak_thumbnails_loc);
    9090    $template->assign('AK_PIC_SRC', get_image_url($images[$this->current_picture]));
     91                  $url = duplicate_picture_url(
     92        array(
     93          'image_id' => $images[$this->current_picture]['id'] ,
     94          'image_file' => $images[$this->current_picture]['file']
     95        ),
     96        array('start')
     97      );
     98
     99    $template->assign('AK_PIC_URL', $url);
    91100
    92101    $template->assign('AK_NEXT', $this->getNextPicture($this->current_picture, $images));
     
    132141      $tpl_vars = $GLOBALS['template']->smarty->_tpl_vars;
    133142      $response['AK_PIC_SRC'] = $tpl_vars['SRC_IMG'];
     143      $response['AK_PIC_URL'] = $tpl_vars['current']['url'];
    134144      $response['AK_PIC_ALT'] = $tpl_vars['ALT_IMG'];
    135145      if (isset($tpl_vars['ALT_IMG'])) {
  • extensions/akBookStyle/trunk/js/ak_jquery-load.js

    r5445 r10853  
    1 $(function() {
     1$(function () {
    22    next_link = $('table.thumbnails div.navbar a[rel=next]');
    3     if (next_link.length!=0) {
    4       $('#akNextPicture').css('visibility', 'visible');
     3    if (next_link.length != 0) {
     4        $('#akNextPicture').css('visibility', 'visible')
    55    }
    66    previous_link = $('table.thumbnails div.navbar a[rel=previous]');
    7     if (previous_link.length!=0) {
    8       $('#akPreviousPicture').css('visibility', 'visible');
     7    if (previous_link.length != 0) {
     8        $('#akPreviousPicture').css('visibility', 'visible')
    99    }
    10    
    11     $("a.load")
    12       .bind(ak_mouse_event, function() {
    13           $('table.thumbnails tr td.ncol').each(function() {
    14               if ($(this).hasClass('selected')) {
    15                 $(this).removeClass('selected');
    16               }
    17             });
    18 
    19           $a = $(this);
    20           next_thumbnail = $('table.thumbnails a[href='+$(this).attr('href')+']');         
    21           if (next_thumbnail.length==0) {
    22             if ($a.attr('id')=='akNextPicture') {
    23               rel = 'next';
    24             } else {
    25               rel = 'previous';
    26             }
    27             next_link = $('table.thumbnails div.navbar a[rel='+rel+']');
    28             if (next_link.length!=0) {
    29               window.location = next_link.attr('href');
     10    $("a.load").bind(ak_mouse_event, function () {
     11        $('table.thumbnails tr td.ncol').each(function () {
     12            if ($(this).hasClass('selected')) {
     13                $(this).removeClass('selected')
    3014            }
    31           } else {
     15        });
     16        $a = $(this);
     17        //next_thumbnail = $('table.thumbnails a[href=' + $(this).attr('href') + ']');
     18        next_thumbnail = $('table.thumbnails a');
     19        if (next_thumbnail.length == 0) {
     20            if ($a.attr('id') == 'akNextPicture') {
     21                rel = 'next'
     22            } else {
     23                rel = 'previous'
     24            }
     25            next_link = $('table.thumbnails div.navbar a[rel=' + rel + ']');
     26            if (next_link.length != 0) {
     27                window.location = next_link.attr('href')
     28            }
     29        } else {
    3230            next_thumbnail.parent().parent().parent().addClass('selected');
    33             try {
    34               $.get($a.attr('href'),{},
    35                     function success(data) {               
    36                       $('#akPicture')
    37                         .attr('src', data.AK_PIC_SRC)
    38                         .attr('alt', data.AK_PIC_ALT)
    39                         .attr('title', data.AK_PIC_TITLE);
    40 
    41                       if (data.AK_PREVIOUS) {
    42                         $('#akPreviousPicture')
    43                           .removeClass('hide')
    44                           .attr('href', data.AK_PREVIOUS);
    45                       } else {
    46                         $('#akPreviousPicture').addClass('hide');
    47                       }
    48                       if (data.AK_NEXT) {
    49                         $('#akNextPicture')
    50                           .removeClass('hide')
    51                           .attr('href', data.AK_NEXT);
    52                       } else {
    53                         $('#akNextPicture').addClass('hide');
    54                       }
    55                       $a.click(function(e) { e.preventDefault();});
    56                     },
    57                     'json');       
    58             } catch (e) {}
    59           }
    60           return false;
    61         });
    62   });
     31            try {
     32                $.get($a.attr('href'), {}, function success(data) {
     33                                                                                        $('#akPicture').attr('src', data.AK_PIC_SRC).attr('alt', data.AK_PIC_ALT).attr('title', data.AK_PIC_TITLE);
     34                                                                                        $('.ak_pic a').attr('href', data.AK_PIC_URL);
     35                    if (data.AK_PREVIOUS) {
     36                        $('#akPreviousPicture').removeClass('hide').attr('href', data.AK_PREVIOUS)
     37                    } else {
     38                        $('#akPreviousPicture').addClass('hide')
     39                    }
     40                    if (data.AK_NEXT) {
     41                        $('#akNextPicture').removeClass('hide').attr('href', data.AK_NEXT)
     42                    } else {
     43                        $('#akNextPicture').addClass('hide')
     44                    }
     45                    $a.click(function (e) {
     46                        e.preventDefault()
     47                    })
     48                }, 'json')
     49            } catch (e) {}
     50        }
     51        return false
     52    })
     53});
  • extensions/akBookStyle/trunk/main.inc.php

    r9287 r10853  
    2929Author URI: http://www.nikrou.net/
    3030*/
    31 
    3231if (!defined('PHPWG_ROOT_PATH')) {
    3332  die('Hacking attempt!');
  • extensions/akBookStyle/trunk/template/admin.tpl

    r5432 r10853  
    3434  </p>
    3535  <p class="field">
    36     <label>{'Event to show medium picture.'|translate}
     36    {'Event to show medium picture.'|translate}
    3737      {html_radios name='ak_mouse_event' values=$AK_AVAILABLE_EVENTS output=$AK_EVENTS_LABELS|translate selected=$AK_MOUSE_EVENT}
    38     </label>
    3938  </p>
    4039  <p class="field">
    41     <label>{'Thumbnails location'|translate}
     40    {'Thumbnails location'|translate}
    4241      {html_radios name="ak_thumbnails_loc" values=$AK_THUMBNAILS_LOCATIONS_KEYS output=$AK_THUMBNAILS_LOCATIONS_VALUES|translate selected="$AK_THUMBNAILS_LOC"}
    43     </label>
    4442  </p>
    4543</fieldset>
  • extensions/akBookStyle/trunk/template/ak_reloaded_image.tpl

    r5432 r10853  
    1010
    1111      <td class="ak_pic">
    12         <img src="{$AK_PIC_SRC}" alt="{$AK_PIC_ALT}" title="{$AK_PIC_TITLE}" id="akPicture">
     12                                <a href="{$AK_PIC_URL}">
     13                <img src="{$AK_PIC_SRC}" alt="{$AK_PIC_ALT}" title="{$AK_PIC_TITLE}" id="akPicture">
     14        </a>
    1315      </td>
    1416      <td class="ncol">
  • extensions/akBookStyle/trunk/template/ak_thumbnails.tpl

    r5445 r10853  
    1 {known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"}
     1{combine_script id='ak_jquery' require='jquery' path=$AK_PLUGIN_JS|@cat:'/ak_jquery-load.js'}
     2{combine_css path=$AK_PLUGIN_CSS|@cat:'/style.css'}
     3
    24{html_head}
    3 <link rel="stylesheet" type="text/css" href="{$AK_PLUGIN_CSS}/style.css">
    45<script type="text/javascript">
    56var dir_thumbnail = '{$AK_DIR_THUMBNAIL}';
     
    78var ak_mouse_event = '{$AK_MOUSE_EVENT}';
    89</script>
    9 <script type="text/javascript" src="{$AK_PLUGIN_JS}/ak_jquery-load.js"></script>
    1010{/html_head}
    1111
Note: See TracChangeset for help on using the changeset viewer.