1 | <?php |
---|
2 | /* |
---|
3 | Theme Name: stripped-galleria |
---|
4 | Version: Auto |
---|
5 | Description: stripped-galleria theme |
---|
6 | Theme URI: http://piwigo.org/ext/extension_view.php?eid=585 |
---|
7 | Author: Julien Capitaine (Zaphod on Piwigo forums) |
---|
8 | Author URI: http://www.audreyetjulien.fr/galerie |
---|
9 | */ |
---|
10 | |
---|
11 | $themeconf = array( |
---|
12 | 'parent' => 'stripped', |
---|
13 | 'load_parent_css' => true, |
---|
14 | 'load_parent_local_head' => true, |
---|
15 | 'name' => 'stripped-galleria', |
---|
16 | 'theme_dir' => 'stripped-galleria', |
---|
17 | 'icon_dir' => 'themes/stripped/icon', |
---|
18 | 'admin_icon_dir' => 'themes/default/icon/admin', |
---|
19 | 'mime_icon_dir' => 'themes/default/icon/mimetypes/', |
---|
20 | 'local_head' => 'local_head.tpl', |
---|
21 | ); |
---|
22 | |
---|
23 | global $conf, $stripped, $strippedgalleria; |
---|
24 | |
---|
25 | // Need upgrade? |
---|
26 | if (!isset($conf['stripped-galleria'])) |
---|
27 | include(PHPWG_THEMES_PATH.'stripped-galleria/admin/upgrade.inc.php'); |
---|
28 | |
---|
29 | $stripped['maxThumb']=999; |
---|
30 | $stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped ); |
---|
31 | $strippedgalleria = unserialize( $conf['stripped-galleria'] ); |
---|
32 | if (!isset($strippedgalleria['lightbox'])) $strippedgalleria['lightbox']='none'; |
---|
33 | |
---|
34 | // adresse image HD depuis thumbs |
---|
35 | |
---|
36 | add_event_handler('loc_end_index_thumbnails', 'add_thumbnails_high_url', 50, 2); |
---|
37 | function add_thumbnails_high_url($tpl_var, $pictures) |
---|
38 | { |
---|
39 | include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php'); |
---|
40 | foreach($tpl_var as $key => $value) |
---|
41 | { |
---|
42 | if ($value['FILE_HAS_HD']) |
---|
43 | { |
---|
44 | $tpl_var[$key]['HD_PATH'] = get_high_path($pictures[$key]); |
---|
45 | } |
---|
46 | } |
---|
47 | return $tpl_var; |
---|
48 | } |
---|
49 | |
---|
50 | |
---|
51 | ?> |
---|