1 | <?php |
---|
2 | /* |
---|
3 | Theme Name: Slim |
---|
4 | Version: auto |
---|
5 | Description: Slim. |
---|
6 | Theme URI: http://piwigo.org/ext/extension_view.php?eid=643 |
---|
7 | Author:Miklfe [piwitheme.fr] |
---|
8 | Author URI: http://piwitheme.fr |
---|
9 | */ |
---|
10 | |
---|
11 | |
---|
12 | global $conf, $user, $Slim; |
---|
13 | |
---|
14 | $themeconf = array( |
---|
15 | 'name' => 'Slim', |
---|
16 | 'parent' => 'default', |
---|
17 | 'local_head' => 'local_head.tpl', |
---|
18 | |
---|
19 | |
---|
20 | ); |
---|
21 | |
---|
22 | load_language('theme.lang', PHPWG_THEMES_PATH.'Full_Background/'); |
---|
23 | |
---|
24 | |
---|
25 | $Slim = array_merge( unserialize( $conf['Slim'] ), (array)$Slim ); |
---|
26 | |
---|
27 | |
---|
28 | |
---|
29 | add_event_handler('loc_begin_index', 'modify_nb_thumbnail_page'); |
---|
30 | if(!function_exists('modify_nb_thumbnail_page')) |
---|
31 | { |
---|
32 | function modify_nb_thumbnail_page() |
---|
33 | { |
---|
34 | global $user, $page; |
---|
35 | $user['nb_image_page']=999; |
---|
36 | $page['nb_image_page']=999; |
---|
37 | } |
---|
38 | } |
---|
39 | |
---|
40 | add_event_handler('get_categories_menu_sql_where', 'mic_get_categories_menu_sql_where', EVENT_HANDLER_PRIORITY_NEUTRAL, 3 ); |
---|
41 | if(!function_exists('mic_get_categories_menu_sql_where')) |
---|
42 | { |
---|
43 | function mic_get_categories_menu_sql_where($where){ |
---|
44 | global $page; |
---|
45 | $where = '1'; |
---|
46 | return $where; |
---|
47 | } |
---|
48 | } |
---|
49 | |
---|
50 | if($user['theme']=='Slim'){ |
---|
51 | add_event_handler('loc_end_page_header', 'load_Slim' ); |
---|
52 | |
---|
53 | function load_Slim() |
---|
54 | { |
---|
55 | global $user, $page; |
---|
56 | if($page['body_id']=='theAdminPage' ) |
---|
57 | {} |
---|
58 | else{ |
---|
59 | if($user['theme']=='Slim') |
---|
60 | {include('Slim.php');} |
---|
61 | |
---|
62 | } |
---|
63 | } |
---|
64 | |
---|
65 | |
---|
66 | if($Slim['style_slim']=='2') |
---|
67 | { |
---|
68 | add_event_handler('blockmanager_apply', 'sans_comm' ); |
---|
69 | function sans_comm( $menu_ref_arr ) |
---|
70 | { |
---|
71 | $menu = & $menu_ref_arr[0]; |
---|
72 | $block = $menu->get_block( 'mbMenu' ); |
---|
73 | unset( $block->data['comments'] ); |
---|
74 | } |
---|
75 | } |
---|
76 | } |
---|
77 | ?> |
---|