source: extensions/greydragon/themeconf.inc.php @ 30643

Revision 30643, 1.7 KB checked in by SergeD, 5 years ago (diff)

version 1.0.15 - please refer to changelog for more details

Line 
1<?php
2/*
3Theme Name: GreyDragon
4Version: 1.0.15
5Description: Dark, slate, white background, grayscale.
6Theme URI: http://piwigo.org/ext/extension_view.php?eid=775
7Author: Serge Dosyukov
8Author URI: http://blog.dragonsoft.us
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13define('GDTHEME_VERSION', '1.0.15');
14
15require_once( PHPWG_THEMES_PATH . 'greydragon/include/greydragon.class.php');
16require_once( PHPWG_THEMES_PATH . 'greydragon/admin/upgrade.inc.php');
17
18$themeCore = greyDragonCore::Instance(GDTHEME_VERSION);
19
20$themeconf = array(
21  'name'  => 'greydragon',
22  'parent' => 'default',
23  'colorscheme' => 'whitehawk' == $themeCore->getOption('p_colorpack') ? 'clear' : 'dark'
24);
25
26add_event_handler('init', 'greydragon_init');
27
28// Load Theme's Parameters
29function greydragon_init() {
30  global $template;
31
32  $themeCore = greyDragonCore::Instance();
33  if ($themeCore->hasOption("p_logo_path") || $themeCore->hasOption("p_header") || $themeCore->hasOption('page_banner', TRUE)):
34    add_event_handler('render_page_banner', 'greydragon_render_header');
35  endif;
36  if ($themeCore->getOption("p_nocounter") == "on"):
37    add_event_handler('loc_end_index', 'no_breadcrumb_counter');
38  endif;
39  if ($themeCore->getOption("p_pict_tab_exif") == "off"):
40    pwg_set_session_var('show_metadata', 0);
41  else:
42    pwg_set_session_var('show_metadata', 1);
43  endif;
44
45  $template->assign('greydragon', $themeCore->getConfig());
46}
47
48// Render custom header content
49function greydragon_render_header() {
50  return greyDragonCore::Instance()->getHeader();
51}
52
53function no_breadcrumb_counter() {
54  global $template;
55
56  $titre = $template->get_template_vars('TITLE');
57  $pos = strrpos($titre,"[");
58  if ($pos !== false):
59    $template->assign('TITLE', substr($titre, 0, $pos));
60  endif;
61}
62
63?>
Note: See TracBrowser for help on using the repository browser.