Ignore:
Timestamp:
Jan 12, 2014, 10:03:35 PM (10 years ago)
Author:
flop25
Message:

updated for 2.5 & 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped-galleria/themeconf.inc.php

    r17962 r26671  
    22/*
    33Theme Name: stripped-galleria
    4 Version: Auto
     4Version: 1.4.3
    55Description: stripped-galleria theme
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=585
     
    3535if (!isset($strippedgalleria['lightbox'])) $strippedgalleria['lightbox']='none';
    3636
    37 // Access to HD and link to original
    3837
    39 add_event_handler('loc_end_index_thumbnails', 'add_thumbnails_hd_url', 50, 2);
    40 function add_thumbnails_hd_url($tpl_vars, $pictures)
     38add_event_handler('loc_end_index_thumbnails', 'strippedgalleria_add_thumbnails_hd_url', 50, 2);
     39function strippedgalleria_add_thumbnails_hd_url($tpl_vars)
    4140{
    42         global $user;
     41        global $user, $conf, $template, $page;
    4342        foreach($tpl_vars as &$x)
    4443        {
     
    4746        }
    4847        unset($x);
     48  $stripped =  unserialize( $conf['stripped'] );
     49  $strippedgalleria = unserialize( $conf['stripped-galleria'] );
     50        $template->assign( 'stripped', $stripped );
     51        $template->assign( 'strippedgalleria', $strippedgalleria );
     52        $template->assign( 'get_root_url', get_root_url() );
     53        if (!empty($page['section'])) $template->assign('section', $page['section']);
     54        if (!empty($page['category']['id'])) $template->assign('catid', $page['category']['id']);
     55        if (!empty($page['tag_ids'])) $template->assign('tagids', implode(',', $page['tag_ids']));
    4956        return $tpl_vars;
    5057}
     58
     59add_event_handler('loc_begin_page_header', 'strippedgalleria_header');
     60function strippedgalleria_header()
     61{
     62  global $conf, $template;
     63  $stripped =  unserialize( $conf['stripped'] );
     64  $strippedgalleria = unserialize( $conf['stripped-galleria'] );
     65        $template->assign( 'stripped', $stripped );
     66        $template->assign( 'strippedgalleria', $strippedgalleria );
     67}
     68add_event_handler('loc_begin_index', 'strippedgalleria_add_downloadLink');
     69function strippedgalleria_add_downloadLink()
     70{
     71  global $conf, $template;
     72  $template->assign('downloadLink', $conf['picture_download_icon']);
     73}
     74
    5175?>
Note: See TracChangeset for help on using the changeset viewer.