From 00ac0f8d3e45c4fa8b25c646c2b162742038849a Mon Sep 17 00:00:00 2001 From: gweltas Date: Sun, 18 Jan 2004 02:13:02 +0000 Subject: Conformity with the XHTML 1.0 transitional standard Creation of the following files : - template/default/header.php and template/default/footer.php to ensure a common standard - default.css to be CSS valid Obsolescence of the following files : - template/default/theme/conf.php - template/default/style.inc.php Custom galleries should reflect those changes. git-svn-id: http://piwigo.org/svn/branches/release-1_3@290 68402e56-0260-453c-a942-63ccdbb3a9ee --- category.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'category.php') diff --git a/category.php b/category.php index 6a5ad4481..78b98e7bb 100644 --- a/category.php +++ b/category.php @@ -16,10 +16,6 @@ * the Free Software Foundation; * * * ***************************************************************************/ -// determine the initial instant to indicate the generation time of this page -$t1 = explode( ' ', microtime() ); -$t2 = explode( '.', $t1[0] ); -$t2 = $t1[1].'.'.$t2[1]; //----------------------------------------------------------- personnal include include_once( './include/init.inc.php' ); //---------------------------------------------------------------------- logout @@ -102,26 +98,33 @@ if ( isset( $_GET['num'] ) $page['plain_structure'] = get_user_plain_structure(); $page['structure'] = create_user_structure( '' ); $page['structure'] = update_structure( $page['structure'] ); + //----------------------------------------------------- template initialization -$vtp = new VTemplate; + +// +// Start output of page +// +$title = $page['title']; +include('include/page_header.php'); + $handle = $vtp->Open( './template/'.$user['template'].'/category.vtp' ); initialize_template(); $tpl = array( 'categories','hint_category','sub-cat','images_available','total', 'title_menu','nb_image_category','send_mail','title_send_mail', - 'generation_time','connected_user','recent_image','days','generation_time', + 'connected_user','recent_image','days', 'favorite_cat_hint','favorite_cat','stats','most_visited_cat_hint', 'most_visited_cat','recent_cat','recent_cat_hint','upload_picture', 'comments' ); templatize_array( $tpl, 'lang', $handle ); -$tpl = array( 'mail_webmaster','webmaster','top_number','version','site_url' ); +$tpl = array( 'mail_webmaster','webmaster','top_number'); templatize_array( $tpl, 'conf', $handle ); $tpl = array( 'short_period','long_period','lien_collapsed', 'username' ); templatize_array( $tpl, 'user', $handle ); -$tpl = array( 'title','navigation_bar','cat_comment','cat_nb_images' ); +$tpl = array( 'navigation_bar','cat_comment','cat_nb_images' ); templatize_array( $tpl, 'page', $handle ); // special global template vars @@ -404,7 +407,7 @@ elseif ( ( isset( $page['cat'] ) $thumbnail_title = $lang['hint_category']; $url_link = './category.php?cat='.$subcat_id; - if ( !in_array( $page['cat'], $page['tab_expand'] ) ) + if ( isset($page['cat'])&& !in_array( $page['cat'], $page['tab_expand'] ) ) { array_push( $page['tab_expand'], $page['cat'] ); $page['expand'] = implode( ',', $page['tab_expand'] ); @@ -487,10 +490,9 @@ if ( isset ( $page['cat'] ) ) //------------------------------------------------------------ log informations pwg_log( 'category', $page['title'] ); mysql_close(); -//------------------------------------------------------------- generation time -$time = get_elapsed_time( $t2, get_moment() ); -$vtp->setGlobalVar( $handle, 'time', $time ); //----------------------------------------------------------- html code display $code = $vtp->Display( $handle, 0 ); echo $code; + +include('include/page_tail.php'); ?> \ No newline at end of file -- cgit v1.2.3