Ignore:
Timestamp:
Nov 5, 2010, 12:56:12 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix display time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/autosize.inc.php

    r7602 r7642  
    148148       
    149149        }// 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        }
    150161        /*
    151162        *
     
    154165           global  $template,$user,$conf,$picture ;
    155166                        $my_path = realpath(AUTOSIZE_PATH .'/');
    156          $userdata=$user;
    157          $fields = array( 'maxwidth', 'maxheight' );
     167                        $userdata=$user;
     168                        $fields = array( 'maxwidth', 'maxheight' );
    158169         
    159          $ThePicture = $template->get_template_vars('current');
     170                        $ThePicture = $template->get_template_vars('current');
    160171                        $data = array();
    161172                       
    162173
    163  return $content;
     174                return $content;
    164175
    165176                        $data['maxwidth'] = '1200';
    166 $data['maxheight'] ='250';
     177                        $data['maxheight'] ='250';
    167178                        $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                                }
    175184       
    176         if($data['maxwidth'] != "" )
    177 {
     185        if($data['maxwidth'] != "" ){
    178186        $picture['current']['scaled_width']=$data['maxwidth'];
    179187                 $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                                }
    187192   return $content;
    188193   /*
    189  $template->assign(
     194                        $template->assign(
    190195                                                array(
    191196                                                'AUTOSIZE_PATH' => $my_path,
     
    194199                                                 );
    195200 
    196                 $template->parse( 'autosize_cl_init', false);
    197         return $content;
     201                                $template->parse( 'autosize_cl_init', false);
     202                                return $content;
    198203        */
    199204
Note: See TracChangeset for help on using the changeset viewer.