1 | <?php |
---|
2 | /* |
---|
3 | Theme Name: flop_mauve |
---|
4 | Version: auto |
---|
5 | Description: A mauve theme derived from the dark theme of piwigo |
---|
6 | Theme URI: http://fr.piwigo.org/ext/extension_view.php?eid=62 |
---|
7 | Author: flop25 |
---|
8 | Author URI: http://www.planete-flop.fr |
---|
9 | */ |
---|
10 | $themeconf = array( |
---|
11 | 'name' => 'flop_mauve', |
---|
12 | 'parent' => 'default', |
---|
13 | 'icon_dir' => 'themes/default/icon', |
---|
14 | 'mime_icon_dir' => 'themes/default/icon/mimetypes/', |
---|
15 | 'local_head' => 'local_head.tpl', |
---|
16 | ); |
---|
17 | |
---|
18 | $conf['level_separator'] = ' » '; |
---|
19 | $conf['paginate_pages_around'] = 7; |
---|
20 | $conf['show_picture_name_on_title'] = false; |
---|
21 | $conf['show_thumbnail_caption'] = false; |
---|
22 | /** mainpage_categories.tpl **/ |
---|
23 | add_event_handler('loc_end_index_category_thumbnails', 'flopmauve_cat'); |
---|
24 | function flopmauve_cat($tpl_thumbnails_var) |
---|
25 | { |
---|
26 | global $template; |
---|
27 | $template->set_prefilter('index_category_thumbnails', 'flopmauve_cat_pre'); |
---|
28 | return $tpl_thumbnails_var; |
---|
29 | } |
---|
30 | function flopmauve_cat_pre($content, &$smarty) |
---|
31 | { |
---|
32 | $search = 'NAME}</a>'; |
---|
33 | $replacement = 'NAME|truncate:38:" [...]"|strip_tags}</a>'; |
---|
34 | $content=str_replace($search, $replacement, $content); |
---|
35 | $search = 'DESCRIPTION}</p>'; |
---|
36 | $replacement = 'DESCRIPTION|truncate:120:" [...]"|strip_tags}</p>'; |
---|
37 | return str_replace($search, $replacement, $content); |
---|
38 | } |
---|
39 | |
---|
40 | ?> |
---|