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

Last change on this file since 30210 was 30210, checked in by SergeD, 10 years ago

version 1.0.13
+ New colorpack - GreyDragon
+ ADMIN: Added support for horizontal menu - "Static Menu - Header Bottom". When used with Additional Pages Plugin, pages except Root Page would be embeded

into menu bar instead of drop down menu.

+ ADMIN: Added option "Display navigation arrows" for Root page
+ ADMIN: Added option "Display navigation controls" for Root page
+ Added support for thumb shadow space - custom CSS is required (please refer to help section in admin area). Latest gdThumb is recomended.
+ CSS: cleanup

  • Removed hardcoded height for root page slideshow to accomodate navigation controls
  • Fixed issues with Categories List overlapping when Static menu is enabled
  • In Phote page, hide overflow photo when huge size is used
File size: 2.1 KB
Line 
1<?php
2/*
3Theme Name: GreyDragon
4Version: 1.0.13
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.13');
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');
27add_event_handler('loc_begin_page_header', 'greydragon_set_header', 55);
28
29pwg_set_session_var('show_metadata', 1);
30
31// Load Theme's Parameters
32function greydragon_init() {
33  global $template;
34
35  $themeCore = greyDragonCore::Instance();
36  if ($themeCore->hasOption("p_logo_path") || $themeCore->hasOption("p_header") || $themeCore->hasOption('page_banner', TRUE)):
37    add_event_handler('render_page_banner', 'greydragon_render_header');
38  endif;
39  if ($themeCore->getOption("p_nocounter") == "on"):
40    add_event_handler('loc_end_index', 'no_breadcrumb_counter');
41  endif;
42
43  $template->assign('greydragon', $themeCore->getConfig());
44}
45
46// Render custom header content
47function greydragon_render_header() {
48
49  return greyDragonCore::Instance()->getHeader();
50}
51
52// Add custom favicon or custom meta if provided
53function greydragon_set_header() {
54  global $template;
55
56  $themeCore = greyDragonCore::Instance();
57  if (($themeCore->hasOption("p_favicon_path")) || ($themeCore->getOption("p_nogenerator"))):
58    $template->set_prefilter('header', "greydragon_head");
59  endif;
60}
61
62// Render head content
63function greydragon_head($content, &$smarty) {
64  return greyDragonCore::Instance()->getHead($content);
65}
66
67function no_breadcrumb_counter() {
68  global $template;
69
70  $titre = $template->get_template_vars('TITLE');
71  $pos = strrpos($titre,"[");
72  if ($pos !== false):
73    $template->assign('TITLE', substr($titre, 0, $pos));
74  endif;
75}
76
77?>
Note: See TracBrowser for help on using the repository browser.