source: extensions/sobre/trunk/themeconf.inc.php @ 7623

Last change on this file since 7623 was 7045, checked in by Gotcha, 14 years ago

New branch : heavy for the extension with admin panel (not working actually).

File size: 1.8 KB
Line 
1<?php
2
3/*
4Theme Name: Sobre
5Version: 0.1a
6Description: Black and white theme, based on Yoga/dark.
7Theme URI: http://fr.piwigo.org/ext/extension_view.php?eid=375
8Author: Gotcha
9Author URI: http://www.julien-moreau.fr
10*/
11
12$themeconf = array(
13  'parent' => 'default',
14  'name'  => 'sobre',
15  'local_head'  => 'local_head.tpl',
16);
17
18load_language('theme.lang', PHPWG_THEMES_PATH.'sobre/');
19
20add_event_handler('loc_begin_page_header', 'set_sbre_header');
21function set_sbre_header()
22{
23  global $page, $conf, $template;
24  $config = unserialize($conf['Sobre']);
25  if (isset($page['body_id']) and $page['body_id'] == 'theCategoryPage')
26  {
27    $header = isset($page['category']) ? $config['categories'] : $config['home'];
28  }
29  elseif (isset($page['body_id']) and $page['body_id'] == 'thePicturePage')
30  {
31    $header = $config['picture'];
32  }
33  else
34  {
35    $header = $config['other'];
36  }
37  $template->assign('display_sbre_banner', $header);
38}
39  // Affiche les cases à cocher derrière le nom de l'image
40  function DmCategoryThumbnail($tpl_var) {
41    foreach($tpl_var as $cle=>$valeur) {
42      $tpl_var[$cle]['NAME'] = '&nbsp;<input type="checkbox" name="id_images[]" value="'.$tpl_var[$cle]['ID'].'"> '.$tpl_var[$cle]['NAME'];
43    }
44
45    return $tpl_var;
46  }
47
48
49add_event_handler('blockmanager_prepare_display', 'add_rss_icon');
50function add_rss_icon()
51{
52global $lang;
53  if (isset($lang['Notification'])) {
54    $lang['Notification'] .= '<img src="./themes/sobre/images/rss.png" style="float:right; margin-right:10px; position:inherit;" class="button_rss" alt="flux-rss"/>';
55  }
56  if (isset($lang['Notification RSS'])) {
57    $lang['Notification RSS'] .= '<img src="./themes/sobre/images/rss.png" style="float:right; margin-right:10px; position:inherit;" class="button_rss" alt="flux-rss"/>';
58  }
59}
60
61?>
Note: See TracBrowser for help on using the repository browser.