1 | <?php |
---|
2 | /* |
---|
3 | Theme Name: Slide |
---|
4 | Version: auto |
---|
5 | Description: theme PwgCarbon_dft pour Piwigo. |
---|
6 | Theme URI: http://piwigo.org/ext/extension_view.php?eid=688 |
---|
7 | Author:Miklfe [piwitheme.fr] |
---|
8 | Author URI: http://piwitheme.fr |
---|
9 | */ |
---|
10 | |
---|
11 | global $conf, $user, $Slide; |
---|
12 | |
---|
13 | |
---|
14 | $Slide = array_merge( unserialize( $conf['Slide'] ), (array)$Slide ); |
---|
15 | |
---|
16 | |
---|
17 | $themeconf = array( |
---|
18 | 'name' => 'Slide', |
---|
19 | 'parent' => 'default', |
---|
20 | 'load_parent_css' => true, |
---|
21 | 'load_parent_local_head' => false, |
---|
22 | 'local_head' => 'local_head.tpl', |
---|
23 | ); |
---|
24 | |
---|
25 | |
---|
26 | |
---|
27 | add_event_handler('get_categories_menu_sql_where', 'mic_get_categories_menu_sql_where', EVENT_HANDLER_PRIORITY_NEUTRAL, 3 ); |
---|
28 | if(!function_exists('mic_get_categories_menu_sql_where')) |
---|
29 | { |
---|
30 | function mic_get_categories_menu_sql_where($where){ |
---|
31 | global $page; |
---|
32 | $where = '1'; |
---|
33 | return $where; |
---|
34 | } |
---|
35 | } |
---|
36 | add_event_handler('get_index_derivative_params', 'derivative_params_thumb_defaut', EVENT_HANDLER_PRIORITY_NEUTRAL+1 ); |
---|
37 | function derivative_params_thumb_defaut($default) |
---|
38 | { |
---|
39 | if (pwg_get_session_var('index_deriv')===null) |
---|
40 | {// pas de surcharge specifique par l'utilisateur |
---|
41 | return ImageStdParams::get_by_type(IMG_XXSMALL); |
---|
42 | } |
---|
43 | return $default; |
---|
44 | } |
---|
45 | |
---|
46 | if($user['theme']=='Slide'){ |
---|
47 | add_event_handler('loc_end_page_header', 'load_Slide' ); |
---|
48 | |
---|
49 | function load_Slide() |
---|
50 | { |
---|
51 | global $user, $page; |
---|
52 | if($page['body_id']=='theAdminPage' ) |
---|
53 | {} |
---|
54 | else{ |
---|
55 | if($user['theme']=='Slide') |
---|
56 | {include('Slide.php');} |
---|
57 | |
---|
58 | } |
---|
59 | } |
---|
60 | } |
---|
61 | ?> |
---|