source: extensions/flop_mauve/current/themeconf.inc.php @ 20228

Last change on this file since 20228 was 17820, checked in by flop25, 12 years ago

strip_tags when truncate

File size: 1.2 KB
Line 
1<?php
2/*
3Theme Name: flop_mauve
4Version: auto
5Description: A mauve theme derived from the dark theme of piwigo
6Theme URI: http://fr.piwigo.org/ext/extension_view.php?eid=62
7Author: flop25
8Author 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'] = ' &raquo; ';
19$conf['paginate_pages_around'] = 7;
20$conf['show_picture_name_on_title'] = false;
21$conf['show_thumbnail_caption'] = false;
22/** mainpage_categories.tpl **/
23add_event_handler('loc_end_index_category_thumbnails', 'flopmauve_cat');
24function 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}
30function 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?>
Note: See TracBrowser for help on using the repository browser.