From 07abd206ce999247d0f34ed46c94cdc0023ff2cf Mon Sep 17 00:00:00 2001 From: patdenice Date: Mon, 3 Mar 2008 17:49:52 +0000 Subject: Register goes smarty. Correction in profile.php (forgotten assign_var) git-svn-id: http://piwigo.org/svn/trunk@2247 68402e56-0260-453c-a942-63ccdbb3a9ee --- profile.php | 2 +- register.php | 10 +++------- template/yoga/register.tpl | 38 +++++++++++++++++++------------------- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/profile.php b/profile.php index 3cd387e22..a74ca42de 100644 --- a/profile.php +++ b/profile.php @@ -54,7 +54,7 @@ if (!defined('PHPWG_ROOT_PATH')) make_index_url(), // for redirect $userdata ); - $template->assign_var('U_HOME', make_index_url() ); + $template->assign('U_HOME', make_index_url()); // +-----------------------------------------------------------------------+ // | errors display | diff --git a/register.php b/register.php index 5eb1d5b5d..fc9122bd3 100644 --- a/register.php +++ b/register.php @@ -75,7 +75,7 @@ $page['body_id'] = 'theRegisterPage'; include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->set_filenames( array('register'=>'register.tpl') ); -$template->assign_vars(array( +$template->assign(array( 'U_HOME' => make_index_url(), 'F_ACTION' => 'register.php', @@ -84,13 +84,9 @@ $template->assign_vars(array( )); //-------------------------------------------------------------- errors display -if ( sizeof( $errors ) != 0 ) +if (count($errors) != 0) { - $template->assign_block_vars('errors',array()); - for ( $i = 0; $i < sizeof( $errors ); $i++ ) - { - $template->assign_block_vars('errors.error',array('ERROR'=>$errors[$i])); - } + $template->assign('errors', $errors); } $template->parse('register'); diff --git a/template/yoga/register.tpl b/template/yoga/register.tpl index 724c85b3e..1bce58afd 100644 --- a/template/yoga/register.tpl +++ b/template/yoga/register.tpl @@ -1,62 +1,62 @@ - +{* $Id$ *}
    -
  • {lang:home}
  • +
  • {'home'|@translate}
-

{lang:Registration}

+

{'Registration'|@translate}

- +{if isset($errors)}
    - -
  • {errors.error.ERROR}
  • - + {foreach from=$errors item=error} +
  • {$error}
  • + {/foreach}
- +{/if} -
+
- {lang:Enter your personnal informations} + {'Enter your personnal informations'|@translate}
  • - + - +
  • - +
  • - +
  • - + - - ({lang:useful when password forgotten}) + + ({'useful when password forgotten'|@translate})

- - + +

-- cgit v1.2.3