source: extensions/Autosize/include/affiche.php @ 18735

Last change on this file since 18735 was 18735, checked in by cljosse, 12 years ago

[extensions] Autosize fix compatibility with 2.4 (option marge bottom)

File size: 5.7 KB
Line 
1<?php 
2
3$visible=(isset($visible))?$visible:false; 
4global $cl_version,$cl_plugin;
5
6$cl_version=isset($cl_version)?$cl_version:"";
7$cl_plugin=isset($cl_plugin)?$cl_plugin:"";
8
9$cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 
10(isset($_GET['cl_visible'])?$_GET['cl_visible']:'true'); 
11//===========================================================================
12$cookies="' x '"; 
13global $imgSizeWH ;
14if(isset($_COOKIE['windowHeight'])){
15$windowHeight=$_COOKIE['windowHeight'];
16$windowWidth=$_COOKIE['windowWidth'];
17}else{
18$windowHeight=600;
19$windowWidth=800;
20}
21global $size ;
22
23if(!isset($imgSizeWH)){
24 $imgSizeWH[0]=100;
25$imgSizeWH[1]=100;
26}
27 
28$size=  array(
29            'src_img_h' => $imgSizeWH[1],
30            'src_img_w' => $imgSizeWH[0],
31            'window_height' =>$windowHeight,
32            'window_width' => $windowWidth
33          );
34   
35       
36  $my_path = AUTOSIZE_PATH_ABS;
37  $theme=$user['theme'];
38
39
40  $user_status = $user['status'] ;
41
42                   $template->assign( array( 
43                   'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS,
44                   'ROOT_URL' => ROOT_URL,
45                   'AUTOSIZE_PATH' => AUTOSIZE_PATH,
46                                                                                        )
47                                                                        );     
48if (!isset($conf['prefix_thumbnail'])) $conf['prefix_thumbnail']="TN_";   
49//======================================================   
50
51//=== type possible ===
52 $defined_types = array_keys(ImageStdParams::get_defined_type_map());     
53if(isset($defined_types))
54    foreach ($defined_types as $type_size){
55      $value = $type_size;
56      $options[$value] = $type_size;   
57    } 
58 $autosize_parametres = cl_autosize_Get_Options();
59 //===========================================
60$COOKIE_PATH= cookie_path() ;
61 global $DEBUG_autosize;
62     
63        $template->assign(
64                                        array( 
65            'has_pamoorama' => $has_pamoorama,
66            'pictureMap' =>   $pictureDeriv ,
67            'pictureDeriv' =>   $pictureDeriv ,
68            'pictureSelType' => $pictureSelType,
69
70            'SRC_IMG' => $SRC_IMG,
71            'liste_type' => $liste_type ,
72            'COOKIE_PATH' =>  $COOKIE_PATH  ,
73             
74            'ratio' =>$imgSizeWH[0]/$imgSizeWH[1] ,   
75             
76            'webmaster_type' => array(
77                                            'OPTIONS' => $options,
78                                            'SELECTED' => $autosize_parametres->webmaster_type
79                                            ),
80            'admin_type' => array(
81                                            'OPTIONS' => $options,
82                                            'SELECTED' => $autosize_parametres->admin_type
83                                            ),
84            'generic_type' => array(
85                                            'OPTIONS' => $options,
86                                            'SELECTED' => $autosize_parametres->generic_type
87                                            ),
88            'guest_type' => array(
89                                            'OPTIONS' => $options,
90                                            'SELECTED' => $autosize_parametres->guest_type
91                                            ),
92            'normal_type' => array(
93                                            'OPTIONS' => $options,
94                                            'SELECTED' => $autosize_parametres->normal_type
95                                            ),
96
97            'DEBUG_autosize' =>  $DEBUG_autosize   ,
98            'cl_visible' =>  $cl_visible,
99            'cl_version' => $cl_version ,
100            'Version_pwg' => PHPWG_VERSION ,
101            'cl_plugin' => $cl_plugin,
102
103            'fade_in' => $autosize_parametres->fade_in,
104            'thumbnail' => $conf['prefix_thumbnail'],
105            'visible' => $visible,
106
107            'theme' => $theme,
108
109            'windowHeight' => $windowHeight,
110            'windowWidth' =>  $windowWidth,
111
112            'SCALED_WIDTH' => $imgSizeWH[0],
113            'SCALED_HEIGHT' => $imgSizeWH[1],     
114                         
115            'theImageWidth'     => isset($_COOKIE['theMainImageWidth'])?$_COOKIE['theMainImageWidth']: $imgSizeWH[0],
116            'theImageHeight'    => isset($_COOKIE['theMainImageHeight'])?$_COOKIE['theMainImageHeight']:$imgSizeWH[1],
117                   
118            'MINI_HEIGHT' => $autosize_parametres->mini_height,
119            'MINI_WIDTH'        => $autosize_parametres->mini_width,
120
121            'MINI_HEIGHT2' => $autosize_parametres->mini_height2,
122            'MINI_WIDTH2'       => $autosize_parametres->mini_width2,
123
124            'MARGE_BASSE' => $autosize_parametres->marge_basse,
125            'ECHELLE_MAX' => $autosize_parametres->echelle_max,
126
127       
128            'check_icon_v' => ($autosize_parametres->check_icon_v == 'on') ? 'checked="checked"'  : ''  ,
129            'check_desc_v' => ($autosize_parametres->check_desc_v == 'on') ? 'checked="checked"'  : '' ,
130            'defaut_type' => ($autosize_parametres->defaut_type == 'on') ? 'checked="defaut_type"'  : '' ,
131
132            'webmaster_enabled' => ($autosize_parametres->webmaster_enabled == 'on') ? 'checked="checked"'  : '' ,
133            'admin_enabled' => ($autosize_parametres->admin_enabled == 'on') ? 'checked="checked"'  : '' ,
134            'generic_enabled' => ($autosize_parametres->generic_enabled == 'on') ? 'checked="checked"'  : '' ,
135            'guest_enabled' => ($autosize_parametres->guest_enabled == 'on') ? 'checked="checked"'  : '' ,     
136            'normal_enabled' => ($autosize_parametres->normal_enabled == 'on') ? 'checked="checked"'  : '' ,
137
138            'user_status'   => get_user_status($user_status)  ,
139
140            'Size' => $size       
141                                       
142                                 )
143                                );     
144
145                           
146 //unset($_POST);
147?>
Note: See TracBrowser for help on using the repository browser.