Ignore:
Timestamp:
Nov 2, 2010, 1:56:10 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] adjust width with pamooramic.

File:
1 edited

Legend:

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

    r7536 r7574  
    132132        static public function cl_autosize_script()
    133133        {
    134            global  $template,$user,$conf ;
    135  
    136                  
     134           global  $template,$user,$conf,$picture ;
    137135
    138136                $my_path =  basename(dirname(__FILE__)).'/' ;
     
    152150        /*
    153151        *
    154         */
    155         static public function cl_ajuste_data($content, $image){
    156  
    157            global  $template,$user,$conf ;
     152    */
     153        static public function cl_ajuste_data($content){
     154           global  $template,$user,$conf,$picture ;
    158155                        $my_path = realpath(AUTOSIZE_PATH .'/');
    159                        
    160                         $template->set_filenames(
    161                      array('autosize_cl_init'=> $my_path.'template/conflit.tpl')
    162                       );
    163  /*
    164156         $userdata=$user;
    165157         $fields = array( 'maxwidth', 'maxheight' );
     158         
    166159         $ThePicture = $template->get_template_vars('current');
    167 
    168160                        $data = array();
    169                         $data['maxheight'] = $ThePicture['scaled_height'];
    170                         $data['maxwidth'] = $ThePicture['scaled_width'];
     161                       
     162
     163 return $content;
     164
     165                        $data['maxwidth'] = '1200';
     166$data['maxheight'] ='250';
    171167                        $data['user_id'] = $userdata['id'];
    172168           foreach ($fields as $field)
     
    180176        if($data['maxwidth'] != "" )
    181177{
    182        
     178        $picture['current']['scaled_width']=$data['maxwidth'];
     179                 $picture['current']['scaled_height']=$data['maxheight'];
    183180       mass_updates(USER_INFOS_TABLE,
    184181                   array('primary' => array('user_id'), 'update' => $fields),
     
    187184}
    188185
    189    */
    190 
     186 
     187   return $content;
     188   /*
    191189 $template->assign(
    192190                                                array(
     
    198196                $template->parse( 'autosize_cl_init', false);
    199197        return $content;
    200 
     198        */
    201199
    202200                                                                                 
Note: See TracChangeset for help on using the changeset viewer.