Changeset 2227


Ignore:
Timestamp:
Feb 29, 2008, 2:25:13 AM (16 years ago)
Author:
rvelices
Message:

picture, footer and picture modify template migration

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/picture_modify.php

    r2201 r2227  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    225225}
    226226
    227 $template->assign_vars(
     227$template->assign(
    228228  array(
    229229    'U_SYNC' =>
     
    266266if ($row['has_high'] == 'true')
    267267{
    268   $template->assign_block_vars(
    269     'high',
     268  $template->assign(
     269    'HIGH_FILESIZE',
     270    isset($row['high_filesize'])
     271        ? $row['high_filesize'].' KB'
     272        : l10n('unknown')
     273    );
     274}
     275
     276// image level options
     277$tpl_options = array();
     278foreach ($conf['available_permission_levels'] as $level)
     279{
     280  $tpl_options[$level] = l10n( sprintf('Level %d', $level) ).' ('.$level.')';
     281}
     282$selected_level = isset($_POST['level']) ? $_POST['level'] : $row['level'];
     283$template->assign(
    270284    array(
    271       'FILESIZE' => isset($row['high_filesize'])
    272         ? $row['high_filesize'].' KB'
    273         : l10n('unknown'),
    274       )
    275     );
    276 }
    277 
    278 // image level options
    279 $blockname = 'level_option';
    280 $selected_level = isset($_POST['level']) ? $_POST['level'] : $row['level'];
    281 foreach ($conf['available_permission_levels'] as $level)
    282 {
    283   $template->assign_block_vars(
    284     $blockname,
    285     array(
    286       'VALUE' => $level,
    287       'CONTENT' => l10n( sprintf('Level %d', $level) ),
    288       'SELECTED' => ($level==$selected_level ? 'selected="selected"' : ''),
    289       ));
    290 }
     285      'level_options'=> $tpl_options,
     286      'level_options_selected' => array($selected_level)
     287    )
     288  );
    291289
    292290// creation date
     
    309307  list($year, $month, $day) = array('', 0, 0);
    310308}
    311 get_day_list('date_creation_day', $day);
     309
     310
    312311get_month_list('date_creation_month', $month);
    313 $template->assign_vars(array('DATE_CREATION_YEAR_VALUE' => $year));
     312$month_list = $lang['month'];
     313$month_list[0]='------------';
     314ksort($month_list);
     315
     316$template->assign(
     317    array(
     318      'DATE_CREATION_DAY_VALUE' => $day,
     319      'DATE_CREATION_MONTH_VALUE' => $month,
     320      'DATE_CREATION_YEAR_VALUE' => $year,
     321      'month_list' => $month_list,
     322      )
     323    );
    314324
    315325$query = '
     
    322332$result = pwg_query($query);
    323333
    324 if (mysql_num_rows($result) > 1)
    325 {
    326   $template->assign_block_vars('links', array());
    327 }
    328 
    329334while ($row = mysql_fetch_array($result))
    330335{
     
    332337    get_cat_display_name_cache(
    333338      $row['uppercats'],
    334       PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id=',
     339      get_root_url().'admin.php?page=cat_modify&cat_id=',
    335340      false
    336341      );
     
    338343  if ($row['category_id'] == $storage_category_id)
    339344  {
    340     $template->assign_vars(array('STORAGE_CATEGORY' => $name));
     345    $template->assign('STORAGE_CATEGORY', $name);
    341346  }
    342347  else
    343348  {
    344     $template->assign_block_vars('links.category', array('NAME' => $name));
     349    $template->append('related_categories', $name);
    345350  }
    346351}
     
    396401if (isset($url_img))
    397402{
    398   $template->assign_block_vars(
    399     'jumpto',
    400     array(
    401       'URL' => $url_img
    402       )
    403     );
     403  $template->assign( 'U_JUMPTO', $url_img );
    404404}
    405405
     
    412412    AND id != '.$storage_category_id.'
    413413;';
    414 display_select_cat_wrapper($query, array(), 'associated_option');
     414display_select_cat_wrapper($query, array(), 'associated_options');
    415415
    416416$result = pwg_query($query);
     
    425425  WHERE id NOT IN ('.implode(',', $associateds).')
    426426;';
    427 display_select_cat_wrapper($query, array(), 'dissociated_option');
     427display_select_cat_wrapper($query, array(), 'dissociated_options');
    428428
    429429// representing
     
    433433  WHERE representative_picture_id = '.$_GET['image_id'].'
    434434;';
    435 display_select_cat_wrapper($query, array(), 'elected_option');
     435display_select_cat_wrapper($query, array(), 'elected_options');
    436436
    437437$query = '
     
    441441    OR representative_picture_id IS NULL
    442442;';
    443 display_select_cat_wrapper($query, array(), 'dismissed_option');
     443display_select_cat_wrapper($query, array(), 'dismissed_options');
    444444
    445445//----------------------------------------------------------- sending html code
  • trunk/include/page_tail.php

    r2201 r2227  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    3232    'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
    3333    'PHPWG_URL' => PHPWG_URL,
    34 
    35     'L_TITLE_MAIL' => urlencode(l10n('title_send_mail')),
    3634    ));
    3735
     
    4038if (!is_a_guest())
    4139{
    42   $template->assign_block_vars(
    43     'contact',
    44     array(
    45       'MAIL' => get_webmaster_mail_address()
    46       )
     40  $template->assign(
     41    'CONTACT_MAIL', get_webmaster_mail_address()
    4742    );
    4843}
     
    7267}
    7368
    74 if ( !empty($debug_vars) )
    75 {
    76   $template->assign_block_vars('debug',$debug_vars );
    77 }
     69$template->assign('debug', $debug_vars );
    7870
    7971trigger_action('loc_end_page_tail');
     
    8173// Generate the page
    8274//
    83 $template->parse('tail');
    84 
    85 $template->p();
     75$template->pparse('tail');
    8676?>
  • trunk/include/picture_comment.inc.php

    r2155 r2227  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    7474  }
    7575
    76   $block_var = ($comment_action=='reject') ? 'errors.error' : 'infos.info';
    77   foreach ($infos as $info)
    78   {
    79     $template->assign_block_vars(
    80         $block_var,
    81         array( 'TEXT'=>$info )
    82       );
    83   }
     76  $template->assign(
     77      ($comment_action=='reject') ? 'errors' : 'infos',
     78      $infos
     79    );
    8480
    8581  // allow plugins to notify what's going on
     
    109105  }
    110106
    111   $page['navigation_bar'] = create_navigation_bar(
     107  $navigation_bar = create_navigation_bar(
    112108    duplicate_picture_url(array(), array('start')),
    113109    $row['nb_comments'],
     
    117113    );
    118114
    119   $template->assign_block_vars(
    120     'comments',
     115  $template->assign(
    121116    array(
    122       'NB_COMMENT' => $row['nb_comments'],
    123       'NAV_BAR' => $page['navigation_bar'],
     117      'COMMENT_COUNT' => $row['nb_comments'],
     118      'COMMENT_NAV_BAR' => $navigation_bar,
    124119      )
    125120    );
     
    139134    while ($row = mysql_fetch_array($result))
    140135    {
    141       $template->assign_block_vars(
    142         'comments.comment',
     136      $tpl_comment =
    143137        array(
    144           'COMMENT_AUTHOR' => trigger_event('render_comment_author',
     138          'AUTHOR' => trigger_event('render_comment_author',
    145139            empty($row['author'])
    146140            ? l10n('guest')
    147141            : $row['author']),
    148142
    149           'COMMENT_DATE' => format_date(
     143          'DATE' => format_date(
    150144            $row['date'],
    151145            'mysql_datetime',
    152146            true),
    153147
    154           'COMMENT' => trigger_event('render_comment_content',$row['content']),
    155           )
     148          'CONTENT' => trigger_event('render_comment_content',$row['content']),
    156149        );
    157150
    158151      if (is_admin())
    159152      {
    160         $template->assign_block_vars(
    161           'comments.comment.delete',
    162           array(
    163             'U_COMMENT_DELETE' =>
    164               add_url_params(
    165                     $url_self,
    166                     array(
    167                       'action'=>'delete_comment',
    168                       'comment_to_delete'=>$row['id']
    169                     )
    170                 )
    171             )
    172           );
     153        $tpl_comment['U_DELETE'] =
     154            add_url_params(
     155                  $url_self,
     156                  array(
     157                    'action'=>'delete_comment',
     158                    'comment_to_delete'=>$row['id']
     159                  )
     160              );
    173161      }
     162      $template->append('comments', $tpl_comment);
    174163    }
    175164  }
     
    185174      $content = htmlspecialchars($comm['content']);
    186175    }
    187     $template->assign_block_vars('comments.add_comment',
     176    $template->assign('comment_add',
    188177        array(
     178          'F_ACTION' => $url_self,
    189179          'KEY' => $key,
    190           'CONTENT' => $content
     180          'CONTENT' => $content,
     181          'SHOW_AUTHOR' => !is_classic_user()
    191182        ));
    192 
    193     // display author field if the user status is guest or generic
    194     if (!is_classic_user())
    195     {
    196       $template->assign_block_vars(
    197         'comments.add_comment.author_field', array()
    198         );
    199     }
    200183  }
    201184}
  • trunk/include/picture_metadata.inc.php

    r1903 r2227  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    7 // | branch        : BSF (Best So Far)
    8 // | file          : $RCSfile$
     7// | file          : $Id$
    98// | last update   : $Date$
    109// | last modifier : $Author$
     
    3231
    3332include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
    34 $template->assign_block_vars('metadata', array());
    3533if (($conf['show_exif']) and (function_exists('read_exif_data')))
    3634{
     
    3836  {
    3937    $exif = trigger_event('format_exif_data', $exif, $picture['current'] );
    40     $template->assign_block_vars(
    41       'metadata.headline',
    42       array('TITLE' => 'EXIF Metadata')
     38
     39    $tpl_meta = array(
     40        'TITLE' => 'EXIF Metadata',
     41        'lines' => array(),
    4342      );
    4443
     
    5453            $key = $lang['exif_field_'.$field];
    5554          }
    56 
    57           $template->assign_block_vars(
    58             'metadata.line',
    59             array(
    60               'KEY' => $key,
    61               'VALUE' => $exif[$field]
    62               )
    63             );
     55          $tpl_meta['lines'][$key] = $exif[$field];
    6456        }
    6557      }
     
    7466            $key = $lang['exif_field_'.$tokens[1]];
    7567          }
    76 
    77           $template->assign_block_vars(
    78             'metadata.line',
    79             array(
    80               'KEY' => $key,
    81               'VALUE' => $exif[$tokens[0]][$tokens[1]]
    82               )
    83             );
     68          $tpl_meta['lines'][$key] = $exif[$tokens[0]][$tokens[1]];
    8469        }
    8570      }
    8671    }
     72    $template->append('metadata', $tpl_meta);
    8773  }
    8874}
     75
    8976if ($conf['show_iptc'])
    9077{
     
    9481  if (count($iptc) > 0)
    9582  {
    96     $template->assign_block_vars(
    97       'metadata.headline',
    98       array('TITLE' => 'IPTC Metadata')
     83    $tpl_meta = array(
     84        'TITLE' => 'IPTC Metadata',
     85        'lines' => array(),
    9986      );
    100   }
    10187
    102   foreach ($iptc as $field => $value)
    103   {
    104     $key = $field;
    105     if (isset($lang[$field]))
     88    foreach ($iptc as $field => $value)
    10689    {
    107       $key = $lang[$field];
     90      $key = $field;
     91      if (isset($lang[$field]))
     92      {
     93        $key = $lang[$field];
     94      }
     95      $tpl_meta['lines'][$key] = $value;
    10896    }
    109 
    110     $template->assign_block_vars(
    111       'metadata.line',
    112       array(
    113         'KEY' => $key,
    114         'VALUE' => $value
    115         )
    116       );
     97    $template->append('metadata', $tpl_meta);
    11798  }
    11899}
  • trunk/include/picture_rate.inc.php

    r2201 r2227  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    7 // | branch        : BSF (Best So Far)
    8 // | file          : $RCSfile$
     7// | file          : $Id$
    98// | last update   : $Date$
    109// | last modifier : $Author$
     
    3635SELECT COUNT(rate) AS count
    3736     , ROUND(AVG(rate),2) AS average
    38      , ROUND(STD(rate),2) AS STD
     37     , ROUND(STD(rate),2) AS std
    3938  FROM '.RATE_TABLE.'
    4039  WHERE element_id = '.$picture['current']['id'].'
    4140;';
    4241  $row = mysql_fetch_array(pwg_query($query));
    43   if ($row['count'] == 0)
    44   {
    45     $value = l10n('no_rate');
    46   }
    47   else
    48   {
    49     $value = sprintf(
    50       l10n('%.2f (rated %d times, standard deviation = %.2f)'),
    51       $row['average'],
    52       $row['count'],
    53       $row['STD']
    54       );
    55   }
     42  $template->assign('rate_summary', $row);
    5643
    5744  $user_rate = null;
     
    8471    }
    8572
    86     $template->assign_block_vars(
    87       'rate',
    88       array(
    89         'SENTENCE' =>isset($user_rate) ? l10n('update_rate') : l10n('new_rate'),
    90         'F_ACTION' => add_url_params(
     73    $template->assign(
     74        'rating',
     75        array(
     76          'F_ACTION' => add_url_params(
    9177                        $url_self,
    9278                        array('action'=>'rate')
    93                       )
     79                      ),
     80          'USER_RATE'=> $user_rate,
     81          'marks'    => $conf['rate_items']
    9482        )
    9583      );
    96 
    97     $template->assign_block_vars('info_rate', array('CONTENT' => $value));
    98 
    99     foreach ($conf['rate_items'] as $num => $mark)
    100     {
    101       $template->assign_block_vars(
    102         'rate.rate_option',
    103         array(
    104           'OPTION'    => $mark,
    105           'SEPARATOR' => ($num > 0 ? '|' : ''),
    106           )
    107         );
    108       if (isset($user_rate) and $user_rate==$mark)
    109       {
    110         $template->assign_block_vars('rate.rate_option.my_rate', array() );
    111       }
    112       else
    113       {
    114         $template->assign_block_vars('rate.rate_option.not_my_rate', array() );
    115       }
    116     }
    11784  }
    11885}
  • trunk/picture.php

    r2224 r2227  
    8282  {
    8383    $uuid = uniqid(rand());
    84     $template->assign_block_vars(
     84    $template->assign(
    8585      'high',
    8686      array(
     
    9090      );
    9191  }
    92   $template->assign_vars( array(
     92  $template->assign( array(
    9393      'SRC_IMG' => $element_info['image_url'],
    9494      'ALT_IMG' => $element_info['file'],
     
    473473    'picture' =>
    474474      (($page['slideshow'] and $conf['light_slideshow']) ? 'slideshow.tpl' : 'picture.tpl'),
    475     'nav_buttons' => 'picture_nav_buttons.tpl'));
    476 
    477 if ($page['slideshow'])
    478 {
    479   // Add local-slideshow.css file if exists
    480   // Not only for ligth
    481   $css = get_root_url() . get_themeconf('template_dir') . '/theme/'
    482        . get_themeconf('theme') . '/local-slideshow.css';
    483   if (file_exists($css))
    484   {
    485     $template->assign_block_vars('slideshow', array());
    486   }
    487 }
     475    ));
     476
    488477
    489478$title =  $picture['current']['name'];
     
    524513    and $picture['next']['is_picture'] )
    525514{
    526   $template->assign_block_vars(
    527     'prefetch',
    528     array (
    529       'URL' => $picture['next']['image_url']
    530       )
    531     );
     515  $template->assign('U_PREFETCH', $picture['next']['image_url'] );
    532516}
    533517
    534518//------------------------------------------------------- navigation management
    535 foreach (array('first','previous','next','last') as $which_image)
     519foreach (array('first','previous','next','last', 'current') as $which_image)
    536520{
    537521  if (isset($picture[$which_image]))
    538522  {
    539     $template->assign_block_vars(
     523    $template->assign(
    540524      $which_image,
    541525      array(
    542         'TITLE_IMG' => $picture[$which_image]['name'],
    543         'IMG' => $picture[$which_image]['thumbnail'],
     526        'TITLE' => $picture[$which_image]['name'],
     527        'THUMB_SRC' => $picture[$which_image]['thumbnail'],
    544528        // Params slideshow was transmit to navigation buttons
    545529        'U_IMG' =>
    546530          add_url_params(
    547             $picture[$which_image]['url'], $slideshow_url_params)
     531            $picture[$which_image]['url'], $slideshow_url_params),
     532        'U_DOWNLOAD' => @$picture['current']['download_url'],
    548533        )
    549534      );
    550535  }
    551   else
    552   {
    553     $template->assign_block_vars(
    554       $which_image.'_unactive',
    555       array()
    556       );
    557   }
    558536}
    559537
     
    561539if ($page['slideshow'])
    562540{
     541  // Add local-slideshow.css file if exists
     542  // Not only for ligth
     543  $css = PHPWG_ROOT_PATH . get_themeconf('template_dir') . '/theme/'
     544       . get_themeconf('theme') . '/local-slideshow.css';
     545  if (file_exists($css))
     546  {
     547    //TODO CORRECT THIS $template->assign_block_vars('slideshow', array());
     548  }
     549
     550  $tpl_slideshow = array();
     551
    563552  //slideshow end
    564   $template->assign_block_vars(
    565     'stop_slideshow',
     553  $template->assign(
    566554    array(
    567       'U_SLIDESHOW' => $picture['current']['url'],
     555      'U_SLIDESHOW_STOP' => $picture['current']['url'],
    568556      )
    569557    );
     
    571559  foreach (array('repeat', 'play') as $p)
    572560  {
    573     $template->assign_block_vars(
    574       ($slideshow_params[$p] ? 'stop' : 'start').'_'.$p,
    575       array(
    576         // Params slideshow was transmit to navigation buttons
    577         'U_IMG' =>
     561    $var_name =
     562      'U_'
     563      .($slideshow_params[$p] ? 'STOP_' : 'START_')
     564      .strtoupper($p);
     565
     566    $tpl_slideshow[$var_name] =
    578567          add_url_params(
    579568            $picture['current']['url'],
    580569            array('slideshow' =>
    581570              encode_slideshow_params(
    582                 array_merge($slideshow_params, 
     571                array_merge($slideshow_params,
    583572                  array($p => ! $slideshow_params[$p]))
    584                   )
    585573                )
    586574              )
    587           )
    588       );
     575          );
    589576  }
    590577
     
    594581    $new_slideshow_params =
    595582      correct_slideshow_params(
    596         array_merge($slideshow_params, 
     583        array_merge($slideshow_params,
    597584                  array('period' => $new_period)));
    598     $block_period = $op.'_period';
    599585
    600586    if ($new_slideshow_params['period'] === $new_period)
    601587    {
    602       $template->assign_block_vars(
    603         $block_period,
    604         array(
    605           // Params slideshow was transmit to navigation buttons
    606           'U_IMG' =>
     588      $var_name = 'U_'.strtoupper($op).'_PERIOD';
     589      $tpl_slideshow[$var_name] =
    607590            add_url_params(
    608591              $picture['current']['url'],
    609592              array('slideshow' => encode_slideshow_params($new_slideshow_params)
    610593                  )
    611                 )
    612               )
    613594          );
    614595    }
    615     else
    616     {
    617       $template->assign_block_vars(
    618         $block_period.'_unactive',
    619         array()
    620         );
    621     }
    622   }
     596  }
     597  $template->assign('slideshow', $tpl_slideshow );
    623598}
    624599else
    625600{
    626   $template->assign_block_vars(
    627     'start_slideshow',
     601  $template->assign(
    628602    array(
    629       'U_SLIDESHOW' =>
     603      'U_SLIDESHOW_START' =>
    630604        add_url_params(
    631605          $picture['current']['url'],
     
    633607      )
    634608    );
    635   $template->assign_block_vars(
    636     'up',array('U_URL' => $url_up));
    637 }
    638 
    639 $template->assign_vars(
     609}
     610
     611$template->assign(
    640612  array(
    641613    'SECTION_TITLE' => $page['title'],
    642     'PICTURE_TITLE' => $picture['current']['name'],
    643614    'PHOTO' => $title_nb,
    644     'TITLE' => $picture['current']['name'],
     615    'SHOW_PICTURE_NAME_ON_TITLE' => $conf['show_picture_name_on_title'],
    645616
    646617    'LEVEL_SEPARATOR' => $conf['level_separator'],
     618   
     619    'FILE_PICTURE_NAV_BUTTONS' => 'picture_nav_buttons.tpl',
    647620
    648621    'U_HOME' => make_index_url(),
     622    'U_UP' => $url_up,
    649623    'U_METADATA' => $url_metadata,
    650     'U_ADMIN' => $url_admin,
    651     'U_ADD_COMMENT' => $url_self,
    652624    )
    653625  );
    654626
    655 if ($conf['show_picture_name_on_title'])
    656 {
    657   $template->assign_block_vars('title', array());
    658 }
    659627
    660628//------------------------------------------------------- upper menu management
    661629
    662 // download link
    663 if ( isset($picture['current']['download_url']) )
    664 {
    665   $template->assign_block_vars(
    666     'download',
     630// admin links
     631if (is_admin())
     632{
     633  if (isset($page['category']))
     634  {
     635    $template->assign(
     636      array(
     637        'U_SET_AS_REPRESENTATIVE' => add_url_params($url_self,
     638                    array('action'=>'set_as_representative')
     639                 )
     640        )
     641      );
     642  }
     643 
     644  $template->assign(
    667645    array(
    668       'U_DOWNLOAD' => $picture['current']['download_url']
    669       )
    670     );
    671 }
    672 
    673 // button to set the current picture as representative
    674 if (is_admin() and isset($page['category']))
    675 {
    676   $template->assign_block_vars(
    677     'representative',
    678     array(
    679       'URL' => add_url_params($url_self,
    680                   array('action'=>'set_as_representative')
    681                )
    682       )
    683     );
    684 }
    685 
    686 // caddie button
    687 if (is_admin())
    688 {
    689   $template->assign_block_vars(
    690     'caddie',
    691     array(
    692       'URL' => add_url_params($url_self,
     646      'U_CADDIE' => add_url_params($url_self,
    693647                  array('action'=>'add_to_caddie')
    694                )
     648               ),
     649      'U_ADMIN' => $url_admin,
    695650      )
    696651    );
     
    712667  if ($row['nb_fav'] == 0)
    713668  {
    714     $template->assign_block_vars(
     669    $template->assign(
    715670      'favorite',
    716671      array(
     
    728683  else
    729684  {
    730     $template->assign_block_vars(
     685    $template->assign(
    731686      'favorite',
    732687      array(
     
    743698  }
    744699}
    745 //------------------------------------ admin link for information modifications
    746 if ( is_admin() )
    747 {
    748   $template->assign_block_vars('admin', array());
    749 }
    750700
    751701//--------------------------------------------------------- picture information
     
    755705    and !empty($picture['current']['comment']))
    756706{
    757   $template->assign_block_vars(
    758     'legend',
    759     array(
    760       'COMMENT_IMG' =>
     707  $template->assign(
     708      'COMMENT_IMG',
    761709        trigger_event('render_element_description',
    762710          $picture['current']['comment'])
    763       ));
     711      );
    764712  $header_infos['COMMENT'] = strip_tags($picture['current']['comment']);
    765713}
     
    781729  $header_infos['INFO_AUTHOR'] = $picture['current']['author'];
    782730}
    783 else
    784 {
    785   $infos['INFO_AUTHOR'] = l10n('N/A');
    786 }
    787731
    788732// creation date
     
    800744  $infos['INFO_CREATION_DATE'] =
    801745    '<a href="'.$url.'" rel="nofollow">'.$val.'</a>';
    802 }
    803 else
    804 {
    805   $infos['INFO_CREATION_DATE'] = l10n('N/A');
    806746}
    807747
     
    837777  }
    838778}
    839 else
    840 {
    841   $infos['INFO_DIMENSIONS'] = l10n('N/A');
    842 }
    843779
    844780// filesize
     
    848784    sprintf(l10n('%d Kb'), $picture['current']['filesize']);
    849785}
    850 else
    851 {
    852   $infos['INFO_FILESIZE'] = l10n('N/A');
    853 }
    854786
    855787// number of visits
     
    859791$infos['INFO_FILE'] = $picture['current']['file'];
    860792
    861 // tags
     793$template->assign($infos);
     794
     795// related tags
    862796$tags = get_common_tags( array($page['image_id']), -1);
    863797if ( count($tags) )
    864798{
    865   $infos['INFO_TAGS'] = '';
    866   foreach ($tags as $num => $tag)
    867   {
    868     $infos['INFO_TAGS'] .= $num ? ', ' : '';
    869     $infos['INFO_TAGS'] .= '<a href="'
    870       .make_index_url(
     799  foreach ($tags as $tag)
     800  {
     801    $template->append(
     802        'related_tags',
    871803        array(
    872           'tags' => array($tag)
     804          'ID'    => $tag['id'],
     805          'NAME'  => $tag['name'],
     806          'U_TAG' => make_index_url(
     807                      array(
     808                        'tags' => array($tag)
     809                        )
     810                      ),
     811          'U_TAG_IMAGE' => duplicate_picture_url(
     812                      array(
     813                        'section' => 'tags',
     814                        'tags' => array($tag)
     815                        )
     816                    )
    873817          )
    874         )
    875       .'">'.$tag['name'].'</a>';
    876   }
    877   $header_infos['INFO_TAGS'] = strip_tags($infos['INFO_TAGS']);
    878 }
    879 else
    880 {
    881   $infos['INFO_TAGS'] = l10n('N/A');
    882 }
    883 
    884 $template->assign_vars($infos);
     818      );
     819  }
     820}
    885821
    886822// related categories
    887823foreach ($related_categories as $category)
    888824{
    889   $template->assign_block_vars(
    890     'category',
    891     array(
    892       'LINE' => count($related_categories) > 3
     825  $template->append(
     826    'related_categories',
     827      count($related_categories) > 3
    893828        ? get_cat_display_name_cache($category['uppercats'])
    894829        : get_cat_display_name_from_id($category['category_id'])
    895       )
    896     );
    897 }
    898 
    899 // assign tpl picture_nav_buttons
    900 $template->assign_var_from_handle('NAV_BUTTONS', 'nav_buttons');
     830    );
     831}
    901832
    902833// maybe someone wants a special display (call it before page_header so that
     
    907838  $picture['current']
    908839  );
    909 $template->assign_var( 'ELEMENT_CONTENT', $element_content );
     840$template->assign( 'ELEMENT_CONTENT', $element_content );
    910841
    911842// +-----------------------------------------------------------------------+
     
    924855include(PHPWG_ROOT_PATH.'include/page_header.php');
    925856trigger_action('loc_end_picture');
    926 $template->parse('picture');
     857$template->pparse('picture');
    927858include(PHPWG_ROOT_PATH.'include/page_tail.php');
    928859?>
  • trunk/template/yoga/admin/picture_modify.tpl

    r2222 r2227  
    1 <!-- DEV TAG: not smarty migrated -->
    2 <!-- $Id$ -->
    3 <h2>{lang:title_picmod}</h2>
     1{* $Id$ *}
     2<h2>{'title_picmod'|@translate}</h2>
    43
    5 <img src="{TN_SRC}" alt="{lang:thumbnail}" class="thumbnail" />
     4<img src="{$TN_SRC}" alt="{'thumbnail'|@translate}" class="thumbnail" />
    65
    76<ul class="categoryActions">
    8   <!-- BEGIN jumpto -->
    9   <li><a href="{jumpto.URL}" title="{lang:jump to image}"><img src="{themeconf:icon_dir}/category_jump-to.png" class="button" alt="{lang:jump to image}" /></a></li>
    10   <!-- END jumpto -->
    11   <li><a href="{U_SYNC}" title="{lang:synchronize metadata}" {TAG_INPUT_ENABLED}><img src="{themeconf:icon_dir}/sync_metadata.png" class="button" alt="{lang:synchronize}" /></a></li>
     7  {if isset($U_JUMPTO) }
     8  <li><a href="{$U_JUMPTO}" title="{'jump to image'|@translate}"><img src="{$themeconf.icon_dir}/category_jump-to.png" class="button" alt="{'jump to image'|@translate}" /></a></li>
     9  {/if}
     10  <li><a href="{$U_SYNC}" title="{'synchronize metadata'|@translate}" {$TAG_INPUT_ENABLED}><img src="{$themeconf.icon_dir}/sync_metadata.png" class="button" alt="{'synchronize'|@translate}" /></a></li>
    1211</ul>
    1312
    14 <form action="{F_ACTION}" method="post" id="properties">
     13<form action="{$F_ACTION}" method="post" id="properties">
    1514
    1615  <fieldset>
    17     <legend>{lang:Informations}</legend>
     16    <legend>{'Informations'|@translate}</legend>
    1817
    1918    <table>
    2019
    2120      <tr>
    22         <td><strong>{lang:Path}</strong></td>
    23         <td>{PATH}</td>
     21        <td><strong>{'Path'|@translate}</strong></td>
     22        <td>{$PATH}</td>
    2423      </tr>
    2524
    2625      <tr>
    27         <td><strong>{lang:Post date}</strong></td>
    28         <td>{REGISTRATION_DATE}</td>
     26        <td><strong>{'Post date'|@translate}</strong></td>
     27        <td>{$REGISTRATION_DATE}</td>
    2928      </tr>
    3029
    3130      <tr>
    32         <td><strong>{lang:Dimensions}</strong></td>
    33         <td>{DIMENSIONS}</td>
     31        <td><strong>{'Dimensions'|@translate}</strong></td>
     32        <td>{$DIMENSIONS}</td>
    3433      </tr>
    3534
    3635      <tr>
    37         <td><strong>{lang:Filesize}</strong></td>
    38         <td>{FILESIZE}</td>
     36        <td><strong>{'Filesize'|@translate}</strong></td>
     37        <td>{$FILESIZE}</td>
    3938      </tr>
    4039
    41 <!-- BEGIN high -->
     40{if isset($HIGH_FILESIZE) }
    4241      <tr>
    43         <td><strong>{lang:High filesize}</strong></td>
    44         <td>{high.FILESIZE}</td>
     42        <td><strong>{'High filesize'|@translate}</strong></td>
     43        <td>{$HIGH_FILESIZE}</td>
    4544      </tr>
    46 <!-- END high -->
     45{/if}
    4746
    4847      <tr>
    49         <td><strong>{lang:Storage category}</strong></td>
    50         <td>{STORAGE_CATEGORY}</td>
     48        <td><strong>{'Storage category'|@translate}</strong></td>
     49        <td>{$STORAGE_CATEGORY}</td>
    5150      </tr>
    5251
    53       <!-- BEGIN links -->
     52      {if isset($related_categories) }
    5453      <tr>
    55         <td><strong>{lang:Linked categories}</strong></td>
     54        <td><strong>{'Linked categories'|@translate}</strong></td>
    5655        <td>
    5756          <ul>
    58             <!-- BEGIN category -->
    59             <li>{links.category.NAME}</li>
    60             <!-- END category -->
     57            {foreach from=$related_categories item=name}
     58            <li>{$name}</li>
     59            {/foreach}
    6160          </ul>
    6261        </td>
    6362      </tr>
    64       <!-- END links -->
     63      {/if}
    6564
    6665    </table>
     
    6968
    7069  <fieldset>
    71     <legend>{lang:Properties}</legend>
     70    <legend>{'Properties'|@translate}</legend>
    7271
    7372    <table>
    7473
    7574      <tr>
    76         <td><strong>{lang:Name}</strong></td>
    77         <td><input type="text" name="name" value="{NAME}" /></td>
     75        <td><strong>{'Name'|@translate}</strong></td>
     76        <td><input type="text" name="name" value="{$NAME}" /></td>
    7877      </tr>
    7978
    8079      <tr>
    81         <td><strong>{lang:Author}</strong></td>
    82         <td><input type="text" name="author" value="{AUTHOR}" /></td>
     80        <td><strong>{'Author'|@translate}</strong></td>
     81        <td><input type="text" name="author" value="{$AUTHOR}" /></td>
    8382      </tr>
    8483
    8584      <tr>
    86         <td><strong>{lang:Creation date}</strong></td>
     85        <td><strong>{'Creation date'|@translate}</strong></td>
    8786        <td>
    88           <label><input type="radio" name="date_creation_action" value="unset" /> {lang:unset}</label>
    89           <input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {lang:set to}
     87          <label><input type="radio" name="date_creation_action" value="unset" /> {'unset'|@translate}</label>
     88          <input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {'set to'|@translate}
    9089          <select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_day">
    91             <!-- BEGIN date_creation_day -->
    92             <option {date_creation_day.SELECTED} value="{date_creation_day.VALUE}">{date_creation_day.OPTION}</option>
    93             <!-- END date_creation_day -->
     90            <option value="0">--</option>
     91            {section name=day start=1 loop=31}
     92              <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY_VALUE}selected="selected"{/if}>{$smarty.section.day.index}</option>
     93            {/section}
    9494          </select>
    9595          <select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_month">
    96             <!-- BEGIN date_creation_month -->
    97             <option {date_creation_month.SELECTED} value="{date_creation_month.VALUE}">{date_creation_month.OPTION}</option>
    98             <!-- END date_creation_month -->
     96            {html_options options=$month_list selected=$DATE_CREATION_MONTH_VALUE}
    9997          </select>
    10098          <input onmousedown="document.getElementById('date_creation_action_set').checked = true;"
     
    103101                 size="4"
    104102                 maxlength="4"
    105                  value="{DATE_CREATION_YEAR_VALUE}" />
     103                 value="{$DATE_CREATION_YEAR_VALUE}" />
    106104        </td>
    107105      </tr>
    108106
    109107      <tr>
    110         <td><strong>{lang:Tags}</strong></td>
    111         <td>{TAG_SELECTION}</td>
     108        <td><strong>{'Tags'|@translate}</strong></td>
     109        <td>{$TAG_SELECTION}</td>
    112110      </tr>
    113111
    114112
    115113      <tr>
    116         <td><strong>{lang:Description}</strong></td>
    117         <td><textarea name="description" class="description">{DESCRIPTION}</textarea></td>
     114        <td><strong>{'Description'|@translate}</strong></td>
     115        <td><textarea name="description" class="description">{$DESCRIPTION}</textarea></td>
    118116      </tr>
    119117
    120118        <tr>
    121                 <td><strong>{lang:Minimum privacy level}</strong></td>
     119                <td><strong>{'Minimum privacy level'|@translate}</strong></td>
    122120                <td>
    123121                        <select name="level" size="1">
    124                         <!-- BEGIN level_option -->
    125                         <option {level_option.SELECTED} value="{level_option.VALUE}">{level_option.CONTENT} ({level_option.VALUE})</option>
    126                         <!-- END level_option -->
     122                        {html_options options=$level_options selected=$level_options_selected}
    127123                        </select>
    128124          </td>
     
    132128
    133129    <p style="text-align:center;">
    134       <input class="submit" type="submit" value="{lang:Submit}" name="submit" {TAG_INPUT_ENABLED}/>
    135       <input class="submit" type="reset" value="{lang:Reset}" name="reset" />
     130      <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
     131      <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
    136132    </p>
    137133
     
    140136</form>
    141137
    142 <form id="associations" method="post" action="{F_ACTION}#associations">
     138<form id="associations" method="post" action="{$F_ACTION}#associations">
    143139  <fieldset>
    144     <legend>{lang:Association to categories}</legend>
     140    <legend>{'Association to categories'|@translate}</legend>
    145141
    146142    <table class="doubleSelect">
    147143      <tr>
    148144        <td>
    149           <h3>{lang:Associated}</h3>
     145          <h3>{'Associated'|@translate}</h3>
    150146          <select class="categoryList" name="cat_associated[]" multiple="multiple" size="30">
    151             <!-- BEGIN associated_option -->
    152             <option {associated_option.SELECTED} value="{associated_option.VALUE}">{associated_option.OPTION}</option>
    153             <!-- END associated_option -->
     147            {html_options options=$associated_options}
    154148          </select>
    155           <p><input class="submit" type="submit" value="&raquo;" name="dissociate" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
     149          <p><input class="submit" type="submit" value="&raquo;" name="dissociate" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
    156150        </td>
    157151
    158152        <td>
    159           <h3>{lang:Dissociated}</h3>
     153          <h3>{'Dissociated'|@translate}</h3>
    160154          <select class="categoryList" name="cat_dissociated[]" multiple="multiple" size="30">
    161             <!-- BEGIN dissociated_option -->
    162             <option {dissociated_option.SELECTED} value="{dissociated_option.VALUE}">{dissociated_option.OPTION}</option>
    163             <!-- END dissociated_option -->
     155            {html_options options=$dissociated_options}
    164156          </select>
    165           <p><input class="submit" type="submit" value="&laquo;" name="associate" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
     157          <p><input class="submit" type="submit" value="&laquo;" name="associate" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
    166158        </td>
    167159      </tr>
     
    171163</form>
    172164
    173 <form id="representation" method="post" action="{F_ACTION}#representation">
     165<form id="representation" method="post" action="{$F_ACTION}#representation">
    174166  <fieldset>
    175     <legend>{lang:Representation of categories}</legend>
     167    <legend>{'Representation of categories'|@translate}</legend>
    176168
    177169    <table class="doubleSelect">
    178170      <tr>
    179171        <td>
    180           <h3>{lang:Represents}</h3>
     172          <h3>{'Represents'|@translate}</h3>
    181173          <select class="categoryList" name="cat_elected[]" multiple="multiple" size="30">
    182             <!-- BEGIN elected_option -->
    183             <option {elected_option.SELECTED} value="{elected_option.VALUE}">{elected_option.OPTION}</option>
    184             <!-- END elected_option -->
     174            {html_options options=$elected_options}
    185175          </select>
    186           <p><input class="submit" type="submit" value="&raquo;" name="dismiss" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
     176          <p><input class="submit" type="submit" value="&raquo;" name="dismiss" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
    187177        </td>
    188178
    189179        <td>
    190           <h3>{lang:Does not represent}</h3>
     180          <h3>{'Does not represent'|@translate}</h3>
    191181          <select class="categoryList" name="cat_dismissed[]" multiple="multiple" size="30">
    192             <!-- BEGIN dismissed_option -->
    193             <option {dismissed_option.SELECTED} value="{dismissed_option.VALUE}">{dismissed_option.OPTION}</option>
    194             <!-- END dismissed_option -->
     182            {html_options options=$dismissed_options}
    195183          </select>
    196           <p><input class="submit" type="submit" value="&laquo;" name="elect" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
     184          <p><input class="submit" type="submit" value="&laquo;" name="elect" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
    197185        </td>
    198186      </tr>
  • trunk/template/yoga/footer.tpl

    r2222 r2227  
    1 <!-- DEV TAG: not smarty migrated -->
     1{* $Id$ *}
    22<div id="copyright">
    33 <a name="EoP"></a> <!-- End of Page -->
    4  <!-- BEGIN debug -->
    5  {lang:generation_time} {debug.TIME} ({debug.NB_QUERIES} {lang:sql_queries_in} {debug.SQL_TIME}) -
    6  <!-- END debug -->
     4 {if isset($debug.TIME) }
     5 {'generation_time'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'sql_queries_in'|@translate} {$debug.SQL_TIME}) -
     6 {/if}
    77
    8  <!-- Please, do not remove this copyright. If you really want to,
     8 {* Please, do not remove this copyright. If you really want to,
    99      contact us on http://phpwebgallery.net to find a solution on how
    10       to show the origin of the script...-->
     10      to show the origin of the script...
     11  *}
    1112
    12   {lang:powered_by}
     13  {'powered_by'|@translate}
    1314  <a href="http://www.phpwebgallery.net" class="PWG">
    1415  <span class="P">Php</span><span class="W">Web</span><span class="G">Gallery</span></a>
    15   {VERSION}
    16   <!-- BEGIN contact -->
    17   - {lang:send_mail}
    18   <a href="mailto:{contact.MAIL}?subject={L_TITLE_MAIL}">{lang:Webmaster}</a>
    19   <!-- END contact -->
     16  {$VERSION}
     17  {if isset($CONTACT_MAIL)}
     18  - {'send_mail'|@translate}
     19  <a href="mailto:{$CONTACT_MAIL}?subject={'title_send_mail'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
     20  {/if}
    2021
    2122</div> <!-- copyright -->
    22 <!-- BEGIN footer_element -->
    23 {footer_element.CONTENT}
    24 <!-- END footer_element -->
     23{if isset($footer_elemets)}
     24{foreach from=$footer_elements item=v}
     25{$v}
     26{/foreach}
     27{/if}
    2528</div> <!-- the_page -->
    2629
    27 <!-- BEGIN debug -->
    28   {debug.QUERIES_LIST}
    29 <!-- END debug -->
     30{if isset($debug.QUERIES_LIST)}{$debug.QUERIES_LIST}{/if}
    3031</body>
    3132</html>
  • trunk/template/yoga/picture.tpl

    r2223 r2227  
    1 <!-- DEV TAG: not smarty migrated -->
    2 <!-- BEGIN errors -->
     1{* $Id$ *}
     2{if isset($errors)}
    33<div class="errors">
    4 <ul>
    5   <!-- BEGIN error -->
    6   <li>{errors.error.TEXT}</li>
    7   <!-- END error -->
    8 </ul>
    9 </div>
    10 <!-- END errors -->
    11 <!-- BEGIN infos -->
     4  <ul>
     5    {foreach from=$errors item=error}
     6    <li>{$error}</li>
     7    {/foreach}
     8  </ul>
     9</div>
     10{/if}
     11
     12{if isset($infos)}
    1213<div class="infos">
    13 <ul>
    14   <!-- BEGIN info -->
    15   <li>{infos.info.TEXT}</li>
    16   <!-- END info -->
    17 </ul>
    18 </div>
    19 <!-- END infos -->
     14  <ul>
     15    {foreach from=$infos item=info}
     16    <li>{$info}</li>
     17    {/foreach}
     18  </ul>
     19</div>
     20{/if}
    2021
    2122<div id="imageHeaderBar">
    2223  <div class="browsePath">
    23     <a href="{U_HOME}" rel="home">{lang:home}</a>
    24     {LEVEL_SEPARATOR}{SECTION_TITLE}
    25     {LEVEL_SEPARATOR}{PICTURE_TITLE}
     24    <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
     25    {$LEVEL_SEPARATOR}{$SECTION_TITLE}
     26    {$LEVEL_SEPARATOR}{$current.TITLE}
    2627  </div>
    27   <div class="imageNumber">{PHOTO}</div>
    28   <!-- BEGIN title -->
    29   <h2>{TITLE}</h2>
    30   <!-- END title -->
     28  <div class="imageNumber">{$PHOTO}</div>
     29  {if $SHOW_PICTURE_NAME_ON_TITLE }
     30  <h2>{$current.TITLE}</h2>
     31  {/if}
    3132</div>
    3233
    3334<div id="imageToolBar">
    3435  <div class="randomButtons">
    35     <!-- BEGIN start_slideshow -->
    36       <a href="{start_slideshow.U_SLIDESHOW}" title="{lang:slideshow}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/slideshow.png" class="button" alt="{lang:slideshow}"></a>
    37     <!-- END start_slideshow -->
    38     <!-- BEGIN stop_slideshow -->
    39       <a href="{stop_slideshow.U_SLIDESHOW}" title="{lang:slideshow_stop}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/stop_slideshow.png" class="button" alt="{lang:slideshow_stop}"></a>
    40     <!-- END stop_slideshow -->
    41       <a href="{U_METADATA}" title="{lang:picture_show_metadata}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/metadata.png" class="button" alt="{lang:picture_show_metadata}"></a>
    42     <!-- BEGIN download -->
    43       <a href="{download.U_DOWNLOAD}" title="{lang:download_hint}"><img src="{pwg_root}{themeconf:icon_dir}/save.png" class="button" alt="{lang:download}"></a>
    44     <!-- END download -->
    45       {PLUGIN_PICTURE_ACTIONS}
    46     <!-- BEGIN favorite -->
    47       <a href="{favorite.U_FAVORITE}" title="{favorite.FAVORITE_HINT}"><img src="{favorite.FAVORITE_IMG}" class="button" alt="{favorite.FAVORITE_ALT}"></a>
    48     <!-- END favorite -->
    49     <!-- BEGIN representative -->
    50       <a href="{representative.URL}" title="{lang:set as category representative}"><img src="{pwg_root}{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}"></a>
    51     <!-- END representative -->
    52     <!-- BEGIN admin -->
    53       <a href="{U_ADMIN}" title="{lang:link_info_image}"><img src="{pwg_root}{themeconf:icon_dir}/preferences.png" class="button" alt="{lang:link_info_image}"></a>
    54     <!-- END admin -->
    55     <!-- BEGIN caddie -->
    56       <a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{pwg_root}{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"></a>
    57     <!-- END caddie -->
     36    {if isset($U_SLIDESHOW_START) }
     37      <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/slideshow.png" class="button" alt="{'slideshow'|@translate}"></a>
     38    {/if}
     39    {if isset($U_SLIDESHOW_STOP) }
     40      <a href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}"></a>
     41    {/if}
     42      <a href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="{'picture_show_metadata'|@translate}"></a>
     43    {if isset($current.U_DOWNLOAD) }
     44      <a href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
     45    {/if}
     46    {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
     47    {if isset($favorite) }
     48      <a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="{$favorite.FAVORITE_ALT}"></a>
     49    {/if}
     50    {if !empty($U_SET_AS_REPRESENTATIVE) }
     51      <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
     52    {/if}
     53    {if isset($U_ADMIN) }
     54      <a href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'link_info_image'|@translate}"></a>
     55    {/if}
     56    {if isset($U_CADDIE) }
     57      <a href="{$U_CADDIE}" title="{'add to caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a>
     58    {/if}
    5859  </div>
    59   {NAV_BUTTONS}
     60  {include file=$FILE_PICTURE_NAV_BUTTONS}
    6061</div> <!-- imageToolBar -->
    6162
    6263<div id="theImage">
    63 {ELEMENT_CONTENT}
    64 <!-- BEGIN legend -->
    65 <p>{legend.COMMENT_IMG}</p>
    66 <!-- END legend -->
    67 <!-- BEGIN stop_slideshow -->
     64{$ELEMENT_CONTENT}
     65
     66{if isset($COMMENT_IMG)}
     67<p>{$COMMENT_IMG}</p>
     68{/if}
     69
     70{if isset($U_SLIDESHOW_STOP) }
    6871<p>
    69   [ <a href="{stop_slideshow.U_SLIDESHOW}">{lang:slideshow_stop}</a> ]
     72  [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
    7073</p>
    71 <!-- END stop_slideshow -->
    72 </div>
    73 
    74 <!-- BEGIN previous -->
    75 <a class="navThumb" id="thumbPrev" href="{previous.U_IMG}" title="{lang:previous_page} : {previous.TITLE_IMG}" rel="prev">
    76   <img src="{previous.IMG}" class="thumbLink" id="linkPrev" alt="{previous.TITLE_IMG}">
     74{/if}
     75
     76</div>
     77
     78{if isset($previous) }
     79<a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
     80  <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
    7781</a>
    78 <!-- END previous -->
    79 <!-- BEGIN next -->
    80 <a class="navThumb" id="thumbNext" href="{next.U_IMG}" title="{lang:next_page} : {next.TITLE_IMG}" rel="next">
    81   <img src="{next.IMG}" class="thumbLink" id="linkNext" alt="{next.TITLE_IMG}">
     82{/if}
     83{if isset($next) }
     84<a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
     85  <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
    8286</a>
    83 <!-- END next -->
     87{/if}
    8488
    8589<table class="infoTable" summary="Some info about this picture">
    8690  <tr>
    87     <td class="label">{lang:Author}</td>
    88     <td class="value">{INFO_AUTHOR}</td>
    89   </tr>
    90   <tr>
    91     <td class="label">{lang:Created on}</td>
    92     <td class="value">{INFO_CREATION_DATE}</td>
    93   </tr>
    94   <tr>
    95     <td class="label">{lang:Posted on}</td>
    96     <td class="value">{INFO_POSTED_DATE}</td>
    97   </tr>
    98   <tr>
    99     <td class="label">{lang:Dimensions}</td>
    100     <td class="value">{INFO_DIMENSIONS}</td>
    101   </tr>
    102   <tr>
    103     <td class="label">{lang:File}</td>
    104     <td class="value">{INFO_FILE}</td>
    105   </tr>
    106   <tr>
    107     <td class="label">{lang:Filesize}</td>
    108     <td class="value">{INFO_FILESIZE}</td>
    109   </tr>
    110   <tr>
    111     <td class="label">{lang:Tags}</td>
    112     <td class="value">{INFO_TAGS}</td>
    113   </tr>
    114   <tr>
    115     <td class="label">{lang:Categories}</td>
     91    <td class="label">{'Author'|@translate}</td>
     92    <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
     93  </tr>
     94  <tr>
     95    <td class="label">{'Created on'|@translate}</td>
     96    <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
     97  </tr>
     98  <tr>
     99    <td class="label">{'Posted on'|@translate}</td>
     100    <td class="value">{$INFO_POSTED_DATE}</td>
     101  </tr>
     102  <tr>
     103    <td class="label">{'Dimensions'|@translate}</td>
     104    <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
     105  </tr>
     106  <tr>
     107    <td class="label">{'File'|@translate}</td>
     108    <td class="value">{$INFO_FILE}</td>
     109  </tr>
     110  <tr>
     111    <td class="label">{'Filesize'|@translate}</td>
     112    <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
     113  </tr>
     114  <tr>
     115    <td class="label">{'Tags'|@translate}</td>
    116116    <td class="value">
     117      {if isset($related_tags)}
     118        {foreach from=$related_tags item=tag name=tag_loop}
     119        {if !$smarty.foreach.tag_loop.first}, {/if}
     120        <a href="{$tag.U_TAG}">{$tag.NAME}</a>
     121        {/foreach}
     122      {/if}
     123    </td>
     124  </tr>
     125  <tr>
     126    <td class="label">{'Categories'|@translate}</td>
     127    <td class="value">
     128      {if isset($related_categories)}
    117129      <ul>
    118         <!-- BEGIN category -->
    119         <li>{category.LINE}</li>
    120         <!-- END category -->
     130        {foreach from=$related_categories item=cat}
     131        <li>{$cat}</li>
     132        {/foreach}
    121133      </ul>
     134      {/if}
    122135    </td>
    123136  </tr>
    124137  <tr>
    125     <td class="label">{lang:Visits}</td>
    126     <td class="value">{INFO_VISITS}</td>
    127   </tr>
    128   <!-- BEGIN info_rate -->
    129   <tr>
    130     <td class="label">{lang:Average rate}</td>
    131     <td class="value">{info_rate.CONTENT}</td>
    132   </tr>
    133   <!-- END info_rate -->
     138    <td class="label">{'Visits'|@translate}</td>
     139    <td class="value">{$INFO_VISITS}</td>
     140  </tr>
     141  {if isset($rate_summary) }
     142  <tr>
     143    <td class="label">{'Average rate'|@translate}</td>
     144    <td class="value">
     145    {if $rate_summary.count}
     146      {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
     147      {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
     148    {else}
     149      {'no_rate'|@translate}
     150    {/if}
     151    </td>
     152  </tr>
     153  {/if}
    134154</table>
    135155
    136 <!-- BEGIN metadata -->
     156{if isset($metadata)}
    137157<table class="infoTable" summary="Some more (technical) info about this picture">
    138   <!-- BEGIN headline -->
    139   <tr>
    140     <th colspan="2">{metadata.headline.TITLE}</th>
    141   </tr>
    142   <!-- END headline -->
    143   <!-- BEGIN line -->
    144   <tr>
    145     <td class="label">{metadata.line.KEY}</td>
    146     <td class="value">{metadata.line.VALUE}</td>
    147   </tr>
    148   <!-- END line -->
     158{foreach from=$metadata item=meta}
     159  <tr>
     160    <th colspan="2">{$meta.TITLE}</th>
     161  </tr>
     162  {foreach from=$meta.lines item=value key=label}
     163  <tr>
     164    <td class="label">{$label}</td>
     165    <td class="value">{$value}</td>
     166  </tr>
     167  {/foreach}
     168{/foreach}
    149169</table>
    150 <!-- END metadata -->
    151 
    152 <!-- BEGIN rate -->
    153 <form action="{rate.F_ACTION}" method="post" id="rateForm">
    154 <div>{rate.SENTENCE} :
    155 <!-- BEGIN rate_option -->
    156 {rate.rate_option.SEPARATOR}
    157 <!-- BEGIN my_rate -->
    158 <input type="button" name="rate" value="{rate.rate_option.OPTION}" class="rateButtonSelected" />
    159 <!-- END my_rate -->
    160 <!-- BEGIN not_my_rate -->
    161 <input type="submit" name="rate" value="{rate.rate_option.OPTION}" class="rateButton" />
    162 <!-- END not_my_rate -->
    163 <!-- END rate_option -->
    164 <script type="text/javascript" src="{pwg_root}{themeconf:template_dir}/rating.js"></script>
     170{/if}
     171
     172{if isset($rating)}
     173<form action="{$rating.F_ACTION}" method="post" id="rateForm">
     174<div>
     175{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}
     176:
     177{foreach from=$rating.marks item=mark name=rate_loop}
     178{if !$smarty.foreach.rate_loop.first} | {/if}
     179{if $mark==$rating.USER_RATE}
     180  <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" />
     181{else}
     182  <input type="submit" name="rate" value="{$mark}" class="rateButton" />
     183{/if}
     184{/foreach}
     185<script type="text/javascript" src="{$ROOT_URL}{$themeconf.template_dir}/rating.js"></script>
    165186</div>
    166187</form>
    167 <!-- END rate -->
     188{/if}
    168189
    169190<hr class="separation">
    170191
    171 <!-- BEGIN comments -->
     192{if isset($COMMENT_COUNT)}
    172193<div id="comments">
    173   <h2>[{comments.NB_COMMENT}] {lang:comments_title}</h2>
    174 
    175   <div class="navigationBar">{comments.NAV_BAR}</div>
    176 
    177   <!-- BEGIN comment -->
     194  <h2>[{$COMMENT_COUNT}] {'comments_title'|@translate}</h2>
     195
     196  <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
     197
     198  {if isset($comments)}
     199  {foreach from=$comments item=comment}
    178200  <div class="comment">
    179     <!-- BEGIN delete -->
     201    {if isset($comment.U_DELETE)}
    180202    <p class="userCommentDelete">
    181     <a href="{comments.comment.delete.U_COMMENT_DELETE}" title="{lang:comments_del}">
    182       <img src="{pwg_root}{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{lang:delete}]"/>
     203    <a href="{$comment.U_DELETE}" title="{'comments_del'|@translate}">
     204      <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{'delete'|@translate}]"/>
    183205    </a>
    184206    </p>
    185     <!-- END delete -->
    186     <p class="commentInfo"><span class="author">{comments.comment.COMMENT_AUTHOR}</span> - {comments.comment.COMMENT_DATE}</p>
    187     <blockquote>{comments.comment.COMMENT}</blockquote>
     207    {/if}
     208    <p class="commentInfo"><span class="author">{$comment.AUTHOR}</span> - {$comment.DATE}</p>
     209    <blockquote>{$comment.CONTENT}</blockquote>
    188210  </div>
    189   <!-- END comment -->
    190 
    191   <!-- BEGIN add_comment -->
    192   <form  method="post" action="{U_ADD_COMMENT}" class="filter" id="addComment">
     211  {/foreach}
     212  {/if}
     213
     214  {if isset($comment_add)}
     215  <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
    193216    <fieldset>
    194       <legend>{lang:comments_add}</legend>
    195       <!-- BEGIN author_field -->
    196       <label>{lang:upload_author}<input type="text" name="author"></label>
    197       <!-- END author_field -->
    198       <label>{lang:comment}<textarea name="content" rows="5" cols="80">{comments.add_comment.CONTENT}</textarea></label>
    199       <input type="hidden" name="key" value="{comments.add_comment.KEY}" />
    200       <input class="submit" type="submit" value="{lang:submit}">
     217      <legend>{'comments_add'|@translate}</legend>
     218      {if $comment_add.SHOW_AUTHOR}
     219      <label>{'upload_author'|@translate}<input type="text" name="author"></label>
     220      {/if}
     221      <label>{'comment'|@translate}<textarea name="content" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
     222      <input type="hidden" name="key" value="{$comment_add.KEY}" />
     223      <input class="submit" type="submit" value="{'submit'|@translate}">
    201224    </fieldset>
    202225  </form>
    203   <!-- END add_comment -->
    204 
    205 </div>
    206 <!-- END comments -->
    207 
     226  {/if}
     227
     228</div>
     229{/if} {*comments*}
     230
  • trunk/template/yoga/picture_nav_buttons.tpl

    r2224 r2227  
    1 <!-- DEV TAG: not smarty migrated -->
    2 <!-- $Id$ -->
     1{* $Id$ *}
    32  <div class="navButtons">
    4   <!-- BEGIN last -->
    5     <a class="navButton prev" href="{last.U_IMG}" title="{lang:last_page} : {last.TITLE_IMG}" rel="last"><img src="{pwg_root}{themeconf:icon_dir}/last.png" class="button" alt="{lang:last_page}"></a>
    6   <!-- END last -->
    7   <!-- BEGIN last_unactive -->
    8     <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/last_unactive.png" class="button" alt=""></a>
    9   <!-- END last_unactive -->
    10   <!-- BEGIN next -->
    11     <a class="navButton next" href="{next.U_IMG}" title="{lang:next_page} : {next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="{lang:next_page}"></a>
    12   <!-- END next -->
    13   <!-- BEGIN next_unactive -->
    14     <a class="navButton next"><img src="{pwg_root}{themeconf:icon_dir}/right_unactive.png" class="button" alt=""></a>
    15   <!-- END next_unactive -->
    16   <!-- BEGIN start_play -->
    17     <a class="navButton play" href="{start_play.U_IMG}" title="{lang:start_play}" rel="play"><img src="{pwg_root}{themeconf:icon_dir}/play.png" class="button" alt="{lang:start_play}"></a>
    18   <!-- END start_play -->
    19   <!-- BEGIN stop_play -->
    20     <a class="navButton play" href="{stop_play.U_IMG}" title="{lang:stop_play}" rel="play"><img src="{pwg_root}{themeconf:icon_dir}/pause.png" class="button" alt="{lang:stop_play}"></a>
    21   <!-- END stop_play -->
    22   <!-- BEGIN up -->
    23     <a class="navButton up" href="{up.U_URL}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{lang:thumbnails}"></a>
    24   <!-- END up -->
    25   <!-- BEGIN previous -->
    26     <a class="navButton prev" href="{previous.U_IMG}" title="{lang:previous_page} : {previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="{lang:previous_page}"></a>
    27   <!-- END previous -->
    28   <!-- BEGIN previous_unactive -->
    29     <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/left_unactive.png" class="button" alt=""></a>
    30   <!-- END previous_unactive -->
    31   <!-- BEGIN first -->
    32     <a class="navButton prev" href="{first.U_IMG}" title="{lang:first_page} : {first.TITLE_IMG}" rel="first"><img src="{pwg_root}{themeconf:icon_dir}/first.png" class="button" alt="{lang:first_page}"></a>
    33   <!-- END first -->
    34   <!-- BEGIN first_unactive -->
    35     <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/first_unactive.png" class="button" alt=""></a>
    36   <!-- END first_unactive -->
    37   <!-- BEGIN start_repeat -->
    38     <a class="navButton repeat" href="{start_repeat.U_IMG}" title="{lang:start_repeat}" rel="repeat"><img src="{pwg_root}{themeconf:icon_dir}/start_repeat.png" class="button" alt="{lang:start_repeat}"></a>
    39   <!-- END start_repeat -->
    40   <!-- BEGIN stop_repeat -->
    41     <a class="navButton repeat" href="{stop_repeat.U_IMG}" title="{lang:stop_repeat}" rel="repeat"><img src="{pwg_root}{themeconf:icon_dir}/stop_repeat.png" class="button" alt="{lang:stop_repeat}"></a>
    42   <!-- END stop_repeat -->
    43   <!-- BEGIN inc_period -->
    44     <a class="navButton inc_period" href="{inc_period.U_IMG}" title="{lang:inc_period}" rel="repeat"><img src="{pwg_root}{themeconf:icon_dir}/inc_period.png" class="button" alt="{lang:inc_period}"></a>
    45   <!-- END inc_period -->
    46   <!-- BEGIN inc_period_unactive -->
    47     <a class="navButton inc_period" <img src="{pwg_root}{themeconf:icon_dir}/inc_period_unactive.png" class="button" alt=""></a>
    48   <!-- END inc_period_unactive -->
    49   <!-- BEGIN dec_period -->
    50     <a class="navButton dec_period" href="{dec_period.U_IMG}" title="{lang:dec_period}" rel="repeat"><img src="{pwg_root}{themeconf:icon_dir}/dec_period.png" class="button" alt="{lang:dec_period}"></a>
    51   <!-- END dec_period -->
    52   <!-- BEGIN dec_period_unactive -->
    53     <a class="navButton dec_period" <img src="{pwg_root}{themeconf:icon_dir}/dec_period_unactive.png" class="button" alt=""></a>
    54   <!-- END dec_period_unactive -->
     3 
     4{if isset($last)}
     5        <a class="navButton prev" href="{$last.U_IMG}" title="{'last_page'|@translate} : {$last.TITLE}" rel="last"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last.png" class="button" alt="{'last_page'|@translate}"></a>
     6{else}
     7        <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_unactive.png" class="button" alt=""></a>
     8{/if}
     9 
     10{if isset($next)}
     11        <a class="navButton next" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" class="button" alt="{'next_page'|@translate}"></a>
     12{else}
     13        <a class="navButton next"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right_unactive.png" class="button" alt=""></a>
     14{/if}
     15
     16{if isset($slideshow.U_START_PLAY)}
     17        <a class="navButton play" href="{$slideshow.U_START_PLAY}" title="{'start_play'|@translate}" rel="play"><img src="{$ROOT_URL}{$themeconf.icon_dir}/play.png" class="button" alt="{'start_play'|@translate}"></a>
     18{/if}
     19
     20{if isset($slideshow.U_STOP_PLAY)}
     21        <a class="navButton play" href="{$slideshow.U_STOP_PLAY}" title="{'stop_play'|@translate}" rel="play"><img src="{$ROOT_URL}{$themeconf.icon_dir}/pause.png" class="button" alt="{'stop_play'|@translate}"></a>
     22{/if}
     23
     24{if isset($U_UP) and !isset($slideshow)}
     25        <a class="navButton up" href="{$U_UP}" title="{'thumbnails'|@translate}" rel="up"><img src="{$ROOT_URL}{$themeconf.icon_dir}/up.png" class="button" alt="{'thumbnails'|@translate}"></a>
     26{/if}
     27 
     28{if isset($previous)}
     29        <a class="navButton prev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" class="button" alt="{'previous_page'|@translate}"></a>
     30{else}
     31        <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_unactive.png" class="button" alt=""></a>
     32{/if}
     33 
     34{if isset($first)}
     35        <a class="navButton prev" href="{$first.U_IMG}" title="{'first_page'|@translate} : {$first.TITLE}" rel="first"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first.png" class="button" alt="{'first_page'|@translate}"></a>
     36{else}
     37        <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first_unactive.png" class="button" alt=""></a>
     38{/if}
     39
     40
     41{if isset($slideshow.U_START_REPEAT)}
     42        <a class="navButton repeat" href="{$slideshow.U_START_REPEAT}" title="{'start_repeat'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_repeat.png" class="button" alt="{'start_repeat'|@translate}"></a>
     43{/if}
     44
     45{if isset($slideshow.U_STOP_REPEAT)}
     46        <a class="navButton repeat" href="{$slideshow.U_STOP_REPEAT}" title="{'stop_repeat'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_repeat.png" class="button" alt="{'stop_repeat'|@translate}"></a>
     47{/if}
     48
     49{if isset($slideshow)}
     50{if isset($slideshow.U_INC_PERIOD)}
     51        <a class="navButton inc_period" href="{$slideshow.U_INC_PERIOD}" title="{'inc_period'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period.png" class="button" alt="{'inc_period'|@translate}"></a>
     52{else}
     53        <a class="navButton inc_period"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period_unactive.png" class="button" alt=""></a>
     54{/if}
     55
     56{if isset($slideshow.U_DEC_PERIOD)}
     57        <a class="navButton dec_period" href="{$slideshow.U_DEC_PERIOD}" title="{'dec_period'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period.png" class="button" alt="{'dec_period'|@translate}"></a>
     58{else}
     59        <a class="navButton dec_period"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period_unactive.png" class="button" alt=""></a>
     60{/if}
     61{/if}
     62
    5563  </div>
    5664
    5765<script type="text/javascript">
     66{literal}
    5867function keyboardNavigation(e)
    5968{
    60   if(!e) var e=window.event;
    61   if (e.altKey) return true;
    62   var target = e.target || e.srcElement;
    63   if (target && target.type) return true; //an input editable element
    64   var keyCode=e.keyCode || e.which;
    65   var docElem = document.documentElement;
    66   switch(keyCode) {
    67 <!-- BEGIN next -->
    68     case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){window.location="{next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
    69 <!-- END next -->
    70 <!-- BEGIN previous -->
    71     case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ window.location="{previous.U_IMG}".replace("&amp;","&"); return false; } break;
    72 <!-- END previous -->
    73 <!-- BEGIN first -->
    74     /*Home*/case 36: if (e.ctrlKey){window.location="{first.U_IMG}".replace("&amp;","&"); return false; } break;
    75 <!-- END first -->
    76 <!-- BEGIN last -->
    77     /*End*/case 35: if (e.ctrlKey){window.location="{last.U_IMG}".replace("&amp;","&"); return false; } break;
    78 <!-- END last -->
    79 <!-- BEGIN up -->
    80     /*Up*/case 38: if (e.ctrlKey){window.location="{up.U_UP}".replace("&amp;","&"); return false; } break;
    81 <!-- END up -->
    82 <!-- BEGIN start_play -->
    83     /*Pause*/case 32: {window.location="{start_play.U_IMG}".replace("&amp;","&"); return false; } break;
    84 <!-- END start_play -->
    85 <!-- BEGIN stop_play -->
    86     /*Play*/case 32: {window.location="{stop_play.U_IMG}".replace("&amp;","&"); return false; } break;
    87 <!-- END stop_play -->
     69        if(!e) var e=window.event;
     70        if (e.altKey) return true;
     71        var target = e.target || e.srcElement;
     72        if (target && target.type) return true; //an input editable element
     73        var keyCode=e.keyCode || e.which;
     74        var docElem = document.documentElement;
     75        switch(keyCode) {
     76{/literal}
     77{if isset($next)}
     78        case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
     79{/if}
     80{if isset($previous)}
     81        case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     82{/if}
     83{if isset($first)}
     84        /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     85{/if}
     86{if isset($last)}
     87        /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     88{/if}
     89{if isset($U_UP) and !isset($slideshow)}
     90    /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     91{/if}
     92
     93{if isset($slideshow.U_START_PLAY)}
     94    /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     95{/if}
     96{if isset($slideshow.U_STOP_PLAY)}
     97    /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     98{/if}
    8899  }
    89100  return true;
  • trunk/template/yoga/slideshow.tpl

    r2222 r2227  
    1 <!-- DEV TAG: not smarty migrated -->
    2 <!-- $Id$ -->
     1{* $Id$ *}
    32<div id="imageHeaderBar">
    43  <div class="browsePath">
    5     <!-- BEGIN stop_slideshow -->
    6     [ <a href="{stop_slideshow.U_SLIDESHOW}">{lang:slideshow_stop}</a> ]
    7     <!-- END stop_slideshow -->
     4    {if isset($U_SLIDESHOW_STOP) }
     5    [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
     6    {/if}
    87  </div>
    9   <div class="imageNumber">{PHOTO}</div>
    10   <!-- BEGIN title -->
    11   <h2 class="showtitle">{TITLE}</h2>
    12   <!-- END title -->
     8  <div class="imageNumber">{$PHOTO}</div>
     9  {if $SHOW_PICTURE_NAME_ON_TITLE }
     10  <h2 class="showtitle">{$current.TITLE}</h2>
     11  {/if}
    1312</div>
    1413
    1514<div id="imageToolBar">
    16   {NAV_BUTTONS}
     15  {include file=$FILE_PICTURE_NAV_BUTTONS}
    1716</div>
    1817
    1918<div id="theImage">
    20   {ELEMENT_CONTENT}
    21   <!-- BEGIN legend -->
    22   <p class="showlegend">{legend.COMMENT_IMG}</p>
    23   <!-- END legend -->
     19  {$ELEMENT_CONTENT}
     20  {if isset($COMMENT_IMG)}
     21  <p class="showlegend">{$COMMENT_IMG}</p>
     22  {/if}
    2423</div>
Note: See TracChangeset for help on using the changeset viewer.