From 65753539220ba870b738866c425c89d73753c727 Mon Sep 17 00:00:00 2001 From: gweltas Date: Sat, 7 Feb 2004 11:50:26 +0000 Subject: Template modification Split of the french language file git-svn-id: http://piwigo.org/svn/trunk@351 68402e56-0260-453c-a942-63ccdbb3a9ee --- template/default/about.tpl | 21 ++++++ template/default/about.vtp | 21 ------ template/default/category.tpl | 112 ++++++++++++++++++++++++++++++ template/default/category.vtp | 98 -------------------------- template/default/footer.htm | 1 - template/default/footer.tpl | 9 +++ template/default/footer.vtp | 8 --- template/default/header.htm | 1 - template/default/header.tpl | 12 ++++ template/default/header.vtp | 13 ---- template/default/htmlfunctions.inc.php | 121 ++++++++++++++------------------- 11 files changed, 206 insertions(+), 211 deletions(-) create mode 100644 template/default/about.tpl delete mode 100644 template/default/about.vtp create mode 100644 template/default/category.tpl delete mode 100644 template/default/category.vtp delete mode 100644 template/default/footer.htm create mode 100644 template/default/footer.tpl delete mode 100644 template/default/footer.vtp delete mode 100644 template/default/header.htm create mode 100644 template/default/header.tpl delete mode 100644 template/default/header.vtp (limited to 'template/default') diff --git a/template/default/about.tpl b/template/default/about.tpl new file mode 100644 index 000000000..a309e3dc2 --- /dev/null +++ b/template/default/about.tpl @@ -0,0 +1,21 @@ + + + + +
+ {F_START}1px{F_BEGIN} +
{PAGE_TITLE}
+ {F_END} +
 
