source: extensions/blancmontxl/themeconf.inc.php @ 6299

Last change on this file since 6299 was 6286, checked in by repie38, 14 years ago

conf panel new option : use montblancxl icon set (option can't be set if montblancxl isn't installed)

File size: 1015 bytes
Line 
1<?php
2/*
3Theme Name: BlancMont XL
4Version: 2.1.c
5Description: Night theme
6Theme URI: http://piwigo.org/ext/extension_view.php?eid=232
7Author: repie38
8Author URI:
9*/
10
11$themeconf = array(
12  'parent'      => 'default',
13  'local_head'  => 'local_head.tpl',
14);
15
16global $conf;
17$config = unserialize($conf['BlancmontXL']);
18$themeconf['icon_dir']=$config['ico'] ? 'themes/montblancxl/icon' : 'themes/blancmontxl/icon' ;
19
20add_event_handler('loc_begin_page_header', 'set_bmxl_header');
21
22function set_bmxl_header()
23{
24  global $page, $conf, $template;
25
26  $config = unserialize($conf['BlancmontXL']);
27
28  if (isset($page['body_id']) and $page['body_id'] == 'theCategoryPage')
29  {
30    $header = isset($page['category']) ? $config['categories'] : $config['home'];
31  }
32  elseif (isset($page['body_id']) and $page['body_id'] == 'thePicturePage')
33  {
34    $header = $config['picture'];
35  }
36  else
37  {
38    $header = $config['other'];
39  }
40  $template->assign('display_bmxl_banner', $header);
41}
42?>
Note: See TracBrowser for help on using the repository browser.