source: extensions/Slide/Slide.php @ 28503

Last change on this file since 28503 was 27566, checked in by Miklfe, 10 years ago

Change theme.css
Slideshow fixed
compatibility with MyPiwiShop(futur)

File size: 3.2 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3include_once(PHPWG_ROOT_PATH.'include/functions_plugins.inc.php');
4
5global $conf, $template,$smarty, $repeat, $user, $page;
6        $params = array_merge(unserialize($conf['Slide']));
7               
8if ($params['color_theme'] == 2 )
9                {
10                $template->block_html_head('', '
11<link rel="stylesheet" type="text/css" href="themes/Slide/white.css">
12
13                ',$smarty, $repeat);
14                };
15               
16$plug_act = array();           
17               
18$plug = get_db_plugins('active');
19  foreach($plug as $plug){
20   $plug_act[]=$plug['id'];
21  }             
22               
23$withlightbox = get_db_plugins('active' , 'lightbox');
24if($withlightbox)
25        {
26        include_once(LIGHTBOX_PATH.'functions.inc.php');
27        $params = unserialize($conf['lightbox']);       
28        $template->func_combine_css(array('path'=>'plugins/lightbox/theme/'.$params['theme'].'/colorbox.css'));
29       
30        $conf['lightbox_rel'] = isset($conf['lightbox_rel']) ? ++$conf['lightbox_rel'] : 0;
31       
32        $lightbox_data = array(
33                "transition" => $params['transition'],
34                "speed" => $params['transition_speed'],
35                "initialWidth" => (!empty($params['initial_width']) ? $params['initial_width'] : $config_default['initial_width']),
36                "initialHeight" => (!empty($params['initial_height']) ? $params['initial_height'] : $config_default['initial_height']),
37                "width" => (!empty($params['fixed_width']) ? '"'.$params['fixed_width'].'"' : 'false'),
38                "height" => (!empty($params['fixed_height']) ? '"'.$params['fixed_height'].'"' : 'false'),
39                "catid" =>  @$page['category']['id'],
40                "section" => @$page['section'],
41                "tagids" => @implode(',', @$page['tag_ids'])
42        );
43       
44$lightbox_data = json_encode( $lightbox_data );
45$template->assign('lightbox_data', $lightbox_data);
46
47};
48       
49$withGthumb = get_db_plugins('active' , 'GThumb');
50if($withGthumb)
51        {
52        $template->func_combine_css(array('path'=>'plugins/GThumb/template/gthumb.css'));
53        $params = $conf['GThumb'];
54        $GThumb_data = json_encode($params);
55        $template->assign('slideGThumb', $GThumb_data);
56        $template->assign('GThumb_derivative_params', ImageStdParams::get_custom(9999, $conf['GThumb']['height']));
57};
58
59$withPiwiShop = get_db_plugins('active' , 'MyPiwiShop');
60if($withPiwiShop)
61        {
62        $template->func_combine_css(array('path'=>'plugins/MyPiwiShop/template/style.css'));
63        $template->func_combine_css(array('path'=>'plugins/MyPiwiShop/template/elem_form_style.css'));
64};
65
66$withEC = get_db_plugins('active' , 'EasyCaptcha');
67if($withEC)
68        {
69        $template->func_combine_css(array('path'=>'plugins/EasyCaptcha/template/drag.css'));
70        $template->func_combine_css(array('path'=>'plugins/EasyCaptcha/template/tictac.css'));
71        $params = $conf['EasyCaptcha'];
72        $EasyCaptcha_data = array(
73                "bd1"                   => $params['drag']['bd1'],
74                "bd2"                   => $params['drag']['bd2'],
75                "bg1"                   => $params['drag']['bg1'],
76                "bg2"                   => $params['drag']['bg2'],
77                "size"                  => $params['drag']['size'],
78                "obj"                   => $params['drag']['obj'],
79                "nb"                    => $params['drag']['nb'],
80                "txt"                   => $params['drag']['txt'],
81                "sel"                   => $params['drag']['sel'],
82                "tictacsize"    => $params['tictac']['size'],
83                );
84               
85        $EasyCaptcha_data = json_encode($EasyCaptcha_data);
86        $template->assign('slideEasyCaptcha', $EasyCaptcha_data);
87
88};
89
90$template->assign('pluginActive' , $plug_act);
91
92?>
Note: See TracBrowser for help on using the repository browser.