/[drupal]/contributions/modules/slideshowcs/slideshowcs.module
ViewVC logotype

Diff of /contributions/modules/slideshowcs/slideshowcs.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.6.2.6, Tue Jan 13 14:32:39 2009 UTC revision 1.1.2.6.2.7, Sun Apr 19 15:07:29 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: slideshowcs.module,v 1.1.2.6.2.5 2009/01/08 14:38:32 davebv Exp $  // $Id: slideshowcs.module,v 1.1.2.6.2.6 2009/01/13 14:32:39 davebv Exp $
3    
4  /**  /**
5    * @file    * @file
# Line 139  function slideshowcs_generate($delta) { Line 139  function slideshowcs_generate($delta) {
139          $auxiliartoy = 'toy'. $indice . $delta ;          $auxiliartoy = 'toy'. $indice . $delta ;
140          $auxiliartozoom = 'tozoom'. $indice . $delta ;          $auxiliartozoom = 'tozoom'. $indice . $delta ;
141          $auxiliartime = 'time'. $indice . $delta ;          $auxiliartime = 'time'. $indice . $delta ;
142            $auxiliarlink = 'link'. $indice . $delta ;
143          $urlpic = file_create_url(          $urlpic = file_create_url(
144            strtr("!filebase!filename",            strtr("!filebase!filename",
145              array(              array(
# Line 159  function slideshowcs_generate($delta) { Line 160  function slideshowcs_generate($delta) {
160          );          );
161          $images[] = array(          $images[] = array(
162            'src' => $urlpic,            'src' => $urlpic,
163              'href' => variable_get($auxiliarlink, '') ,
164            'from' => strtr('!fromx% !fromy% !fromzoomx', $from),            'from' => strtr('!fromx% !fromy% !fromzoomx', $from),
165            'to' => strtr('!tox% !toy% !tozoomx', $to),            'to' => strtr('!tox% !toy% !tozoomx', $to),
166            'time' => variable_get($auxiliartime, '2'),            'time' => variable_get($auxiliartime, '2'),
# Line 240  function theme_slideshowcs_my_form(&$for Line 242  function theme_slideshowcs_my_form(&$for
242      array('data' => t('To y %')),      array('data' => t('To y %')),
243      array('data' => t('To Zoom .x')),      array('data' => t('To Zoom .x')),
244      array('data' => t('Time (s)')),      array('data' => t('Time (s)')),
245        array('data' => t('Link to...')),
246    );    );
247    $rows = array() ;    $rows = array() ;
248    $row = array() ;    $row = array() ;
249    $first_level = array() ;    $first_level = array() ;
250      //print print_r($form['files'],1) ;
251    foreach (element_children($form['files']) as $key => $value) {    foreach (element_children($form['files']) as $key => $value) {
252      // TODO      // TODO
253      // $form['files'][$value]['weight']['#attributes']['class'] = 'menu-weight';      // $form['files'][$value]['weight']['#attributes']['class'] = 'menu-weight';
# Line 387  function slideshowcs_my_block_form($delt Line 391  function slideshowcs_my_block_form($delt
391    
392      $form['files'][$value] = array(      $form['files'][$value] = array(
393        '#type' => 'hidden',        '#type' => 'hidden',
394        '#title' => t($value),        '#title' => $value,
395      );      );
396      $auxiliar = 'enabled'. $indice . $delta ;      $auxiliar = 'enabled'. $indice . $delta ;
397      $form['files'][$value][$auxiliar] = array(      $form['files'][$value][$auxiliar] = array(
# Line 476  function slideshowcs_my_block_form($delt Line 480  function slideshowcs_my_block_form($delt
480        '#required' => FALSE,        '#required' => FALSE,
481        '#weight' => 8 ,        '#weight' => 8 ,
482        );        );
483        // Link of each image
484        $auxiliar = 'link'. $indice . $delta ;
485        $form['files'][$value][$auxiliar] = array(
486          '#type' => 'textfield',
487          //'#title' => t('Link to...'),
488          '#default_value' => variable_get($auxiliar, ''),
489          '#size' => 30,
490          '#maxlength' => 30,
491          //'#description' => t("Duration."),
492          '#required' => FALSE,
493          '#weight' => 9 ,
494          );
495      }      }
496    
497    //$form = system_settings_form($form);    //$form = system_settings_form($form);
# Line 554  function slideshowcs_my_block_form_save( Line 570  function slideshowcs_my_block_form_save(
570      // Duration      // Duration
571      $auxiliar = 'time'. $indice . $delta ;      $auxiliar = 'time'. $indice . $delta ;
572      variable_set($auxiliar, $edit[$auxiliar]) ;      variable_set($auxiliar, $edit[$auxiliar]) ;
573        // Link
574        $auxiliar = 'link'. $indice . $delta ;
575        variable_set($auxiliar, $edit[$auxiliar]) ;
576    }    }
577    return 0;    return 0;
578  }  }

Legend:
Removed from v.1.1.2.6.2.6  
changed lines
  Added in v.1.1.2.6.2.7

  ViewVC Help
Powered by ViewVC 1.1.2