+ {F_START}50%{F_BEGIN} + + {F_END} + +
+ php logo +
+
\ No newline at end of file diff --git a/template/default/about.vtp b/template/default/about.vtp deleted file mode 100644 index 5b416d1b8..000000000 --- a/template/default/about.vtp +++ /dev/null @@ -1,21 +0,0 @@ - - - - -
- {#frame_start}1px{#frame_begin} -
{#about_title}
- {#frame_end} -
 
- {#frame_start}50%{#frame_begin} - - {#frame_end} - -
- php logo -
-
\ No newline at end of file diff --git a/template/default/category.tpl b/template/default/category.tpl new file mode 100644 index 000000000..7feb34da3 --- /dev/null +++ b/template/default/category.tpl @@ -0,0 +1,112 @@ + + + + + +
+ {F_START}100%{F_BEGIN} + + + {F_END} +
 
+ {F_START}100%{F_BEGIN} +
{L_SUMMARY}
+ + {F_END} +
+ + + + + + + + + + +
+ {F_START}1%{F_BEGIN} +
{TITLE}
+ {F_END} +
 
+ + + + + + + + + +
+ + {thumbnails.line.thumbnail.IMAGE_ALT} +
+ {thumbnails.line.thumbnail.IMAGE_NAME}
+ {thumbnails.line.thumbnail.IMAGE_TS} + +
{thumbnails.line.thumbnail.NB_COMMENTS} {L_COMMENTS} + +
+ +
+ + + + + +
{cat_infos.comment.COMMENTS}
+ +
+ {L_NB_IMG} "{cat_infos.CAT_NAME}" : {cat_infos.NB_IMG_CAT} +
+ +
+ {F_START}1%{F_BEGIN} +
+ {L_USER} {USERNAME}
+ {L_RECENT_IMG} {S_SHORT_PERIOD} {L_DAYS} + {T_SHORT}
+ {L_RECENT_IMAGE} {S_LONG_PERIOD} {L_DAYS} + {T_LONG}
+ {L_SEND_MAIL} {S_WEBMASTER} +
+ {F_END} +
+
\ No newline at end of file diff --git a/template/default/category.vtp b/template/default/category.vtp deleted file mode 100644 index bab094d54..000000000 --- a/template/default/category.vtp +++ /dev/null @@ -1,98 +0,0 @@ - - - - - -
- {#frame_start}100%{#frame_begin} - - - {#frame_end} -
 
- {#frame_start}100%{#frame_begin} -
{#title_menu}
- - {#frame_end} -
- - - - - - - - - - -
- {#frame_start}1%{#frame_begin} -
{#cat_title}
- {#frame_end} -
 
- - - - - - - - - -
- - {#alt} -
- {#name} - {#icon} - -
{#nb} {#comments} - -
- -
- - - - - -
{#cat_comment}
- -
- {#nb_image_category} "{#cat_name}" : {#cat_nb_images} -
- -
- {#frame_start}1%{#frame_begin} -
- {#connected_user} {#username}
- {#recent_image} {#short_period} {#days} - {#icon_short}
- {#recent_image} {#long_period} {#days} - {#icon_long}
- {#send_mail} {#webmaster} -
- {#frame_end} -
-
\ No newline at end of file diff --git a/template/default/footer.htm b/template/default/footer.htm deleted file mode 100644 index 501782eac..000000000 --- a/template/default/footer.htm +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/template/default/footer.tpl b/template/default/footer.tpl new file mode 100644 index 000000000..f62f6e1f1 --- /dev/null +++ b/template/default/footer.tpl @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/template/default/footer.vtp b/template/default/footer.vtp deleted file mode 100644 index 1cf62a5d5..000000000 --- a/template/default/footer.vtp +++ /dev/null @@ -1,8 +0,0 @@ - - - - {#footer} - - \ No newline at end of file diff --git a/template/default/header.htm b/template/default/header.htm deleted file mode 100644 index 962fe8b58..000000000 --- a/template/default/header.htm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/template/default/header.tpl b/template/default/header.tpl new file mode 100644 index 000000000..b3bb96501 --- /dev/null +++ b/template/default/header.tpl @@ -0,0 +1,12 @@ + + + + + + + + +{PAGE_TITLE} + + + diff --git a/template/default/header.vtp b/template/default/header.vtp deleted file mode 100644 index e97197576..000000000 --- a/template/default/header.vtp +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - -{#title} - - - -{#header} diff --git a/template/default/htmlfunctions.inc.php b/template/default/htmlfunctions.inc.php index ad52bfc13..a3365b4a5 100644 --- a/template/default/htmlfunctions.inc.php +++ b/template/default/htmlfunctions.inc.php @@ -17,10 +17,8 @@ * * ***************************************************************************/ -//include( PREFIX_INCLUDE.'./template/'.$user['template'].'/theme/conf.php' ); $user['lien_expanded']='./template/'.$user['template'].'/theme/expanded.gif'; $user['lien_collapsed']='./template/'.$user['template'].'/theme/collapsed.gif'; -//include_once( PREFIX_INCLUDE.'./template/'.$user['template'].'/style.inc.php'); function get_icon( $date_comparaison ) { @@ -104,22 +102,6 @@ function get_frame_start() { return ' - - - -
'; -} - -function get_frame_end() -{ - return ' -
'; -} -*/ function get_frame_begin() { @@ -158,86 +140,87 @@ function get_frame_end() function initialize_template() { - global $vtp, $handle, $user, $lang; + global $template, $user, $lang; + + $template->assign_vars(array( + 'F_START' => get_frame_start(), + 'F_BEGIN' => get_frame_begin(), + 'F_END' => get_frame_end() + ) + ); + - // $vtp->setGlobalVar( $handle, 'charset', $lang['charset'] ); - //$vtp->setGlobalVar( $handle, 'style', $user['style'] ); + 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() ); - //$vtp->setVarF( $handle, 'header', - // './template/'.$user['template'].'/header.htm' ); - //$vtp->setVarF( $handle, 'footer', - // './template/'.$user['template'].'/footer.htm' ); + } } -function display_category( $category, $indent, $handle ) +function display_category( $category, $indent ) { - global $user,$lang,$vtp; + 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))); - $vtp->addSession( $handle, 'category' ); - $vtp->setVar( $handle, 'category.indent', $indent ); if ( $user['expand'] or $category['nb_sub_categories'] == 0 ) { - $vtp->addSession( $handle, 'bullet_wo_link' ); - $vtp->setVar( $handle, 'bullet_wo_link.bullet_url', - $user['lien_collapsed'] ); - $vtp->closeSession( $handle, 'bullet_wo_link' ); + $template->assign_block_vars('category.bulletnolink', array('BULLET_IMAGE' => $user['lien_collapsed'])); } else { - $vtp->addSession( $handle, 'bullet_w_link' ); - $url = './category.php'; - if (isset($page['cat'])) + $url = './category.php'; + if (isset($page['cat'])) { - $url .='?cat='.$page['cat']; - $url.= '&expand='.$category['expand_string']; + $url .='?cat='.$page['cat']; + $url.= '&expand='.$category['expand_string']; } else if ($category['expand_string']<>'') { - $url.= '?expand='.$category['expand_string']; + $url.= '?expand='.$category['expand_string']; } - $vtp->setVar( $handle, 'bullet_w_link.bullet_link', add_session_id($url) ); - if ( $category['expanded'] ) + + if ( $category['expanded'] ) { - $vtp->setVar( $handle, 'bullet_w_link.bullet_url', - $user['lien_expanded'] ); + $img=$user['lien_expanded']; } else { - $vtp->setVar( $handle, 'bullet_w_link.bullet_url', - $user['lien_collapsed'] ); + $img=$user['lien_collapsed']; } - $vtp->closeSession( $handle, 'bullet_w_link' ); - } - - $url = './category.php?cat='.$category['id']; - $url.= '&expand='.$category['expand_string']; - $vtp->setVar( $handle, 'category.link_url', add_session_id( $url ) ); - - $name = $category['name']; - if ( $name == '' ) $name = str_replace( '_', ' ', $category['dir'] ); - $vtp->setVar( $handle, 'category.link_name', $name ); - - if ( $category['id_uppercat'] == '' ) - { - $vtp->setVar( $handle, 'category.name_style', 'font-weight:bold;' ); - } - if ( $category['nb_sub_categories'] > 0 ) - { - $vtp->addSession( $handle, 'subcat' ); - $vtp->setVar( $handle,'subcat.nb_subcats',$category['nb_sub_categories'] ); - $vtp->closeSession( $handle, 'subcat' ); + + $template->assign_block_vars('category.bulletlink', array( + 'BULLET_IMAGE' => $img, + 'U_BULLET_LINK'=> add_session_id($url) + )); } - $vtp->setVar( $handle, 'category.total_cat', $category['nb_images'] ); - $vtp->setVar( $handle, 'category.cat_icon',get_icon($category['date_last'])); - $vtp->closeSession( $handle, 'category' ); // recursive call if ( $category['expanded'] ) { foreach ( $category['subcats'] as $subcat ) { - display_category( $subcat, $indent.str_repeat( ' ', 2 ), $handle ); + $template->assign_block_vars('category.subcat', array()); + display_category( $subcat, $indent.str_repeat( ' ', 2 )); } } } -- cgit v1.2.3