Changeset 7943 for extensions/Autosize/autosize.inc.php
- Timestamp:
- Nov 30, 2010, 9:01:46 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r7912 r7943 43 43 if (isset( $page['body_id']) ) { 44 44 if ( $page['body_id']=='thePicturePage' ) { 45 if ( isset($picture['current'])){ 46 45 if ( isset($picture['current'])){ 47 46 $autosize_parametres = cl_autosize_Get_Options(); 48 47 include (AUTOSIZE_PATH."include/affiche.php"); … … 139 138 $my_path = dirname(__FILE__).'/'; 140 139 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 141 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ; 142 140 143 141 $ThePicture = $template->get_template_vars('current'); 144 142 $tpl_name = $user['theme'] ; … … 162 160 { 163 161 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 164 //userDefManage ??162 165 163 $my_path = basename(dirname(__FILE__)).'/' ; 166 164 $my_path = dirname(__FILE__).'/'; 167 165 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 168 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;166 169 167 $theme=$user['theme']; 170 168 $template->assign( … … 173 171 'name' => $cl_plugin['name'] , 174 172 'ma_page' => $page['body_id'], 175 'cl_conflit' => $cl_conflit ,173 176 174 'theme' => $theme , 177 175 'DEBUG' => $debug , … … 182 180 $autoscript="<script type='text/javascript'> 183 181 if (typeof (save_framework) == 'function') 184 save_framework('".$page['body_id']."');182 save_framework('".$page['body_id']."'); 185 183 </script>"; 186 184 $template->append('footer_elements',$autoscript); … … 199 197 $template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) ); 200 198 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 201 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;199 202 200 $theme=$user['theme']; 203 201 … … 206 204 'cl_version' => $cl_plugin['version'] , 207 205 'name' => $cl_plugin['name'] , 208 'cl_conflit' => $cl_conflit ,206 209 207 'theme' => $theme , 210 208 'DEBUG' => $debug , … … 220 218 */ 221 219 static public function cl_ajuste_data($content){ 222 223 224 225 220 global $template,$user,$conf,$picture ; 221 $my_path = realpath(AUTOSIZE_PATH .'/'); 222 $userdata=$user; 223 $fields = array( 'maxwidth', 'maxheight' ); 226 224 227 $ThePicture = $template->get_template_vars('current'); 228 $data = array(); 229 230 231 225 $ThePicture = $template->get_template_vars('current'); 226 $data = array(); 232 227 return $content; 233 228 234 235 $data['maxheight'] ='250';236 237 238 239 240 241 242 243 229 $data['maxwidth'] = '1200'; 230 $data['maxheight'] ='250'; 231 $data['user_id'] = $userdata['id']; 232 foreach ($fields as $field) 233 { 234 if (isset($_POST[$field])) 235 { 236 $data[$field] = $_POST[$field]; 237 } 238 } 244 239 245 240 if($data['maxwidth'] != "" ) 246 { 247 $picture['current']['scaled_width']=$data['maxwidth']; 248 $picture['current']['scaled_height']=$data['maxheight']; 249 mass_updates(USER_INFOS_TABLE, 250 array('primary' => array('user_id'), 'update' => $fields), 251 array($data)); 252 253 } 254 255 256 return $content; 257 /* 258 $template->assign( 259 array( 260 'AUTOSIZE_PATH' => $my_path, 261 ) 262 ); 263 264 $template->parse( 'autosize_cl_init', false); 265 return $content; 266 */ 267 268 241 { 242 $picture['current']['scaled_width']=$data['maxwidth']; 243 $picture['current']['scaled_height']=$data['maxheight']; 244 mass_updates(USER_INFOS_TABLE, 245 array('primary' => array('user_id'), 'update' => $fields), 246 array($data)); 247 } 248 249 return $content; 269 250 } 270 251
Note: See TracChangeset
for help on using the changeset viewer.