From 9e993f2d21e9cf7bd44a7c676af567be550dca90 Mon Sep 17 00:00:00 2001 From: gweltas Date: Thu, 26 Feb 2004 18:33:45 +0000 Subject: New default template - User side git-svn-id: http://piwigo.org/svn/trunk@375 68402e56-0260-453c-a942-63ccdbb3a9ee --- template/default/htmlfunctions.inc.php | 107 ++++++--------------------------- 1 file changed, 18 insertions(+), 89 deletions(-) (limited to 'template/default/htmlfunctions.inc.php') diff --git a/template/default/htmlfunctions.inc.php b/template/default/htmlfunctions.inc.php index 9528efd80..c47ca2f1e 100644 --- a/template/default/htmlfunctions.inc.php +++ b/template/default/htmlfunctions.inc.php @@ -27,23 +27,27 @@ function get_icon( $date_comparaison ) { - global $user, $conf; + global $user, $conf, $lang; $difference = time() - $date_comparaison; $jours = 24*60*60; $output = ''; + $title = $lang['recent_image'].' '; if ( $difference < $user['long_period'] * $jours ) { $icon_url = './template/'.$user['template'].'/theme/'; if ( $difference < $user['short_period'] * $jours ) { $icon_url.= 'new_short.gif'; + $title .= $user['short_period']; } else { $icon_url.= 'new_long.gif'; + $title .= $user['long_period']; } + $title .= ' '.$lang['days']; $size = getimagesize( $icon_url ); - $output = ''; } return $output; @@ -105,7 +109,7 @@ function create_navigation_bar( $url, $nb_element, $start, function get_frame_start() { - return ' - - - + + + - - + - + - - - - + + + +
'; + '; } function get_frame_end() @@ -133,12 +137,12 @@ function get_frame_end() $size_08 = getimagesize( $path.'08.gif' ); return '
'; } @@ -153,81 +157,6 @@ function initialize_template() 'T_END' => get_frame_end() ) ); - - - global $vtp, $handle; - if (isset($handle)) - { - $vtp->setGlobalVar( $handle, 'frame_start', get_frame_start() ); - $vtp->setGlobalVar( $handle, 'frame_begin', get_frame_begin() ); - $vtp->setGlobalVar( $handle, 'frame_end', get_frame_end() ); - } -} - -function display_category( $category, $indent ) -{ - global $user,$lang,$template, $vtp, $handle; - - $style=''; - $url = './category.php?cat='.$category['id']; - $url.= '&expand='.$category['expand_string']; - $name = $category['name']; - if ( $name == '' ) $name = str_replace( '_', ' ', $category['dir'] ); - if ( $category['id_uppercat'] == '' ) - { - $style = 'font-weight:bold;'; - } - - $template->assign_block_vars('category', array( - 'LINK_NAME' => $name, - 'INDENT' => $indent, - 'NB_SUBCATS'=>$category['nb_sub_categories'], - 'TOTAL_CAT'=>$category['nb_images'], - 'CAT_ICON'=>get_icon($category['date_last']), - - 'T_NAME'=>$style, - 'U_LINK' => add_session_id($url))); - - if ( $user['expand'] or $category['nb_sub_categories'] == 0 ) - { - $template->assign_block_vars('category.bulletnolink', array('BULLET_IMAGE' => $user['lien_collapsed'])); - } - else - { - $url = './category.php'; - if (isset($page['cat'])) - { - $url .='?cat='.$page['cat']; - $url.= '&expand='.$category['expand_string']; - } - else if ($category['expand_string']<>'') - { - $url.= '?expand='.$category['expand_string']; - } - - if ( $category['expanded'] ) - { - $img=$user['lien_expanded']; - } - else - { - $img=$user['lien_collapsed']; - } - - $template->assign_block_vars('category.bulletlink', array( - 'BULLET_IMAGE' => $img, - 'U_BULLET_LINK'=> add_session_id($url) - )); - } - - // recursive call - if ( $category['expanded'] ) - { - foreach ( $category['subcats'] as $subcat ) { - $template->assign_block_vars('category.subcat', array()); - display_category( $subcat, $indent.str_repeat( ' ', 2 )); - } - } } function make_jumpbox($value, $selected, $usekeys=false) @@ -259,4 +188,4 @@ function make_radio($name, $value, $selected, $usekeys=false) } return $boxstring; } -?> \ No newline at end of file +?> -- cgit v1.2.3