Changeset 7642 for extensions/Autosize/autosize.inc.php
- Timestamp:
- Nov 5, 2010, 12:56:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r7602 r7642 148 148 149 149 }// function cl_autosize_script 150 static public function cl_add_css(){ 151 global $template,$user,$conf,$picture ; 152 $path = get_root_url().'plugins/'. basename(dirname(__FILE__)).'/'; 153 $template->append('head_elements', ' 154 <link rel="stylesheet" type="text/css" href="'.$path.'css/autosize.css"> 155 <script type="text/javascript" src="'.$path.'js/css.js"></script> 156 <script type="text/javascript"> 157 158 </script>' 159 ); 160 } 150 161 /* 151 162 * … … 154 165 global $template,$user,$conf,$picture ; 155 166 $my_path = realpath(AUTOSIZE_PATH .'/'); 156 157 167 $userdata=$user; 168 $fields = array( 'maxwidth', 'maxheight' ); 158 169 159 170 $ThePicture = $template->get_template_vars('current'); 160 171 $data = array(); 161 172 162 173 163 174 return $content; 164 175 165 176 $data['maxwidth'] = '1200'; 166 $data['maxheight'] ='250';177 $data['maxheight'] ='250'; 167 178 $data['user_id'] = $userdata['id']; 168 foreach ($fields as $field) 169 { 170 if (isset($_POST[$field])) 171 { 172 $data[$field] = $_POST[$field]; 173 } 174 } 179 foreach ($fields as $field){ 180 if (isset($_POST[$field])){ 181 $data[$field] = $_POST[$field]; 182 } 183 } 175 184 176 if($data['maxwidth'] != "" ) 177 { 185 if($data['maxwidth'] != "" ){ 178 186 $picture['current']['scaled_width']=$data['maxwidth']; 179 187 $picture['current']['scaled_height']=$data['maxheight']; 180 mass_updates(USER_INFOS_TABLE, 181 array('primary' => array('user_id'), 'update' => $fields), 182 array($data)); 183 184 } 185 186 188 mass_updates(USER_INFOS_TABLE, 189 array('primary' => array('user_id'), 'update' => $fields), 190 array($data)); 191 } 187 192 return $content; 188 193 /* 189 194 $template->assign( 190 195 array( 191 196 'AUTOSIZE_PATH' => $my_path, … … 194 199 ); 195 200 196 $template->parse( 'autosize_cl_init', false);197 return $content;201 $template->parse( 'autosize_cl_init', false); 202 return $content; 198 203 */ 199 204
Note: See TracChangeset
for help on using the changeset viewer.