source: extensions/stripped_black_bloc/themeconf.inc.php @ 11697

Last change on this file since 11697 was 11697, checked in by flop25, 9 years ago

/ deleted

File size: 1.9 KB
Line 
1<?php
2/*
3Theme Name: Stripped & Columns
4Version: auto
5Description: stripped_black_bloc
6Theme URI: http://piwigo.org/ext/extension_view.php?eid=568
7Author: flop25
8Author URI: http://www.planete-flop.fr
9*/
10
11
12       
13$themeconf = array(
14  'parent' => 'stripped',
15  'name' => 'stripped_black_bloc',
16  'theme_dir' => 'stripped_black_bloc',
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
23load_language('theme.lang', PHPWG_THEMES_PATH.'stripped_black_bloc/');
24
25
26add_event_handler('loc_end_index_category_thumbnails', 'MY');
27add_event_handler('loc_end_index_thumbnails', 'MY');
28function MY($tpl_thumbnails_var)
29{
30    global $template;
31                $new_tplvar=array();
32                foreach ($tpl_thumbnails_var as $tplvar)
33                {
34                        list($width, $height, $type, $attr) = getimagesize(     $tplvar['TN_SRC'] );
35                        $tplvar['TN_WIDTH']=$width;
36                        $tplvar['TN_HEIGHT']=$height;
37                        $new_tplvar[]=$tplvar;
38                }
39                return $new_tplvar;
40}
41add_event_handler('init', 'MY_init');
42function MY_init()
43{
44        remove_event_handler('loc_begin_index', 'modify_nb_thumbnail_page');
45}
46
47/************************************ index.tpl ************************************/
48add_event_handler('loc_end_index', 'stripped_black_bloc_index');
49function stripped_black_bloc_index()
50{
51    global $template;
52    $template->set_prefilter('index', 'stripped_black_bloc_prefilter_index');
53}
54function stripped_black_bloc_prefilter_index($content, &$smarty)
55{
56  $search = '#\{if \!empty\(\$navbar\) \}[\s]*\{include file=\'navigation_bar\.tpl\'\|@get_extent:\'navbar\'\}[\s]*\{/if\}#'; 
57  $replacement = '';
58  $content = preg_replace($search, $replacement, $content);
59
60  $search = '#<\!-- subContent -->#'; 
61  $replacement = '<!-- subContent -->
62        {if !empty($navbar) }
63                {include file=\'navigation_bar.tpl\'|@get_extent:\'navbar\'}
64        {/if}';
65  return preg_replace($search, $replacement, $content);
66}
67
68?>
Note: See TracBrowser for help on using the repository browser.