aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--about.php20
-rw-r--r--admin/advanced_feature.php17
-rw-r--r--admin/cat_list.php63
-rw-r--r--admin/cat_modify.php264
-rw-r--r--admin/cat_move.php26
-rw-r--r--admin/cat_options.php53
-rw-r--r--admin/cat_perm.php95
-rw-r--r--admin/include/functions_tabsheet.inc.php36
-rw-r--r--admin/permalinks.php17
-rw-r--r--admin/rating.php81
-rw-r--r--comments.php113
-rw-r--r--identification.php26
-rw-r--r--include/functions_category.inc.php24
-rw-r--r--password.php47
-rw-r--r--plugins/admin_multi_view/controller.php25
-rw-r--r--plugins/admin_multi_view/is_admin.inc.php2
-rw-r--r--popuphelp.php8
-rw-r--r--search.php52
-rw-r--r--search_rules.php110
-rw-r--r--tags.php14
-rw-r--r--template/yoga/about.tpl16
-rw-r--r--template/yoga/admin/advanced_feature.tpl15
-rw-r--r--template/yoga/admin/cat_list.tpl82
-rw-r--r--template/yoga/admin/cat_modify.tpl207
-rw-r--r--template/yoga/admin/cat_move.tpl29
-rw-r--r--template/yoga/admin/cat_options.tpl17
-rw-r--r--template/yoga/admin/cat_perm.tpl66
-rw-r--r--template/yoga/admin/permalinks.tpl72
-rwxr-xr-xtemplate/yoga/admin/rating.tpl72
-rw-r--r--template/yoga/admin/tabsheet.tpl11
-rw-r--r--template/yoga/comments.tpl86
-rw-r--r--template/yoga/identification.tpl53
-rw-r--r--template/yoga/notification.tpl12
-rw-r--r--template/yoga/password.tpl37
-rw-r--r--template/yoga/picture.tpl2
-rw-r--r--template/yoga/popuphelp.tpl6
-rw-r--r--template/yoga/search.tpl106
-rw-r--r--template/yoga/search_rules.tpl61
-rw-r--r--template/yoga/tags.tpl16
39 files changed, 826 insertions, 1233 deletions
diff --git a/about.php b/about.php
index 7b55c3354..60897a971 100644
--- a/about.php
+++ b/about.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -61,21 +61,13 @@ $template->set_filenames(
);
if ( isset($lang['Theme: '.$user['theme']]) )
{
- $template->assign_block_vars(
- 'theme',
- array(
- 'ABOUT' => l10n('Theme: '.$user['theme']),
- )
- );
+ $template->assign(
+ 'THEME_ABOUT',l10n('Theme: '.$user['theme'])
+ );
}
-$template->assign_vars(
- array(
- 'U_HOME' => make_index_url(),
- )
- );
-$template->assign_var('ABOUT_MESSAGE', load_language('about.html','','',true) );
+$template->assign('ABOUT_MESSAGE', load_language('about.html','','',true) );
-$template->parse('about');
+$template->pparse('about');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>
diff --git a/admin/advanced_feature.php b/admin/advanced_feature.php
index aab295b38..e5104e8a6 100644
--- a/admin/advanced_feature.php
+++ b/admin/advanced_feature.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -89,24 +88,18 @@ $advanced_features =
// | Template init |
// +-----------------------------------------------------------------------+
-$template->set_filenames(array('advanced_feature'=>'admin/advanced_feature.tpl'));
+$template->set_filename('advanced_feature', 'admin/advanced_feature.tpl');
$start_url = get_root_url().'admin.php?page=advanced_feature&action=';
-$template->assign_vars(
+$template->assign(
array
(
'U_HELP' => get_root_url().'popuphelp.php?page=advanced_feature'
));
// advanced_features
-if (count($advanced_features) > 0)
-{
- foreach ($advanced_features as $advanced_feature)
- {
- $template->assign_block_vars('advanced_features.advanced_feature', $advanced_feature);
- }
-}
+$template->assign('advanced_features', $advanced_features);
// +-----------------------------------------------------------------------+
// | Sending html code |
diff --git a/admin/cat_list.php b/admin/cat_list.php
index aac736a21..d1f590257 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -154,7 +154,7 @@ if (isset($_GET['parent_id']))
// +-----------------------------------------------------------------------+
// | template initialization |
// +-----------------------------------------------------------------------+
-$template->set_filenames(array('categories'=>'admin/cat_list.tpl'));
+$template->set_filename('categories', 'admin/cat_list.tpl');
$form_action = PHPWG_ROOT_PATH.'admin.php?page=cat_list';
if (isset($_GET['parent_id']))
@@ -162,20 +162,11 @@ if (isset($_GET['parent_id']))
$form_action.= '&parent_id='.$_GET['parent_id'];
}
-$template->assign_vars(array(
+$template->assign(array(
'CATEGORIES_NAV'=>$navigation,
'F_ACTION'=>$form_action,
-
- 'L_ADD_VIRTUAL'=>l10n('cat_add'),
- 'L_SUBMIT'=>l10n('submit'),
- 'L_STORAGE'=>l10n('storage'),
- 'L_NB_IMG'=>l10n('pictures'),
- 'L_MOVE_UP'=>l10n('up'),
- 'L_EDIT'=>l10n('edit'),
- 'L_DELETE'=>l10n('delete'),
));
-$tpl = array('cat_first','cat_last');
// +-----------------------------------------------------------------------+
// | Categories display |
// +-----------------------------------------------------------------------+
@@ -220,16 +211,11 @@ SELECT id_uppercat, COUNT(*) AS nb_subcats
{
$categories[$row['id_uppercat']]['nb_subcats'] = $row['nb_subcats'];
}
-
- $template->assign_block_vars('categories', array());
}
+$template->assign('categories', array());
foreach ($categories as $category)
{
- // TODO : not used anymore ?
- //$images_folder = PHPWG_ROOT_PATH.'template/';
- //$images_folder.= $user['template'].'/admin/images';
-
$base_url = PHPWG_ROOT_PATH.'admin.php?page=';
$cat_list_url = $base_url.'cat_list';
@@ -239,8 +225,7 @@ foreach ($categories as $category)
$self_url.= '&parent_id='.$_GET['parent_id'];
}
- $template->assign_block_vars(
- 'categories.category',
+ $tpl_cat =
array(
'NAME' => $category['name'],
'ID' => $category['id'],
@@ -254,49 +239,27 @@ foreach ($categories as $category)
'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'],
'U_EDIT' => $base_url.'cat_modify&cat_id='.$category['id'],
- )
+
+ 'IS_VIRTUAL' => empty($category['dir'])
);
if (empty($category['dir']))
{
- $template->assign_block_vars(
- 'categories.category.delete',
- array(
- 'URL'=>$self_url.'&delete='.$category['id']
- )
- );
- $template->assign_block_vars(
- 'categories.category.virtual',
- array(
- 'CLASS' => 'virtual_cat',
- )
- );
+ $tpl_cat['U_DELETE'] = $self_url.'&delete='.$category['id'];
}
if ($category['nb_images'] > 0)
{
- $template->assign_block_vars(
- 'categories.category.elements',
- array(
- 'URL'=>$base_url.'element_set&cat='.$category['id']
- )
- );
+ $tpl_cat['U_MANAGE_ELEMENTS']=
+ $base_url.'element_set&cat='.$category['id'];
}
if ('private' == $category['status'])
{
- $template->assign_block_vars(
- 'categories.category.permissions',
- array(
- 'URL'=>$base_url.'cat_perm&cat='.$category['id']
- )
- );
+ $tpl_cat['U_MANAGE_PERMISSIONS']=
+ $base_url.'cat_perm&cat='.$category['id'];
}
-}
-// Add a link to Page bottom only if needed (10 or more categories)
-if ( isset($category['rank']) and $category['rank'] > 9 )
-{
- $template->assign_block_vars('eop_link', array('ICON'=>'Displayed'));
+ $template->append('categories', $tpl_cat);
}
// +-----------------------------------------------------------------------+
// | sending html code |
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 6f3c4b075..7492633b1 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -43,8 +43,6 @@ if ( !isset( $_GET['cat_id'] ) || !is_numeric( $_GET['cat_id'] ) )
$_GET['cat_id'] = '-1';
}
-$template->set_filenames( array('categories'=>'admin/cat_modify.tpl') );
-
//--------------------------------------------------------- form criteria check
if (isset($_POST['submit']))
{
@@ -208,6 +206,7 @@ foreach (array('comment','dir','site_id', 'id_uppercat') as $nullable)
$category['is_virtual'] = empty($category['dir']) ? true : false;
+
// Navigation path
$url = PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id=';
@@ -217,27 +216,9 @@ $navigation = get_cat_display_name_cache(
);
$form_action = PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id='.$_GET['cat_id'];
-$status = ($category['status']=='public')?'STATUS_PUBLIC':'STATUS_PRIVATE';
-$lock = ($category['visible']=='true')?'UNLOCKED':'LOCKED';
-
-if ($category['commentable'] == 'true')
-{
- $commentable = 'COMMENTABLE_TRUE';
-}
-else
-{
- $commentable = 'COMMENTABLE_FALSE';
-}
-if ($category['uploadable'] == 'true')
-{
- $uploadable = 'UPLOADABLE_TRUE';
-}
-else
-{
- $uploadable = 'UPLOADABLE_FALSE';
-}
//----------------------------------------------------- template initialization
+$template->set_filename( 'categories', 'admin/cat_modify.tpl');
$base_url = PHPWG_ROOT_PATH.'admin.php?page=';
$cat_list_url = $base_url.'cat_list';
@@ -248,35 +229,24 @@ if (!empty($category['id_uppercat']))
$self_url.= '&parent_id='.$category['id_uppercat'];
}
-$template->assign_vars(
+$template->assign(
array(
'CATEGORIES_NAV' => $navigation,
- 'CAT_NAME' => $category['name'],
- 'CAT_COMMENT' => $category['comment'],
+ 'CAT_NAME' => @htmlspecialchars($category['name']),
+ 'CAT_COMMENT' => @htmlspecialchars($category['comment']),
+
+ 'status_values' => array('public','private'),
+ 'false_true' => array('false', 'true'),
+ 'no_yes' => array('no','yes'),
- $status => 'checked="checked"',
- $lock => 'checked="checked"',
- $commentable => 'checked="checked"',
- $uploadable => 'checked="checked"',
+ 'CAT_STATUS' => $category['status'],
+ 'CAT_VISIBLE' => $category['visible'],
+ 'CAT_COMMENTABLE' => $category['commentable'],
+ 'CAT_UPLOADABLE' => $category['uploadable'],
'IMG_ORDER_DEFAULT' => empty($category['image_order']) ?
'checked="checked"' : '',
- 'L_EDIT_NAME' => l10n('name'),
- 'L_STORAGE' => l10n('storage'),
- 'L_REMOTE_SITE' => l10n('remote_site'),
- 'L_EDIT_COMMENT' => l10n('description'),
- 'L_EDIT_STATUS' => l10n('conf_access'),
- 'L_STATUS_PUBLIC' => l10n('public'),
- 'L_STATUS_PRIVATE' => l10n('private'),
- 'L_EDIT_LOCK' => l10n('lock'),
- 'L_EDIT_UPLOADABLE' => l10n('editcat_uploadable'),
- 'L_EDIT_COMMENTABLE' => l10n('comments'),
- 'L_YES' => l10n('yes'),
- 'L_NO' => l10n('no'),
- 'L_SUBMIT' => l10n('submit'),
- 'L_SET_RANDOM_REPRESENTANT'=>l10n('cat_representant'),
-
'U_JUMPTO' => make_index_url(
array(
'category' => $category
@@ -295,33 +265,45 @@ $template->assign_vars(
if ('private' == $category['status'])
{
- $template->assign_block_vars(
- 'permissions',
- array(
- 'URL'=>$base_url.'cat_perm&cat='.$category['id']
- )
+ $template->assign( 'U_MANAGE_PERMISSIONS',
+ $base_url.'cat_perm&cat='.$category['id']
);
}
// manage category elements link
if ($category['nb_images'] > 0)
{
- $template->assign_block_vars(
- 'elements',
+ $template->assign( 'U_MANAGE_ELEMENTS',
+ $base_url.'element_set&cat='.$category['id']
+ );
+}
+
+if ($category['is_virtual'])
+{
+ $template->assign(
array(
- 'URL'=>$base_url.'element_set&cat='.$category['id']
+ 'U_DELETE' => $self_url.'&delete='.$category['id'],
)
);
}
-
-// image order management
-$matches = array();
-if ( !empty( $category['image_order'] ) )
+else
{
- preg_match_all('/([a-z_]+) *(?:(asc|desc)(?:ending)?)? *(?:, *|$)/i',
- $category['image_order'], $matches);
+ $category['cat_full_dir'] = get_complete_dir($_GET['cat_id']);
+ $template->assign(
+ array(
+ 'CAT_FULL_DIR' => preg_replace('/\/$/',
+ '',
+ $category['cat_full_dir'] )
+ )
+ );
+ if (!url_is_remote($category['cat_full_dir']) )
+ {
+ $template->assign('SHOW_UPLOADABLE', true);
+ }
}
+// image order management
+
$sort_fields = array(
'' => '',
'date_creation' => l10n('Creation date'),
@@ -332,49 +314,39 @@ $sort_fields = array(
'id' => 'Id',
);
-for ($i=0; $i<3; $i++) // 3 fields
-{
- $template->assign_block_vars('image_order', array('NUMBER'=>$i+1) );
- foreach ($sort_fields as $sort_field => $name)
- {
- $selected='';
- if ( isset($matches[1][$i]) and $matches[1][$i]==$sort_field )
- {
- $selected='selected="selected"';
- }
- elseif ( empty($sort_field) )
- {
- $selected='selected="selected"';
- }
+$sort_directions = array(
+ 'ASC' => l10n('ascending'),
+ 'DESC' => l10n('descending'),
+ );
- $template->assign_block_vars('image_order.field',
- array(
- 'SELECTED' => $selected,
- 'VALUE' => $sort_field,
- 'OPTION' => $name
- )
- );
- }
+$template->assign( 'image_order_field_options', $sort_fields);
+$template->assign( 'image_order_direction_options', $sort_directions);
- $template->assign_block_vars('image_order.order',
- array(
- 'SELECTED' =>
- ( empty($matches[2][$i]) or strcasecmp($matches[2][$i],'ASC')==0 )
- ? 'selected="selected"' : '',
- 'VALUE' => 'ASC',
- 'OPTION' => 'Ascending'
- )
- );
+$matches = array();
+if ( !empty( $category['image_order'] ) )
+{
+ preg_match_all('/([a-z_]+) *(?:(asc|desc)(?:ending)?)? *(?:, *|$)/i',
+ $category['image_order'], $matches);
+}
- $template->assign_block_vars('image_order.order',
- array(
- 'SELECTED' =>
- ( isset($matches[2][$i]) and strcasecmp($matches[2][$i],'DESC')==0 )
- ? 'selected="selected"' : '',
- 'VALUE' => 'DESC',
- 'OPTION' => 'Descending'
- )
+for ($i=0; $i<3; $i++) // 3 fields
+{
+ $tpl_image_order_select = array(
+ 'ID' => $i+1,
+ 'FIELD' => array(''),
+ 'DIRECTION' => array('ASC'),
);
+
+ if ( isset($matches[1][$i]) )
+ {
+ $tpl_image_order_select['FIELD'] = array($matches[1][$i]);
+ }
+
+ if (isset($matches[2][$i]) and strcasecmp($matches[2][$i],'DESC')==0)
+ {
+ $tpl_image_order_select['DIRECTION'] = array('DESC');
+ }
+ $template->append( 'image_orders', $tpl_image_order_select);
}
@@ -382,7 +354,7 @@ for ($i=0; $i<3; $i++) // 3 fields
if ($category['nb_images'] > 0
or !empty($category['representative_picture_id']))
{
- $template->assign_block_vars('representant', array());
+ $tpl_representant = array();
// picture to display : the identified representant or the generic random
// representant ?
@@ -398,24 +370,15 @@ SELECT id,tn_ext,path
$url = PHPWG_ROOT_PATH.'admin.php?page=picture_modify';
$url.= '&amp;image_id='.$category['representative_picture_id'];
- $template->assign_block_vars(
- 'representant.picture',
+ $tpl_representant['picture'] =
array(
'SRC' => $src,
'URL' => $url
- )
);
}
- else // $category['nb_images'] > 0
- {
- $template->assign_block_vars('representant.random', array());
- }
// can the admin choose to set a new random representant ?
- if ($category['nb_images'] > 0)
- {
- $template->assign_block_vars('representant.set_random', array());
- }
+ $tpl_representant['ALLOW_SET_RANDOM'] = ($category['nb_images']>0) ? true : false;
// can the admin delete the current representant ?
if (
@@ -425,45 +388,17 @@ SELECT id,tn_ext,path
($category['nb_images'] == 0
and !empty($category['representative_picture_id'])))
{
- $template->assign_block_vars('representant.delete_representant', array());
+ $tpl_representant['ALLOW_DELETE'] = true;
}
+ $template->assign('representant', $tpl_representant);
}
-if (!$category['is_virtual'])
-{
- $template->assign_block_vars(
- 'storage',
- array('CATEGORY_DIR'=>preg_replace('/\/$/',
- '',
- get_complete_dir($category['id']))));
-}
-else
+if ($category['is_virtual'])
{
- $template->assign_block_vars(
- 'delete',
- array(
- 'URL'=>$self_url.'&amp;delete='.$category['id']
- )
- );
-
- $template->assign_block_vars('move', array());
-
// the category can be moved in any category but in itself, in any
// sub-category
$unmovables = get_subcat_ids(array($category['id']));
- $blockname = 'move.parent_option';
-
- $template->assign_block_vars(
- $blockname,
- array(
- 'SELECTED'
- => empty($category['id_uppercat']) ? 'selected="selected"' : '',
- 'VALUE'=> 0,
- 'OPTION' => '------------'
- )
- );
-
$query = '
SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
@@ -473,59 +408,33 @@ SELECT id,name,uppercats,global_rank
display_select_cat_wrapper(
$query,
empty($category['id_uppercat']) ? array() : array($category['id_uppercat']),
- $blockname
+ 'move_cat_options'
);
}
-$category['cat_dir'] = get_complete_dir($_GET['cat_id']);
-if (is_numeric($category['site_id']) and url_is_remote($category['cat_dir']) )
-{
- $query = '
-SELECT galleries_url
- FROM '.SITES_TABLE.'
- WHERE id = '.$category['site_id'].'
-;';
- list($galleries_url) = mysql_fetch_array(pwg_query($query));
- $template->assign_block_vars('server', array('SITE_URL' => $galleries_url));
-}
-
-if (!$category['is_virtual'] and !url_is_remote($category['cat_dir']) )
-{
- $template->assign_block_vars('upload' ,array());
-}
-
-$blockname = 'category_option_parent';
-
-$template->assign_block_vars(
- $blockname,
- array(
- 'VALUE'=> 0,
- 'OPTION' => '------------'
- )
- );
+// create virtual in parent and link
$query = '
SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
;';
-
display_select_cat_wrapper(
$query,
array(),
- $blockname
+ 'create_new_parent_options'
);
+
// destination categories
$query = '
SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
WHERE id != '.$category['id'].'
;';
-
display_select_cat_wrapper(
$query,
array(),
- 'category_option_destination'
+ 'category_destination_options'
);
// info by email to an access granted group of category informations
@@ -635,18 +544,9 @@ SELECT
WHERE id IN ('.implode(',', $group_ids).')
ORDER BY name ASC
;';
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_array($result))
- {
- $template->assign_block_vars(
- 'group_mail.group_option',
- array(
- 'VALUE' => $row['id'],
- 'OPTION' => $row['name'],
- )
- );
- }
+ $template->assign('group_mail_options',
+ simple_hash_from_query($query, 'id', 'name')
+ );
}
//----------------------------------------------------------- sending html code
diff --git a/admin/cat_move.php b/admin/cat_move.php
index 1532641d1..72aa6b6c9 100644
--- a/admin/cat_move.php
+++ b/admin/cat_move.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -64,14 +64,9 @@ if (isset($_POST['submit']))
// +-----------------------------------------------------------------------+
// | template initialization |
// +-----------------------------------------------------------------------+
+$template->set_filename('cat_move', 'admin/cat_move.tpl');
-$template->set_filenames(
- array(
- 'cat_move' => 'admin/cat_move.tpl'
- )
- );
-
-$template->assign_vars(
+$template->assign(
array(
'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=cat_move',
'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=cat_move',
@@ -87,21 +82,10 @@ SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
WHERE dir IS NULL
;';
-
display_select_cat_wrapper(
$query,
array(),
- 'category_option_selection'
- );
-
-$blockname = 'category_option_parent';
-
-$template->assign_block_vars(
- $blockname,
- array(
- 'VALUE'=> 0,
- 'OPTION' => '------------'
- )
+ 'category_to_move_options'
);
$query = '
@@ -112,7 +96,7 @@ SELECT id,name,uppercats,global_rank
display_select_cat_wrapper(
$query,
array(),
- $blockname
+ 'category_parent_options'
);
// +-----------------------------------------------------------------------+
diff --git a/admin/cat_options.php b/admin/cat_options.php
index 0a9b93e8f..210427eea 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -149,24 +149,30 @@ $template->set_filenames(
)
);
-$page['section'] = isset($_GET['section']) ? $_GET['section'] : 'upload';
+$page['section'] = isset($_GET['section']) ? $_GET['section'] : 'status';
$base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_options&amp;section=';
-$template->assign_vars(
+$template->assign(
array(
- 'L_SUBMIT'=>l10n('submit'),
- 'L_RESET'=>l10n('reset'),
-
'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_options',
-
'F_ACTION'=>$base_url.$page['section']
)
);
// TabSheet initialization
$opt_link = $link_start.'cat_options&amp;section=';
-$page['tabsheet'] = array
+$tabsheet = array
(
+ 'status' => array
+ (
+ 'caption' => l10n('cat_security'),
+ 'url' => $opt_link.'status'
+ ),
+ 'visible' => array
+ (
+ 'caption' => l10n('lock'),
+ 'url' => $opt_link.'visible'
+ ),
'upload' => array
(
'caption' => l10n('upload'),
@@ -177,31 +183,26 @@ $page['tabsheet'] = array
'caption' => l10n('comments'),
'url' => $opt_link.'comments'
),
- 'visible' => array
- (
- 'caption' => l10n('lock'),
- 'url' => $opt_link.'visible'
- ),
- 'status' => array
- (
- 'caption' => l10n('cat_security'),
- 'url' => $opt_link.'status'
- )
);
if ($conf['allow_random_representative'])
{
- $page['tabsheet']['representative'] =
+ $tabsheet['representative'] =
array
(
'caption' => l10n('Representative'),
'url' => $opt_link.'representative'
);
}
-$page['tabsheet'][$page['section']]['selected'] = true;
+$tabsheet[$page['section']]['selected'] = true;
// Assign tabsheet to template
-template_assign_tabsheet();
+$template->assign(
+ array(
+ 'tabsheet' => $tabsheet,
+ 'TABSHEET_TITLE' => $tabsheet[$page['section']]['caption']
+ )
+ );
// +-----------------------------------------------------------------------+
// | form display |
@@ -236,7 +237,7 @@ SELECT id,name,uppercats,global_rank
AND dir IS NOT NULL
AND site_id = 1
;';
- $template->assign_vars(
+ $template->assign(
array(
'L_SECTION' => l10n('cat_upload_title'),
'L_CAT_OPTIONS_TRUE' => l10n('authorized'),
@@ -257,7 +258,7 @@ SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
WHERE commentable = \'false\'
;';
- $template->assign_vars(
+ $template->assign(
array(
'L_SECTION' => l10n('cat_comments_title'),
'L_CAT_OPTIONS_TRUE' => l10n('authorized'),
@@ -278,7 +279,7 @@ SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
WHERE visible = \'false\'
;';
- $template->assign_vars(
+ $template->assign(
array(
'L_SECTION' => l10n('cat_lock_title'),
'L_CAT_OPTIONS_TRUE' => l10n('unlocked'),
@@ -299,7 +300,7 @@ SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
WHERE status = \'private\'
;';
- $template->assign_vars(
+ $template->assign(
array(
'L_SECTION' => l10n('cat_status_title'),
'L_CAT_OPTIONS_TRUE' => l10n('cat_public'),
@@ -321,7 +322,7 @@ SELECT id,name,uppercats,global_rank
WHERE nb_images != 0
AND representative_picture_id IS NULL
;';
- $template->assign_vars(
+ $template->assign(
array(
'L_SECTION' => l10n('Representative'),
'L_CAT_OPTIONS_TRUE' => l10n('singly represented'),
diff --git a/admin/cat_perm.php b/admin/cat_perm.php
index eb0efa3cd..bca45faa0 100644
--- a/admin/cat_perm.php
+++ b/admin/cat_perm.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -72,12 +72,6 @@ SELECT id
// | form submission |
// +-----------------------------------------------------------------------+
-if (isset($_POST) and false)
-{
- echo '<pre>';
- print_r($_POST);
- echo '</pre>';
-}
if (isset($_POST['deny_groups_submit'])
and isset($_POST['deny_groups'])
@@ -202,7 +196,7 @@ SELECT user_id, cat_id
// | template initialization |
// +-----------------------------------------------------------------------+
-$template->set_filenames(array('cat_perm'=>'admin/cat_perm.tpl'));
+$template->set_filename('cat_perm', 'admin/cat_perm.tpl');
$template->assign_vars(
array(
@@ -230,43 +224,23 @@ SELECT id, name
FROM '.GROUPS_TABLE.'
ORDER BY name ASC
;';
-$result = pwg_query($query);
-
-while ($row = mysql_fetch_array($result))
-{
- $groups[$row['id']] = $row['name'];
-}
+$groups = simple_hash_from_query($query, 'id', 'name');
+$template->assign('all_groups', $groups);
+// groups granted to access the category
$query = '
SELECT group_id
FROM '.GROUP_ACCESS_TABLE.'
WHERE cat_id = '.$page['cat'].'
;';
$group_granted_ids = array_from_query($query, 'group_id');
+$template->assign('group_granted_ids', $group_granted_ids);
-// groups granted to access the category
-foreach ($group_granted_ids as $group_id)
-{
- $template->assign_block_vars(
- 'group_granted',
- array(
- 'NAME'=>$groups[$group_id],
- 'ID'=>$group_id
- )
- );
-}
// groups denied
-foreach (array_diff(array_keys($groups), $group_granted_ids) as $group_id)
-{
- $template->assign_block_vars(
- 'group_denied',
- array(
- 'NAME'=>$groups[$group_id],
- 'ID'=>$group_id
- )
- );
-}
+$template->assign('group_denied_ids',
+ array_diff(array_keys($groups), $group_granted_ids)
+ );
// users...
$users = array();
@@ -276,11 +250,9 @@ SELECT '.$conf['user_fields']['id'].' AS id,
'.$conf['user_fields']['username'].' AS username
FROM '.USERS_TABLE.'
;';
-$result = pwg_query($query);
-while($row = mysql_fetch_array($result))
-{
- $users[$row['id']] = $row['username'];
-}
+$users = simple_hash_from_query($query, 'id', 'username');
+$template->assign('all_users', $users);
+
$query = '
SELECT user_id
@@ -289,16 +261,9 @@ SELECT user_id
;';
$user_granted_direct_ids = array_from_query($query, 'user_id');
-foreach ($user_granted_direct_ids as $user_id)
-{
- $template->assign_block_vars(
- 'user_granted',
- array(
- 'NAME'=>$users[$user_id],
- 'ID'=>$user_id
- )
- );
-}
+$template->assign('user_granted_direct_ids', $user_granted_direct_ids);
+
+
$user_granted_indirect_ids = array();
if (count($group_granted_ids) > 0)
@@ -335,41 +300,27 @@ SELECT user_id, group_id
foreach ($user_granted_indirect_ids as $user_id)
{
- $group = '';
-
foreach ($granted_groups as $group_id => $group_users)
{
if (in_array($user_id, $group_users))
{
- $group = $groups[$group_id];
+ $template->append(
+ 'user_granted_indirects',
+ array(
+ 'USER'=>$users[$user_id],
+ 'GROUP'=>$groups[$group_id]
+ )
+ );
break;
}
}
-
- $template->assign_block_vars(
- 'user_granted_indirect',
- array(
- 'NAME'=>$users[$user_id],
- 'GROUP'=>$group
- )
- );
}
}
$user_denied_ids = array_diff(array_keys($users),
$user_granted_indirect_ids,
$user_granted_direct_ids);
-
-foreach ($user_denied_ids as $user_id)
-{
- $template->assign_block_vars(
- 'user_denied',
- array(
- 'NAME'=>$users[$user_id],
- 'ID'=>$user_id
- )
- );
-}
+$template->assign('user_denied_ids', $user_denied_ids);
// +-----------------------------------------------------------------------+
diff --git a/admin/include/functions_tabsheet.inc.php b/admin/include/functions_tabsheet.inc.php
index e8a5704d7..9bb57322d 100644
--- a/admin/include/functions_tabsheet.inc.php
+++ b/admin/include/functions_tabsheet.inc.php
@@ -41,34 +41,24 @@
function template_assign_tabsheet()
{
global $page, $template;
+//THIS SHOULD BE DEPRECATED ?
+
+ $template->set_filename('tabsheet', 'admin/tabsheet.tpl');
+ $template->assign('tabsheet', $page['tabsheet']);
- if (count($page['tabsheet']) > 0)
+ foreach ($page['tabsheet'] as $tab_name => $tab)
{
- $template->set_filename('tabsheet', 'admin/tabsheet.tpl');
-
- foreach ($page['tabsheet'] as $tab_name => $tab)
+ $is_selected = isset($tab['selected']) and $tab['selected'] === true;
+ if ($is_selected)
{
- $is_selected = isset($tab['selected']) and $tab['selected'] === true;
- $template->assign_block_vars
- (
- 'tab',
- array
- (
- 'CLASSNAME' => ($is_selected ? 'selected_tab' : 'normal_tab'),
- 'URL' => $tab['url'],
- 'CAPTION' => $tab['caption']
- )
- );
-
- if ($is_selected)
- {
- $template->assign_vars(
- array('TABSHEET_TITLE' => '['.$tab['caption'].']'));
- }
+ $template->assign_vars(
+ array('TABSHEET_TITLE' => '['.$tab['caption'].']'));
+ break;
}
-
- $template->assign_var_from_handle('TABSHEET', 'tabsheet');
}
+
+ $template->assign_var_from_handle('TABSHEET', 'tabsheet');
+ $template->clear_assign('tabsheet');
}
?>
diff --git a/admin/permalinks.php b/admin/permalinks.php
index 77becf76f..20a83f246 100644
--- a/admin/permalinks.php
+++ b/admin/permalinks.php
@@ -1,7 +1,7 @@
<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -72,7 +72,7 @@ function parse_sort_variables(
}
if ( isset($template_var) )
{
- $template->assign_var( $template_var.strtoupper($field),
+ $template->assign( $template_var.strtoupper($field),
'<a href="'.$url.$anchor.'" title="'.l10n('Sort order').'">'.$disp.'</a>'
);
}
@@ -146,11 +146,7 @@ if ( $sort_by[0]=='name')
{
usort($categories, 'global_rank_compare');
}
-foreach ($categories as $cat)
-{
- $template->assign_block_vars( 'permalink', $cat );
-}
-
+$template->assign( 'permalinks', $categories );
// --- generate display of old permalinks --------------------------------------
@@ -167,6 +163,7 @@ if ( count($sort_by) )
$query .= ' ORDER BY '.$sort_by[0];
}
$result = pwg_query($query);
+$deleted_permalinks=array();
while ( $row=mysql_fetch_assoc($result) )
{
$row['name'] = get_cat_display_name_cache($row['cat_id']);
@@ -175,10 +172,10 @@ while ( $row=mysql_fetch_assoc($result) )
$url_del_base,
array( 'delete_permanent'=> $row['permalink'] )
);
- $template->assign_block_vars( 'deleted_permalink', $row );
+ $deleted_permalinks[] = $row;
}
-
-$template->assign_var('U_HELP', get_root_url().'popuphelp.php?page=permalinks');
+$template->assign('deleted_permalinks', $deleted_permalinks);
+$template->assign('U_HELP', get_root_url().'popuphelp.php?page=permalinks');
$template->assign_var_from_handle('ADMIN_CONTENT', 'permalinks');
?>
diff --git a/admin/rating.php b/admin/rating.php
index d9cb4eef6..f7a2216ec 100644
--- a/admin/rating.php
+++ b/admin/rating.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -115,28 +114,24 @@ list($nb_images) = mysql_fetch_row(pwg_query($query));
// | template init |
// +-----------------------------------------------------------------------+
-$template->set_filenames(array('rating'=>'admin/rating.tpl'));
+$template->set_filename('rating', 'admin/rating.tpl');
-$template->assign_vars(
+$template->assign(
array(
'NAVBAR' => create_navigation_bar(
PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start','del')),
$nb_images,
$start,
$elements_per_page
- )
- )
- );
-
-
-$template->assign_vars(
- array(
+ ),
'F_ACTION' => PHPWG_ROOT_PATH.'admin.php',
'DISPLAY' => $elements_per_page,
- 'NB_ELEMENTS' => $nb_images
+ 'NB_ELEMENTS' => $nb_images,
)
);
+
+
$available_order_by= array(
array(l10n('Rate date'), 'recently_rated DESC'),
array(l10n('Average rate'), 'average_rate DESC'),
@@ -151,45 +146,23 @@ $available_order_by= array(
for ($i=0; $i<count($available_order_by); $i++)
{
- $template->assign_block_vars(
- 'order_by',
- array(
- 'VALUE' => $i,
- 'CONTENT' => $available_order_by[$i][0],
- 'SELECTED' => $i==$order_by_index ? 'SELECTED' : ''
- )
+ $template->append(
+ 'order_by_options',
+ $available_order_by[$i][0]
);
}
+$template->assign('order_by_options_selected', array($order_by_index) );
+
$user_options = array(
- array(
- 'value' => 'all',
- 'content' => l10n('all'),
- ),
- array(
- 'value' => 'user',
- 'content' => l10n('Users'),
- ),
- array(
- 'value' => 'guest',
- 'content' => l10n('Guests'),
- ),
+ 'all' => l10n('all'),
+ 'user' => l10n('Users'),
+ 'guest' => l10n('Guests'),
);
-foreach ($user_options as $user_option)
-{
- $template->assign_block_vars(
- 'user_option',
- array(
- 'VALUE' => $user_option['value'],
- 'CONTENT' => $user_option['content'],
- 'SELECTED' =>
- (isset($_GET['users']) and $_GET['users'] == $user_option['value'])
- ? 'selected="selected"'
- : '',
- )
- );
-}
+$template->assign('user_options', $user_options );
+$template->assign('user_options_selected', array(@$_GET['users']) );
+
$query = '
SELECT i.id,
@@ -217,6 +190,7 @@ while ($row = mysql_fetch_assoc($result))
array_push($images, $row);
}
+$template->assign( 'images', array() );
foreach ($images as $image)
{
$thumbnail_src = get_thumbnail_url($image);
@@ -231,18 +205,17 @@ ORDER BY date DESC;';
$result = pwg_query($query);
$nb_rates = mysql_num_rows($result);
- $template->assign_block_vars('image',
+ $tpl_image =
array(
'U_THUMB' => $thumbnail_src,
'U_URL' => $image_url,
'AVG_RATE' => $image['average_rate'],
'STD_RATE' => $image['std_rates'],
'SUM_RATE' => $image['sum_rates'],
- 'NB_RATES' => $image['nb_rates'],
- 'NB_RATES_TOTAL' => $nb_rates,
+ 'NB_RATES' => (int)$image['nb_rates'],
+ 'NB_RATES_TOTAL' => (int)$nb_rates,
'FILE' => $image['file'],
- 'NB_RATES_PLUS1' => $nb_rates+1,
- )
+ 'rates' => array()
);
while ($row = mysql_fetch_array($result))
@@ -270,17 +243,17 @@ ORDER BY date DESC;';
$user .= '('.$row['anonymous_id'].')';
}
- $template->assign_block_vars('image.rate',
+ $tpl_image['rates'][] =
array(
'DATE' => format_date($row['date']),
'RATE' => $row['rate'],
'USER' => $user,
'U_DELETE' => $url_del
- )
);
}
+ $template->append( 'images', $tpl_image );
}
-//print_r($template->_tpldata);
+
// +-----------------------------------------------------------------------+
// | sending html code |
// +-----------------------------------------------------------------------+
diff --git a/comments.php b/comments.php
index aabb2f396..45fcc3666 100644
--- a/comments.php
+++ b/comments.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -36,14 +36,14 @@ include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
check_status(ACCESS_GUEST);
$sort_order = array(
- 'descending' => 'DESC',
- 'ascending' => 'ASC'
+ 'DESC' => l10n('descending'),
+ 'ASC' => l10n('ascending')
);
// sort_by : database fields proposed for sorting comments list
$sort_by = array(
- 'date' => 'comment date',
- 'image_id' => 'picture'
+ 'date' => l10n('comment date'),
+ 'image_id' => l10n('picture')
);
// items_number : list of number of items to display per page
@@ -75,11 +75,11 @@ if (isset($_GET['sort_by']))
// order to sort
//
-$page['sort_order'] = $sort_order['descending'];
+$page['sort_order'] = 'DESC';
// if the form was submitted, it overloads default behaviour
if (isset($_GET['sort_order']))
{
- $page['sort_order'] = $sort_order[$_GET['sort_order']];
+ $page['sort_order'] = $_GET['sort_order'];
}
// number of items to display
@@ -176,15 +176,11 @@ $title= l10n('title_comments');
$page['body_id'] = 'theCommentsPage';
$template->set_filenames(array('comments'=>'comments.tpl'));
-$template->assign_vars(
+$template->assign(
array(
- 'L_COMMENT_TITLE' => $title,
-
'F_ACTION'=>PHPWG_ROOT_PATH.'comments.php',
'F_KEYWORD'=>@htmlspecialchars(stripslashes($_GET['keyword'])),
'F_AUTHOR'=>@htmlspecialchars(stripslashes($_GET['author'])),
-
- 'U_HOME' => make_index_url(),
)
);
@@ -193,14 +189,7 @@ $template->assign_vars(
// +-----------------------------------------------------------------------+
// Search in a particular category
-$blockname = 'category';
-
-$template->assign_block_vars(
- $blockname,
- array('SELECTED' => '',
- 'VALUE'=> 0,
- 'OPTION' => '------------'
- ));
+$blockname = 'categories';
$query = '
SELECT id, name, uppercats, global_rank
@@ -218,64 +207,33 @@ SELECT id, name, uppercats, global_rank
display_select_cat_wrapper($query, array(@$_GET['cat']), $blockname, true);
// Filter on recent comments...
-$blockname = 'since_option';
-
+$tpl_var=array();
foreach ($since_options as $id => $option)
{
- $selected = ($id == $page['since']) ? 'selected="selected"' : '';
-
- $template->assign_block_vars(
- $blockname,
- array('SELECTED' => $selected,
- 'VALUE'=> $id,
- 'CONTENT' => $option['label']
- ));
+ $tpl_var[ $id ] = $option['label'];
}
+$template->assign( 'since_options', $tpl_var);
+$template->assign( 'since_options_selected', $page['since']);
// Sort by
-$blockname = 'sort_by_option';
-
-foreach ($sort_by as $key => $value)
-{
- $selected = ($key == $page['sort_by']) ? 'selected="selected"' : '';
-
- $template->assign_block_vars(
- $blockname,
- array('SELECTED' => $selected,
- 'VALUE'=> $key,
- 'CONTENT' => l10n($value)
- ));
-}
+$template->assign( 'sort_by_options', $sort_by);
+$template->assign( 'sort_by_options_selected', $page['sort_by']);
// Sorting order
-$blockname = 'sort_order_option';
+$template->assign( 'sort_order_options', $sort_order);
+$template->assign( 'sort_order_options_selected', $page['sort_order']);
-foreach (array_keys($sort_order) as $option)
-{
- $selected = ($option == $page['sort_order']) ? 'selected="selected"' : '';
-
- $template->assign_block_vars(
- $blockname,
- array('SELECTED' => $selected,
- 'VALUE'=> $option,
- 'CONTENT' => l10n($option)
- ));
-}
// Number of items
$blockname = 'items_number_option';
-
+$tpl_var=array();
foreach ($items_number as $option)
{
- $selected = ($option == $page['items_number']) ? 'selected="selected"' : '';
-
- $template->assign_block_vars(
- $blockname,
- array('SELECTED' => $selected,
- 'VALUE'=> $option,
- 'CONTENT' => is_numeric($option) ? $option : l10n($option)
- ));
+ $tpl_var[ $option ] = is_numeric($option) ? $option : l10n($option);
}
+$template->assign( 'item_number_options', $tpl_var);
+$template->assign( 'item_number_options_selected', $page['items_number']);
+
// +-----------------------------------------------------------------------+
// | navigation bar |
@@ -310,7 +268,7 @@ $navbar = create_navigation_bar($url,
$page['items_number'],
'');
-$template->assign_vars(array('NAVBAR' => $navbar));
+$template->assign('NAVBAR', $navbar);
// +-----------------------------------------------------------------------+
// | last comments display |
@@ -403,8 +361,7 @@ SELECT id, name, permalink, uppercats
$author = l10n('guest');
}
- $template->assign_block_vars(
- 'comment',
+ $tpl_comment =
array(
'U_PICTURE' => $url,
'TN_SRC' => $thumbnail_src,
@@ -412,35 +369,29 @@ SELECT id, name, permalink, uppercats
'AUTHOR' => trigger_event('render_comment_author', $author),
'DATE'=>format_date($comment['date'],'mysql_datetime',true),
'CONTENT'=>trigger_event('render_comment_content',$comment['content']),
- ));
+ );
if ( is_admin() )
{
$url = get_root_url().'comments.php'.get_query_string_diff(array('delete','validate'));
- $template->assign_block_vars(
- 'comment.action_delete',
- array(
- 'U_DELETE' => add_url_params($url,
+ $tpl_comment['U_DELETE'] = add_url_params($url,
array('delete'=>$comment['comment_id'])
- ),
- ));
+ );
+
if ($comment['validated'] != 'true')
{
- $template->assign_block_vars(
- 'comment.action_validate',
- array(
- 'U_VALIDATE' => add_url_params($url,
+ $tpl_comment['U_VALIDATE'] = add_url_params($url,
array('validate'=>$comment['comment_id'])
- ),
- ));
+ );
}
}
+ $template->append('comments', $tpl_comment);
}
}
// +-----------------------------------------------------------------------+
// | html code display |
// +-----------------------------------------------------------------------+
include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->parse('comments');
+$template->pparse('comments');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?> \ No newline at end of file
diff --git a/identification.php b/identification.php
index 434cc06c3..7ac373440 100644
--- a/identification.php
+++ b/identification.php
@@ -70,37 +70,27 @@ include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames( array('identification'=>'identification.tpl') );
-$template->assign_vars(
+$template->assign(
array(
- 'U_REGISTER' => PHPWG_ROOT_PATH.'register.php',
- 'U_LOST_PASSWORD' => PHPWG_ROOT_PATH.'password.php',
- 'U_HOME' => make_index_url(),
+ 'U_LOST_PASSWORD' => get_root_url().'password.php',
'U_REDIRECT' => $redirect_to,
- 'F_LOGIN_ACTION' => PHPWG_ROOT_PATH.'identification.php'
+ 'F_LOGIN_ACTION' => get_root_url().'identification.php',
+ 'authorize_remembering' => $conf['authorize_remembering'],
));
-if ($conf['authorize_remembering'])
-{
- $template->assign_block_vars('remember_me',array());
-}
if ($conf['allow_user_registration'])
{
- $template->assign_block_vars('register',array());
+ $template->assign('U_REGISTER', get_root_url().'register.php' );
}
//-------------------------------------------------------------- errors display
if ( sizeof( $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);
}
-//-------------------------------------------------------------- visit as guest
-$template->assign_block_vars('free_access',array());
+
//----------------------------------------------------------- html code display
-$template->parse('identification');
+$template->pparse('identification');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index a0a42135e..cbbe2fce9 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -278,6 +278,7 @@ function display_select_categories($categories,
{
global $template;
+ // TODO - remove from here after old template removed
foreach ($categories as $category)
{
$selected = '';
@@ -299,13 +300,34 @@ function display_select_categories($categories,
$option.= '- '.$category['name'];
}
- $template->assign_block_vars(
+ $template->_old->assign_block_vars(
$blockname,
array('SELECTED'=>$selected,
'VALUE'=>$category['id'],
'OPTION'=>$option
));
}
+ // TODO - remove until here after old template removed
+ $tpl_cats = array();
+ foreach ($categories as $category)
+ {
+ if ($fullname)
+ {
+ $option = get_cat_display_name_cache($category['uppercats'],
+ null,
+ false);
+ }
+ else
+ {
+ $option = str_repeat('&nbsp;',
+ (3 * substr_count($category['global_rank'], '.')));
+ $option.= '- '.$category['name'];
+ }
+ $tpl_cats[ $category['id'] ] = $option;
+ }
+
+ $template->smarty->assign( $blockname, $tpl_cats);
+ $template->smarty->assign( $blockname.'_selected', $selecteds);
}
function display_select_cat_wrapper($query, $selecteds, $blockname,
diff --git a/password.php b/password.php
index 1ff5dfab6..ec348372e 100644
--- a/password.php
+++ b/password.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -146,54 +146,23 @@ WHERE '
$title = l10n('Forgot your password?');
$page['body_id'] = 'thePasswordPage';
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->set_filenames(array('password'=>'password.tpl'));
-$template->assign_vars(
- array(
- 'U_HOME' => make_index_url(),
+$template->set_filenames(array('password'=>'password.tpl'));
+$template->assign( array(
+ 'F_ACTION'=> get_root_url().'password.php'
)
);
-
// +-----------------------------------------------------------------------+
// | infos & errors display |
// +-----------------------------------------------------------------------+
-
-if (count($page['errors']) != 0)
-{
- $template->assign_block_vars('errors', array());
-
- foreach ($page['errors'] as $error)
- {
- $template->assign_block_vars(
- 'errors.error',
- array(
- 'ERROR' => $error
- )
- );
- }
-}
-
-if (count($page['infos']) != 0)
-{
- $template->assign_block_vars('infos', array());
-
- foreach ($page['infos'] as $info)
- {
- $template->assign_block_vars(
- 'infos.info',
- array(
- 'INFO' => $info
- )
- );
- }
-}
+$template->assign('errors', $page['errors']);
+$template->assign('infos', $page['infos']);
// +-----------------------------------------------------------------------+
// | html code display |
// +-----------------------------------------------------------------------+
-
-$template->parse('password');
+include(PHPWG_ROOT_PATH.'include/page_header.php');
+$template->pparse('password');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>
diff --git a/plugins/admin_multi_view/controller.php b/plugins/admin_multi_view/controller.php
index f8bc37793..f60e43bb9 100644
--- a/plugins/admin_multi_view/controller.php
+++ b/plugins/admin_multi_view/controller.php
@@ -10,6 +10,7 @@ if (!is_admin() or !function_exists('multiview_user_init') )
pwg_unset_session_var( 'multiview_lang' );
pwg_unset_session_var( 'multiview_show_queries' );
pwg_unset_session_var( 'multiview_debug_l10n' );
+ pwg_unset_session_var( 'multiview_debug_template' );
?>
<script type="text/javascript">
@@ -68,6 +69,16 @@ if ( isset($_GET['debug_l10n']) )
$refresh_main = true;
}
+
+if ( isset($_GET['debug_template']) )
+{
+ if ( $_GET['debug_template']>0 )
+ pwg_set_session_var( 'multiview_debug_template', 1 );
+ else
+ pwg_unset_session_var( 'multiview_debug_template' );
+ $refresh_main = true;
+}
+
$my_url = get_root_url().'plugins/'.basename(dirname(__FILE__)).'/'.basename(__FILE__);
$my_template = '';
@@ -109,7 +120,7 @@ if (!$conf['show_queries'])
}
$debug_l10n_html='';
-if (!$conf['show_queries'])
+if (!$conf['debug_l10n'])
{
$debug_l10n_html = '<br/>';
if ( !pwg_get_session_var( 'multiview_debug_l10n', 0 ) )
@@ -117,6 +128,17 @@ if (!$conf['show_queries'])
else
$debug_l10n_html.='<a href="'.$my_url.'?debug_l10n=0">Revert debug language</a>';
}
+
+$debug_template_html='';
+if (!$conf['debug_template'])
+{
+ $debug_template_html = '<br/>';
+ if ( !pwg_get_session_var( 'multiview_debug_template', 0 ) )
+ $debug_template_html.='<a href="'.$my_url.'?debug_template=1">Debug template</a>';
+ else
+ $debug_template_html.='<a href="'.$my_url.'?debug_template=0">Revert debug template</a>';
+}
+
?>
<html>
<head>
@@ -156,6 +178,7 @@ View as:
<?php echo $show_queries_html; ?>
<?php echo $debug_l10n_html; ?>
+<?php echo $debug_template_html; ?>
<script type="text/javascript">
<?php
diff --git a/plugins/admin_multi_view/is_admin.inc.php b/plugins/admin_multi_view/is_admin.inc.php
index b0f1172f9..e94b719ba 100644
--- a/plugins/admin_multi_view/is_admin.inc.php
+++ b/plugins/admin_multi_view/is_admin.inc.php
@@ -23,6 +23,8 @@ if (! defined('MULTIVIEW_CONTROLLER') )
$conf['show_queries'] = true;
if (pwg_get_session_var( 'multiview_debug_l10n', 0 ))
$conf['debug_l10n'] = true;
+ if (pwg_get_session_var( 'multiview_debug_template', 0 ))
+ $conf['debug_template'] = true;
}
add_event_handler('loc_end_page_header', 'multiview_loc_end_page_header');
diff --git a/popuphelp.php b/popuphelp.php
index 4c8ee5895..17a3f2db1 100644
--- a/popuphelp.php
+++ b/popuphelp.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -64,9 +64,9 @@ else
die('Hacking attempt!');
}
-$template->set_filenames(array('popuphelp' => 'popuphelp.tpl'));
+$template->set_filename('popuphelp','popuphelp.tpl');
-$template->assign_vars(
+$template->assign(
array
(
'HELP_CONTENT' => $help_content
@@ -76,7 +76,7 @@ $template->assign_vars(
// | html code display |
// +-----------------------------------------------------------------------+
-$template->parse('popuphelp');
+$template->pparse('popuphelp');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
diff --git a/search.php b/search.php
index 31dea2605..11257faae 100644
--- a/search.php
+++ b/search.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -160,29 +160,28 @@ if (isset($_POST['submit']) and count($errors) == 0)
}
//----------------------------------------------------- template initialization
-// start date
-get_day_list('start_day', @$_POST['start_day']);
-get_month_list('start_month', @$_POST['start_month']);
-// end date
-get_day_list('end_day', @$_POST['end_day']);
-get_month_list('end_month', @$_POST['end_month']);
-
//
// Start output of page
//
$title= l10n('search_title');
$page['body_id'] = 'theSearchPage';
-$template->set_filenames( array('search'=>'search.tpl') );
+$template->set_filename('search' ,'search.tpl' );
+
+$month_list = $lang['month'];
+$month_list[0]='------------';
+ksort($month_list);
-$template->assign_vars(
+$template->assign(
array(
- 'TODAY_DAY' => date('d', time()),
- 'TODAY_MONTH' => date('m', time()),
- 'TODAY_YEAR' => date('Y', time()),
- 'S_SEARCH_ACTION' => 'search.php',
+ 'F_SEARCH_ACTION' => 'search.php',
'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=search',
- 'U_HOME' => make_index_url(),
+
+ 'month_list' => $month_list,
+ 'START_DAY_SELECTED' => @$_POST['start_day'],
+ 'START_MONTH_SELECTED' => @$_POST['start_month'],
+ 'END_DAY_SELECTED' => @$_POST['end_day'],
+ 'END_MONTH_SELECTED' => @$_POST['end_month'],
)
);
@@ -192,16 +191,13 @@ if (count($available_tags) > 0)
{
usort( $available_tags, 'name_compare');
- $template->assign_block_vars('tags', array());
-
- $template->assign_vars(
- array(
- 'TAG_SELECTION' => get_html_tag_selection(
+ $template->assign(
+ 'TAG_SELECTION',
+ get_html_tag_selection(
$available_tags,
'tags',
isset($_POST['tags']) ? $_POST['tags'] : array()
- ),
- )
+ )
);
}
@@ -219,21 +215,15 @@ SELECT name,id,date_last,nb_images,global_rank,uppercats
'WHERE'
).'
;';
-
-$selecteds = array();
-display_select_cat_wrapper($query, $selecteds, 'category_option', false);
+display_select_cat_wrapper($query, array(), 'category_options', false);
//-------------------------------------------------------------- errors display
if (sizeof($errors) != 0)
{
- $template->assign_block_vars('errors',array());
- foreach ($errors as $error)
- {
- $template->assign_block_vars('errors.error',array('ERROR'=>$error));
- }
+ $template->assign('errors', $errors);
}
//------------------------------------------------------------ log informations
include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->parse('search');
+$template->pparse('search');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>
diff --git a/search_rules.php b/search_rules.php
index 3ab6825b1..9423e8943 100644
--- a/search_rules.php
+++ b/search_rules.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -64,16 +64,11 @@ $search = get_search_array($_GET['search_id']);
if (isset($search['q']))
{
- $template->assign_block_vars(
- 'words',
- array(
- 'CONTENT' => $search['q']
- )
- );
+ $template->append( 'search_words', $search['q'] );
}
else
{
- $template->assign_vars(
+ $template->assign(
array(
'INTRODUCTION'
=> 'OR' == $search['mode']
@@ -85,56 +80,38 @@ else
if (isset($search['fields']['allwords']))
{
- $template->assign_block_vars(
- 'words',
- array(
- 'CONTENT' => sprintf(
+ $template->append( 'search_words',
+ sprintf(
l10n('searched words : %s'),
join(', ', $search['fields']['allwords']['words'])
)
- )
- );
+ );
}
if (isset($search['fields']['tags']))
{
- $template->assign_block_vars(
- 'tags',
- array(
- 'LIST_INTRO' => ($search['fields']['tags']['mode'] == 'AND')
- ? l10n('All tags must match')
- : l10n('At least one tag must match')
- )
- );
-
+ $template->assign('SEARCH_TAGS_MODE', $search['fields']['tags']['mode']);
+
$query = '
SELECT name
FROM '.TAGS_TABLE.'
WHERE id IN ('.implode(',', $search['fields']['tags']['words']).')
;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $template->assign_block_vars(
- 'tags.tag',
- array(
- 'NAME' => $row['name'],
- )
- );
- }
+ $template->assign(
+ 'search_tags',
+ array_from_query($query, 'name')
+ );
}
if (isset($search['fields']['author']))
{
- $template->assign_block_vars(
- 'words',
- array(
- 'CONTENT' => sprintf(
+ $template->append(
+ 'search_words',
+ sprintf(
l10n('author(s) : %s'),
join(', ', $search['fields']['author']['words'])
)
- )
- );
+ );
}
if (isset($search['fields']['cat']))
@@ -149,13 +126,6 @@ if (isset($search['fields']['cat']))
$cat_ids = $search['fields']['cat']['words'];
}
- $template->assign_block_vars(
- 'categories',
- array(
- 'LIST_INTRO' => l10n('Categories'),
- )
- );
-
$query = '
SELECT id, uppercats, global_rank
FROM '.CATEGORIES_TABLE.'
@@ -177,15 +147,13 @@ SELECT id, uppercats, global_rank
foreach ($categories as $category)
{
- $template->assign_block_vars(
- 'categories.category',
- array(
- 'NAME' => get_cat_display_name_cache(
+ $template->append(
+ 'search_categories',
+ get_cat_display_name_cache(
$category['uppercats'],
null, // no url on category names
false // no blank replacement
)
- )
);
}
}
@@ -219,23 +187,20 @@ foreach (array('date_available', 'date_creation') as $datefield)
if (isset($search['fields'][ $keys['date'] ]))
{
- $template->assign_block_vars(
- $datefield,
- array(
- 'CONTENT' => sprintf(
+ $template->assign(
+ strtoupper($datefield),
+ sprintf(
l10n($lang_items['date']),
format_date($search['fields'][ $keys['date'] ])
- ),
- )
+ )
);
}
elseif (isset($search['fields'][ $keys['before'] ])
and isset($search['fields'][ $keys['after'] ]))
{
- $template->assign_block_vars(
- $datefield,
- array(
- 'CONTENT' => sprintf(
+ $template->assign(
+ strtoupper($datefield),
+ sprintf(
l10n($lang_items['period']),
format_date($search['fields'][ $keys['after'] ]['date']),
@@ -243,36 +208,31 @@ foreach (array('date_available', 'date_creation') as $datefield)
format_date($search['fields'][ $keys['before'] ]['date']),
inc_exc_str($search['fields'][ $keys['before'] ]['inc'])
- ),
- )
+ )
);
}
elseif (isset($search['fields'][ $keys['before'] ]))
{
- $template->assign_block_vars(
- $datefield,
- array(
- 'CONTENT' => sprintf(
+ $template->assign(
+ strtoupper($datefield),
+ sprintf(
l10n($lang_items['before']),
format_date($search['fields'][ $keys['before'] ]['date']),
inc_exc_str($search['fields'][ $keys['before'] ]['inc'])
- ),
- )
+ )
);
}
elseif (isset($search['fields'][ $keys['after'] ]))
{
- $template->assign_block_vars(
- $datefield,
- array(
- 'CONTENT' => sprintf(
+ $template->assign(
+ strtoupper($datefield),
+ sprintf(
l10n($lang_items['after']),
format_date($search['fields'][ $keys['after'] ]['date']),
inc_exc_str($search['fields'][ $keys['after'] ]['inc'])
)
- )
);
}
}
@@ -281,6 +241,6 @@ foreach (array('date_available', 'date_creation') as $datefield)
// | html code display |
// +-----------------------------------------------------------------------+
-$template->parse('search_rules');
+$template->pparse('search_rules');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?> \ No newline at end of file
diff --git a/tags.php b/tags.php
index 582d9d504..b7a4a570d 100644
--- a/tags.php
+++ b/tags.php
@@ -2,9 +2,8 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
@@ -61,11 +60,6 @@ $title= l10n('Tags');
$page['body_id'] = 'theTagsPage';
$template->set_filenames(array('tags'=>'tags.tpl'));
-$template->assign_vars(
- array(
- 'U_HOME' => make_index_url(),
- )
- );
// +-----------------------------------------------------------------------+
// | tag cloud construction |
@@ -88,8 +82,8 @@ usort($tags, 'name_compare');
// display sorted tags
foreach ($tags as $tag)
{
- $template->assign_block_vars(
- 'tag',
+ $template->append(
+ 'tags',
array(
'URL' => make_index_url(
array(
@@ -105,6 +99,6 @@ foreach ($tags as $tag)
}
include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->parse('tags');
+$template->pparse('tags');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?> \ No newline at end of file
diff --git a/template/yoga/about.tpl b/template/yoga/about.tpl
index c4299972c..398f266f8 100644
--- a/template/yoga/about.tpl
+++ b/template/yoga/about.tpl
@@ -1,19 +1,19 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<div id="content">
<div class="titrePage">
<ul class="categoryActions">
<li>
- <a href="{U_HOME}" title="{lang:return to homepage}">
- <img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/>
+ <a href="{$U_HOME}" title="{'return to homepage'|@translate}">
+ <img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/>
</a>
</li>
</ul>
- <h2>{lang:About}</h2>
+ <h2>{'About'|@translate}</h2>
</div>
<ul>
- {ABOUT_MESSAGE}
- <!-- BEGIN theme -->
- <li>{theme.ABOUT}</li>
- <!-- END theme -->
+ {$ABOUT_MESSAGE}
+ {if isset($THEME_ABOUT) }
+ <li>{$THEME_ABOUT}</li>
+ {/if}
</ul>
</div>
diff --git a/template/yoga/admin/advanced_feature.tpl b/template/yoga/admin/advanced_feature.tpl
index df3cdb0e9..128428ba1 100644
--- a/template/yoga/admin/advanced_feature.tpl
+++ b/template/yoga/admin/advanced_feature.tpl
@@ -1,16 +1,13 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
</ul>
- <h2>{lang:Advanced_features}</h2>
+ <h2>{'Advanced_features'|@translate}</h2>
</div>
<ul>
- <!-- BEGIN advanced_features -->
- <!-- BEGIN advanced_feature -->
- <li><a href="{advanced_features.advanced_feature.URL}" {TAG_INPUT_ENABLED}>{advanced_features.advanced_feature.CAPTION}</a></li>
- <!-- END advanced_feature -->
- <!-- END advanced_features -->
+ {foreach from=$advanced_features item=feature}
+ <li><a href="{$feature.URL}" {$TAG_INPUT_ENABLED}>{$feature.CAPTION}</a></li>
+ {/foreach}
</ul>
diff --git a/template/yoga/admin/cat_list.tpl b/template/yoga/admin/cat_list.tpl
index f80766eee..c7a83f8d7 100644
--- a/template/yoga/admin/cat_list.tpl
+++ b/template/yoga/admin/cat_list.tpl
@@ -1,71 +1,65 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
-<h2>{lang:title_categories}</h2>
+{* $Id$ *}
+<h2>{'title_categories'|@translate}</h2>
-<h3>{CATEGORIES_NAV}</h3>
+<h3>{$CATEGORIES_NAV}</h3>
-<form id="addVirtual" action="{F_ACTION}" method="post">
+<form id="addVirtual" action="{$F_ACTION}" method="post">
<p>
- {L_ADD_VIRTUAL} : <input type="text" name="virtual_name" />
- <input class="submit" type="submit" value="{L_SUBMIT}" name="submitAdd" {TAG_INPUT_ENABLED} />
- <!-- BEGIN eop_link -->
- <a href="#EoP" class="button"><img src="{themeconf:icon_dir}/page_end.png" class="button" alt="{lang:page_end}" /></a>
- <!-- END eop_link -->
+ {'cat_add'|@translate} : <input type="text" name="virtual_name" />
+ <input class="submit" type="submit" value="{'submit'|@translate}" name="submitAdd" {$TAG_INPUT_ENABLED} />
+ {if count($categories)>9 }
+ <a href="#EoP" class="button"><img src="{$themeconf.icon_dir}/page_end.png" class="button" alt="{'page_end'|@translate}" /></a>
+ {/if}
</p>
</form>
-<!-- BEGIN categories -->
-<form id="categoryOrdering" action="{F_ACTION}" method="post">
+{if count($categories) }
+<form id="categoryOrdering" action="{$F_ACTION}" method="post">
<p>
- <input class="submit" name="submitOrder" type="submit" value="{lang:Save order}" {TAG_INPUT_ENABLED} />
- <input class="submit" name="submitOrderAlphaNum" type="submit" value="{lang:Order alphanumerically}" {TAG_INPUT_ENABLED} />
+ <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} />
+ <input class="submit" name="submitOrderAlphaNum" type="submit" value="{'Order alphanumerically'|@translate}" {$TAG_INPUT_ENABLED} />
</p>
<ul class="categoryUl">
- <!-- BEGIN category -->
- <li class="categoryLi
- <!-- BEGIN virtual -->
- {categories.category.virtual.CLASS}
- <!-- END virtual -->
- "> <!-- category {category.ID} -->
-
+ {foreach from=$categories item=category}
+ <li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}">
+ <!-- category {$category.ID} -->
<ul class="categoryActions">
- <li><a href="{categories.category.U_JUMPTO}" title="{lang:jump to category}"><img src="{themeconf:icon_dir}/category_jump-to.png" class="button" alt="{lang:jump to category}" /></a></li>
- <li><a href="{categories.category.U_EDIT}" title="{lang:edit category informations}"><img src="{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
- <!-- BEGIN elements -->
- <li><a href="{categories.category.elements.URL}" title="{lang:manage category elements}"><img src="{themeconf:icon_dir}/category_elements.png" class="button" alt="{lang:elements}" /></a></li>
- <!-- END elements -->
- <li><a href="{categories.category.U_CHILDREN}" title="{lang:manage sub-categories}"><img src="{themeconf:icon_dir}/category_children.png" class="button" alt="{lang:sub-categories}" /></a></li>
- <!-- BEGIN permissions -->
- <li><a href="{categories.category.permissions.URL}" title="{lang:edit category permissions}" ><img src="{themeconf:icon_dir}/category_permissions.png" class="button" alt="{lang:permissions}" /></a></li>
- <!-- END permissions -->
- <!-- BEGIN delete -->
- <li><a href="{categories.category.delete.URL}" title="{lang:delete category}" onclick="return confirm('{lang:Are you sure?}');"><img src="{themeconf:icon_dir}/category_delete.png" class="button" alt="{lang:delete}" /></a></li>
- <!-- END delete -->
+ <li><a href="{$category.U_JUMPTO}" title="{'jump to category'|@translate}"><img src="{$themeconf.icon_dir}/category_jump-to.png" class="button" alt="{'jump to category'|@translate}" /></a></li>
+ <li><a href="{$category.U_EDIT}" title="{'edit category informations'|@translate}"><img src="{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"/></a></li>
+ {if isset($category.U_MANAGE_ELEMENTS) }
+ <li><a href="{$category.U_MANAGE_ELEMENTS}" title="{'manage category elements'|@translate}"><img src="{$themeconf.icon_dir}/category_elements.png" class="button" alt="{'elements'|@translate}" /></a></li>
+ {/if}
+ <li><a href="{$category.U_CHILDREN}" title="{'manage sub-categories'|@translate}"><img src="{$themeconf.icon_dir}/category_children.png" class="button" alt="{'sub-categories'|@translate}" /></a></li>
+ {if isset($category.U_MANAGE_PERMISSIONS) }
+ <li><a href="{$category.U_MANAGE_PERMISSIONS}" title="{'edit category permissions'|@translate}" ><img src="{$themeconf.icon_dir}/category_permissions.png" class="button" alt="{'permissions'|@translate}" /></a></li>
+ {/if}
+ {if isset($category.U_DELETE) }
+ <li><a href="{$category.U_DELETE}" title="{'delete category'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.icon_dir}/category_delete.png" class="button" alt="{'delete'|@translate}" /></a></li>
+ {/if}
</ul>
<p>
- <strong><a href="{categories.category.U_CHILDREN}" title="{lang:manage sub-categories}">{categories.category.NAME}</a></strong>
- <!-- BEGIN virtual -->
- <img src="{themeconf:icon_dir}/virt_category.png" class="button" alt="{lang:virtual_category}" />
- <!-- END virtual -->
+ <strong><a href="{$category.U_CHILDREN}" title="{'manage sub-categories'|@translate}">{$category.NAME}</a></strong>
+ {if $category.IS_VIRTUAL}
+ <img src="{$themeconf.icon_dir}/virt_category.png" class="button" alt="{'virtual_category'|@translate}" />
+ {/if}
</p>
<p>
<label>
- {lang:Position} :
- <input type="text" size="4" name="catOrd[{categories.category.ID}]" maxlength="4" value="{categories.category.RANK}" />
+ {'Position'|@translate} :
+ <input type="text" size="4" name="catOrd[{$category.ID}]" maxlength="4" value="{$category.RANK}" />
</label>
</p>
</li>
- <!-- END category -->
+ {/foreach}
</ul>
<p>
- <input class="submit" name="submitOrder" type="submit" value="{lang:Save order}" {TAG_INPUT_ENABLED} />
- <input class="submit" name="submitOrderAlphaNum" type="submit" value="{lang:Order alphanumerically}" {TAG_INPUT_ENABLED} />
+ <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} />
+ <input class="submit" name="submitOrderAlphaNum" type="submit" value="{'Order alphanumerically'|@translate}" {$TAG_INPUT_ENABLED} />
</p>
</form>
-<!-- END categories -->
-
+{/if}
diff --git a/template/yoga/admin/cat_modify.tpl b/template/yoga/admin/cat_modify.tpl
index 04bce8aa9..dc9c98dc3 100644
--- a/template/yoga/admin/cat_modify.tpl
+++ b/template/yoga/admin/cat_modify.tpl
@@ -1,248 +1,229 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
</ul>
- <h2>{lang:title_edit_cat}</h2>
+ <h2>{'title_edit_cat'|@translate}</h2>
</div>
-<h3>{CATEGORIES_NAV}</h3>
+<h3>{$CATEGORIES_NAV}</h3>
<ul class="categoryActions">
- <li><a href="{U_JUMPTO}" title="{lang:jump to category}"><img src="{themeconf:icon_dir}/category_jump-to.png" class="button" alt="{lang:jump to category}" /></a></li>
- <!-- BEGIN elements -->
- <li><a href="{elements.URL}" title="{lang:manage category elements}"><img src="{themeconf:icon_dir}/category_elements.png" class="button" alt="{lang:elements}" /></a></li>
- <!-- END elements -->
- <li><a href="{U_CHILDREN}" title="{lang:manage sub-categories}"><img src="{themeconf:icon_dir}/category_children.png" class="button" alt="{lang:sub-categories}" /></a></li>
- <!-- BEGIN permissions -->
- <li><a href="{permissions.URL}" title="{lang:edit category permissions}" ><img src="{themeconf:icon_dir}/category_permissions.png" class="button" alt="{lang:permissions}" /></a></li>
- <!-- END permissions -->
- <!-- BEGIN delete -->
- <li><a href="{delete.URL}" title="{lang:delete category}" onclick="return confirm('{lang:Are you sure?}');"><img src="{themeconf:icon_dir}/category_delete.png" class="button" alt="{lang:delete}" /></a></li>
- <!-- END delete -->
+ <li><a href="{$U_JUMPTO}" title="{'jump to category'|@translate}"><img src="{$themeconf.icon_dir}/category_jump-to.png" class="button" alt="{'jump to category'|@translate}" /></a></li>
+ {if isset($U_MANAGE_ELEMENTS) }
+ <li><a href="{$U_MANAGE_ELEMENTS}" title="{'manage category elements'|@translate}"><img src="{$themeconf.icon_dir}/category_elements.png" class="button" alt="{'elements'|@translate}" /></a></li>
+ {/if}
+ <li><a href="{$U_CHILDREN}" title="{'manage sub-categories'|@translate}"><img src="{$themeconf.icon_dir}/category_children.png" class="button" alt="{'sub-categories'|@translate}" /></a></li>
+ {if isset($U_MANAGE_PERMISSIONS) }
+ <li><a href="{$U_MANAGE_PERMISSIONS}" title="{'edit category permissions'|@translate}" ><img src="{$themeconf.icon_dir}/category_permissions.png" class="button" alt="{'permissions'|@translate}" /></a></li>
+ {/if}
+ {if isset($U_DELETE) }
+ <li><a href="{$U_DELETE}" title="{'delete category'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.icon_dir}/category_delete.png" class="button" alt="{'delete'|@translate}" /></a></li>
+ {/if}
</ul>
-<form action="{F_ACTION}" method="POST" id="catModify">
+<form action="{$F_ACTION}" method="POST" id="catModify">
<fieldset>
- <legend>{lang:Informations}</legend>
+ <legend>{'Informations'|@translate}</legend>
<table>
- <!-- BEGIN server -->
- <tr>
- <td><strong>{L_REMOTE_SITE}</strong></td>
- <td>{server.SITE_URL}</td>
- </tr>
- <!-- END server -->
- <!-- BEGIN storage -->
+
+ {if isset($CAT_FULL_DIR) }
<tr>
- <td><strong>{L_STORAGE}</strong></td>
- <td class="row1">{storage.CATEGORY_DIR}</td>
+ <td><strong>{'storage'|@translate}</strong></td>
+ <td class="row1">{$CAT_FULL_DIR}</td>
</tr>
- <!-- END storage -->
+ {/if}
+
<tr>
- <td><strong>{L_EDIT_NAME}</strong></td>
+ <td><strong>{'name'|@translate}</strong></td>
<td>
- <input type="text" name="name" value="{CAT_NAME}" maxlength="60"/>
+ <input type="text" name="name" value="{$CAT_NAME}" maxlength="60"/>
</td>
</tr>
<tr>
- <td><strong>{L_EDIT_COMMENT}</strong></td>
+ <td><strong>{'description'|@translate}</strong></td>
<td>
- <textarea cols="50" rows="5" name="comment" class="description">{CAT_COMMENT}</textarea>
+ <textarea cols="50" rows="5" name="comment" class="description">{$CAT_COMMENT}</textarea>
</td>
</tr>
</table>
</fieldset>
-<!-- BEGIN move -->
+{if isset($move_cat_options) }
<fieldset id="move">
- <legend>{lang:Move}</legend>
- {lang:Parent category}
+ <legend>{'Move'|@translate}</legend>
+ {'Parent category'|@translate}
<select class="categoryDropDown" name="parent">
- <!-- BEGIN parent_option -->
- <option class="{move.parent_option.CLASS}" {move.parent_option.SELECTED} value="{move.parent_option.VALUE}">{move.parent_option.OPTION}</option>
- <!-- END parent_option -->
+ <option value="0">------------</option>
+ {html_options options=$move_cat_options selected=$move_cat_options_selected }
</select>
</fieldset>
-<!-- END move -->
+{/if}
<fieldset id="options">
- <legend>{lang:Options}</legend>
+ <legend>{'Options'|@translate}</legend>
<table>
<tr>
- <td><strong>{L_EDIT_STATUS}</strong>
+ <td><strong>{'conf_access'|@translate}</strong>
<td>
- <input type="radio" name="status" value="public" {STATUS_PUBLIC} />{L_STATUS_PUBLIC}
- <input type="radio" name="status" value="private" {STATUS_PRIVATE} />{L_STATUS_PRIVATE}
+ {html_radios name='status' values=$status_values output=$status_values|translate selected=$CAT_STATUS}
</td>
</tr>
<tr>
- <td><strong>{L_EDIT_LOCK}</strong>
+ <td><strong>{'lock'|@translate}</strong>
<td>
- <input type="radio" name="visible" value="false" {LOCKED} />{L_YES}
- <input type="radio" name="visible" value="true" {UNLOCKED} />{L_NO}
+ {html_radios name='visible' values=$false_true output=$no_yes|translate selected=$CAT_VISIBLE}
</td>
</tr>
<tr>
- <td><strong>{L_EDIT_COMMENTABLE}</strong>
+ <td><strong>{'comments'|@translate}</strong>
<td>
- <input type="radio" name="commentable" value="true" {COMMENTABLE_TRUE} />{L_YES}
- <input type="radio" name="commentable" value="false" {COMMENTABLE_FALSE} />{L_NO}
+ {html_radios name='commentable' values=$false_true output=$no_yes|translate selected=$CAT_COMMENTABLE}
</td>
</tr>
- <!-- BEGIN upload -->
+ {if isset($SHOW_UPLOADABLE) }
<tr>
- <td><strong>{L_EDIT_UPLOADABLE}</strong>
+ <td><strong>{'editcat_uploadable'|@translate}</strong>
<td>
- <input type="radio" name="uploadable" value="true" {UPLOADABLE_TRUE} />{L_YES}
- <input type="radio" name="uploadable" value="false" {UPLOADABLE_FALSE} />{L_NO}
+ {html_radios name='uploadable' values=$false_true output=$no_yes|translate selected=$CAT_UPLOADABLE}
</td>
</tr>
- <!-- END upload -->
+ {/if}
</table>
</fieldset>
<fieldset id="image_order">
- <legend>{lang:Sort order}</legend>
- <input type="checkbox" name="image_order_default" id="image_order_default" {IMG_ORDER_DEFAULT} />
- <label for="image_order_default">{lang:Use default sort order}</label>
+ <legend>{'Sort order'|@translate}</legend>
+ <input type="checkbox" name="image_order_default" id="image_order_default" {$IMG_ORDER_DEFAULT} />
+ <label for="image_order_default">{'Use default sort order'|@translate}</label>
<br/>
<input type="checkbox" name="image_order_subcats" id="image_order_subcats" />
- <label for="image_order_subcats">{lang:Apply to subcategories}</label>
+ <label for="image_order_subcats">{'Apply to subcategories'|@translate}</label>
<br/>
- <!-- BEGIN image_order -->
- <select name="order_field_{image_order.NUMBER}">
- <!-- BEGIN field -->
- <option value="{image_order.field.VALUE}" {image_order.field.SELECTED}>{image_order.field.OPTION}</option>
- <!-- END field -->
+
+ {foreach from=$image_orders item=order}
+ <select name="order_field_{$order.ID}">
+ {html_options options=$image_order_field_options selected=$order.FIELD }}
</select>
- <select name="order_direction_{image_order.NUMBER}">
- <!-- BEGIN order -->
- <option value="{image_order.order.VALUE}" {image_order.order.SELECTED}>{image_order.order.OPTION}</option>
- <!-- END order -->
+ <select name="order_direction_{$order.ID}">
+ {html_options options=$image_order_direction_options selected=$order.DIRECTION }}
</select><br/>
- <!-- END image_order -->
+ {/foreach}
+
</fieldset>
<p style="text-align:center;">
- <input class="submit" type="submit" value="{L_SUBMIT}" name="submit" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{lang:Reset}" name="reset" />
+ <input class="submit" type="submit" value="{'submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
</p>
-<!-- BEGIN representant -->
+{if isset($representant) }
<fieldset id="representant">
- <legend>{lang:Representant}</legend>
+ <legend>{'Representant'|@translate}</legend>
<table>
<tr>
<td align="center">
- <!-- BEGIN picture -->
- <a href="{representant.picture.URL}"><img src="{representant.picture.SRC}" alt="" class="miniature" /></a>
- <!-- END picture -->
-
- <!-- BEGIN random -->
- <img src="{themeconf:icon_dir}/category_representant_random.png" class="button" alt="{lang:Random picture}" class="miniature" />
- <!-- END random -->
+ {if isset($representant.picture) }
+ <a href="{$representant.picture.URL}"><img src="{$representant.picture.SRC}" alt="" class="miniature" /></a>
+ {else}
+ <img src="{$themeconf.icon_dir}/category_representant_random.png" class="button" alt="{'Random picture'|@translate}" class="miniature" />
+ {/if}
</td>
<td>
- <!-- BEGIN set_random -->
- <p><input class="submit" type="submit" name="set_random_representant" value="{L_SET_RANDOM_REPRESENTANT}" {TAG_INPUT_ENABLED}/></p>
- <!-- END set_random -->
+ {if $representant.ALLOW_SET_RANDOM }
+ <p><input class="submit" type="submit" name="set_random_representant" value="{'cat_representant'|@translate}" {$TAG_INPUT_ENABLED}/></p>
+ {/if}
- <!-- BEGIN delete_representant -->
- <p><input class="submit" type="submit" name="delete_representant" value="{lang:Delete Representant}" /></p>
- <!-- END delete_representant -->
+ {if isset($representant.ALLOW_DELETE) }
+ <p><input class="submit" type="submit" name="delete_representant" value="{'Delete Representant'|@translate}" /></p>
+ {/if}
</td>
</tr>
</table>
</fieldset>
-<!-- END representant -->
+{/if}
</form>
-<form action="{F_ACTION}" method="POST" id="links">
+<form action="{$F_ACTION}" method="POST" id="links">
<fieldset id="linkAllNew">
- <legend>{lang:Link all category elements to a new category}</legend>
+ <legend>{'Link all category elements to a new category'|@translate}</legend>
<table>
<tr>
- <td>{lang:Virtual category name}</td>
+ <td>{'Virtual category name'|@translate}</td>
<td><input type="text" name="virtual_name"></td>
</tr>
<tr>
- <td>{lang:Parent category}</td>
+ <td>{'Parent category'|@translate}</td>
<td>
<select class="categoryDropDown" name="parent">
- <!-- BEGIN category_option_parent -->
- <option {category_option_parent.SELECTED} value="{category_option_parent.VALUE}">{category_option_parent.OPTION}</option>
- <!-- END category_option_parent -->
+ <option value="0">------------</option>
+ {html_options options=$create_new_parent_options }
</select>
</td>
</tr>
</table>
<p>
- <input class="submit" type="submit" value="{lang:Submit}" name="submitAdd" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{lang:Reset}" name="reset" />
+ <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitAdd" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
</p>
</fieldset>
<fieldset id="linkAllExist">
- <legend>{lang:Link all category elements to some existing categories}</legend>
+ <legend>{'Link all category elements to some existing categories'|@translate}</legend>
<table>
<tr>
- <td>{lang:Categories}</td>
+ <td>{'Categories'|@translate}</td>
<td>
<select class="categoryList" name="destinations[]" multiple="multiple" size="5">
- <!-- BEGIN category_option_destination -->
- <option {category_option_destination.SELECTED} value="{category_option_destination.VALUE}">{category_option_destination.OPTION}</option>
- <!-- END category_option_destination -->
+ {html_options options=$category_destination_options }
</select>
</td>
</tr>
</table>
<p>
- <input class="submit" type="submit" value="{lang:Submit}" name="submitDestinations" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{lang:Reset}" name="reset" />
+ <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitDestinations" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
</p>
</fieldset>
-<!-- BEGIN group_mail -->
+{if isset($group_mail_options)}
<fieldset id="emailCatInfo">
- <legend>{lang:Send an information email to group members}</legend>
+ <legend>{'Send an information email to group members'|@translate}</legend>
<table>
<tr>
- <td><strong>{lang:Group}</strong></td>
+ <td><strong>{'Group'|@translate}</strong></td>
<td>
<select name="group">
- <!-- BEGIN group_option -->
- <option value="{group_mail.group_option.VALUE}">{group_mail.group_option.OPTION}</option>
- <!-- END group_option -->
+ {html_options options=$group_mail_options}
</select>
</td>
</tr>
<tr>
- <td><strong>{lang:mail_content}</strong></td>
+ <td><strong>{'mail_content'|@translate}</strong></td>
<td>
- <textarea cols="50" rows="5" name="mail_content" class="description">{MAIL_CONTENT}</textarea>
+ <textarea cols="50" rows="5" name="mail_content" class="description">{$MAIL_CONTENT}</textarea>
</td>
</tr>
</table>
<p>
- <input class="submit" type="submit" value="{lang:Submit}" name="submitEmail" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{lang:Reset}" name="reset" />
+ <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitEmail" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
</p>
</fieldset>
-<!-- END group_mail -->
+{/if}
</form>
diff --git a/template/yoga/admin/cat_move.tpl b/template/yoga/admin/cat_move.tpl
index e35731bb1..318a025ab 100644
--- a/template/yoga/admin/cat_move.tpl
+++ b/template/yoga/admin/cat_move.tpl
@@ -1,41 +1,38 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
+
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
</ul>
- <h2>{lang:Move categories}</h2>
+ <h2>{'Move categories'|@translate}</h2>
</div>
-<form method="post" action="{F_ACTION}" class="filter" id="catMove">
+<form method="post" action="{$F_ACTION}" class="filter" id="catMove">
<fieldset>
- <legend>{lang:Virtual categories movement}</legend>
+ <legend>{'Virtual categories movement'|@translate}</legend>
<label>
- {lang:Virtual categories to move}
+ {'Virtual categories to move'|@translate}
<select class="categoryList" name="selection[]" multiple="multiple">
- <!-- BEGIN category_option_selection -->
- <option {category_option_selection.SELECTED} value="{category_option_selection.VALUE}">{category_option_selection.OPTION}</option>
- <!-- END category_option_selection -->
+ {html_options options=$category_to_move_options}
</select>
</label>
<label>
- {lang:New parent category}
+ {'New parent category'|@translate}
<select class="categoryDropDown" name="parent">
- <!-- BEGIN category_option_parent -->
- <option {category_option_parent.SELECTED} value="{category_option_parent.VALUE}">{category_option_parent.OPTION}</option>
- <!-- END category_option_parent -->
+ <option value="0">------------</option>
+ {html_options options=$category_parent_options}
</select>
</label>
</fieldset>
<p>
- <input class="submit" type="submit" name="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED}>
- <input class="submit" type="reset" name="reset" value="{lang:Reset}">
+ <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
+ <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
</p>
</form>
diff --git a/template/yoga/admin/cat_options.tpl b/template/yoga/admin/cat_options.tpl
index 8551ff3e3..356e66223 100644
--- a/template/yoga/admin/cat_options.tpl
+++ b/template/yoga/admin/cat_options.tpl
@@ -1,19 +1,16 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
</ul>
- <h2>{lang:cat_options_title} {TABSHEET_TITLE}</h2>
- {TABSHEET}
+ <h2>{'cat_options_title'|@translate} {$TABSHEET_TITLE}</h2>
+ {include file='admin/tabsheet.tpl'}
</div>
-<form method="post" action="{F_ACTION}" id="cat_options">
+<form method="post" action="{$F_ACTION}" id="cat_options">
<fieldset>
- <legend>{L_SECTION}</legend>
- {DOUBLE_SELECT}
+ <legend>{$L_SECTION}</legend>
+ {$DOUBLE_SELECT}
</fieldset>
</form>
-<p class="information">{L_CAT_OPTIONS_INFO}</p>
-
diff --git a/template/yoga/admin/cat_perm.tpl b/template/yoga/admin/cat_perm.tpl
index 05c300e23..857448112 100644
--- a/template/yoga/admin/cat_perm.tpl
+++ b/template/yoga/admin/cat_perm.tpl
@@ -1,66 +1,68 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
</ul>
- <h2>{lang:Manage permissions for a category}</h2>
+ <h2>{'Manage permissions for a category'|@translate}</h2>
</div>
-<h3>{CATEGORIES_NAV}</h3>
+<h3>{$CATEGORIES_NAV}</h3>
-<form action="{F_ACTION}" method="post" id="categoryPermissions">
+<form action="{$F_ACTION}" method="post" id="categoryPermissions">
- <h4>{lang:Groups}</h4>
+ <h4>{'Groups'|@translate}</h4>
<fieldset>
- <legend>{lang:Permission granted}</legend>
+ <legend>{'Permission granted'|@translate}</legend>
<ul>
- <!-- BEGIN group_granted -->
- <li><label><input type="checkbox" name="deny_groups[]" value="{group_granted.ID}" /> {group_granted.NAME}</label></li>
- <!-- END group_granted -->
+ {foreach from=$group_granted_ids item=id}
+ <li><label><input type="checkbox" name="deny_groups[]" value="{$id}" /> {$all_groups[$id]}</label></li>
+ {/foreach}
</ul>
- <input class="submit" type="submit" name="deny_groups_submit" value="{lang:Deny selected groups}" {TAG_INPUT_ENABLED}/>
+ <input class="submit" type="submit" name="deny_groups_submit" value="{'Deny selected groups'|@translate}" {$TAG_INPUT_ENABLED}/>
</fieldset>
<fieldset>
- <legend>{lang:Permission denied}</legend>
+ <legend>{'Permission denied'|@translate}</legend>
<ul>
- <!-- BEGIN group_denied -->
- <li><label><input type="checkbox" name="grant_groups[]" value="{group_denied.ID}"> {group_denied.NAME}</label></li>
- <!-- END group_denied -->
+ {foreach from=$group_denied_ids item=id}
+ <li><label><input type="checkbox" name="grant_groups[]" value="{$id}"> {$all_groups[$id]}</label></li>
+ {/foreach}
</ul>
- <input class="submit" type="submit" name="grant_groups_submit" value="{lang:Grant selected groups}" {TAG_INPUT_ENABLED}/>
+ <input class="submit" type="submit" name="grant_groups_submit" value="{'Grant selected groups'|@translate}" {$TAG_INPUT_ENABLED}/>
</fieldset>
- <h4>{lang:Users}</h4>
-
+ <h4>{'Users'|@translate}</h4>
+
<fieldset>
- <legend>{lang:Permission granted}</legend>
+ <legend>{'Permission granted'|@translate}</legend>
<ul>
- <!-- BEGIN user_granted -->
- <li><label><input type="checkbox" name="deny_users[]" value="{user_granted.ID}" /> {user_granted.NAME}</label></li>
- <!-- END user_granted -->
+ {foreach from=$user_granted_direct_ids item=id}
+ <li><label><input type="checkbox" name="deny_users[]" value="{$id}" /> {$all_users[$id]}</label></li>
+ {/foreach}
</ul>
- <input class="submit" type="submit" name="deny_users_submit" value="{lang:Deny selected users}" {TAG_INPUT_ENABLED}/>
+ <input class="submit" type="submit" name="deny_users_submit" value="{'Deny selected users'|@translate}" {$TAG_INPUT_ENABLED}/>
</fieldset>
<fieldset>
- <legend>{lang:Permission granted thanks to a group}</legend>
+ <legend>{'Permission granted thanks to a group'|@translate}</legend>
+ {if isset($user_granted_indirects) }
<ul>
- <!-- BEGIN user_granted_indirect -->
- <li>{user_granted_indirect.NAME} ({user_granted_indirect.GROUP})</li>
- <!-- END user_granted_indirect -->
+ {foreach from=$user_granted_indirects item=user_group}
+ <li>{$user_group.USER} ({$user_group.GROUP})</li>
+ {/foreach}
</ul>
+ {/if}
</fieldset>
<fieldset>
- <legend>{lang:Permission denied}</legend>
+ <legend>{'Permission denied'|@translate}</legend>
<ul>
- <!-- BEGIN user_denied -->
- <li><label><input type="checkbox" name="grant_users[]" value="{user_denied.ID}"> {user_denied.NAME}</label></li>
- <!-- END user_denied -->
+ {foreach from=$user_denied_ids item=id}
+ <li><label><input type="checkbox" name="grant_users[]" value="{$id}"> {$all_users[$id]}</label></li>
+ {/foreach}
</ul>
- <input class="submit" type="submit" name="grant_users_submit" value="{lang:Grant selected users}" {TAG_INPUT_ENABLED}/>
+ <input class="submit" type="submit" name="grant_users_submit" value="{'Grant selected users'|@translate}" {$TAG_INPUT_ENABLED}/>
</fieldset>
</form>
diff --git a/template/yoga/admin/permalinks.tpl b/template/yoga/admin/permalinks.tpl
index 220aa3572..2013666eb 100644
--- a/template/yoga/admin/permalinks.tpl
+++ b/template/yoga/admin/permalinks.tpl
@@ -1,72 +1,70 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
</ul>
- <h2>{lang:Permalinks}</h2>
+ <h2>{'Permalinks'|@translate}</h2>
</div>
-<form method="post" action="{F_ACTION}">
-<fieldset><legend>{lang:Add/delete a permalink}</legend>
- <label>{lang:Category}:
+<form method="post" action="{$F_ACTION}">
+<fieldset><legend>{'Add/delete a permalink'|@translate}</legend>
+ <label>{'Category'|@translate}:
<select name="cat_id">
<option value="0">------</option>
-<!-- BEGIN categories -->
- <option value="{categories.VALUE}" {categories.SELECTED}>{categories.OPTION}</option>
-<!-- END categories -->
+ {html_options options=$categories selected=$categories_selected}
</select>
</label>
- <label>{lang:Permalink}:
+ <label>{'Permalink'|@translate}:
<input name="permalink" />
</label>
- <label>{lang:Save to permalink history}:
+ <label>{'Save to permalink history'|@translate}:
<input type="checkbox" name="save" checked="checked" />
</label>
<p>
- <input type="submit" class="submit" name="set_permalink" value="{lang:submit}" {TAG_INPUT_ENABLED}/>
+ <input type="submit" class="submit" name="set_permalink" value="{'submit'|@translate}" {$TAG_INPUT_ENABLED}/>
</p>
</fieldset>
</form>
-<h3>{lang:Permalinks}</h3>
+<h3>{'Permalinks'|@translate}</h3>
<table class="table2">
<tr class="throw">
- <td>Id {SORT_ID}</td>
- <td>{lang:Category} {SORT_NAME}</td>
- <td>{lang:Permalink} {SORT_PERMALINK}</td>
+ <td>Id {$SORT_ID}</td>
+ <td>{'Category'|@translate} {$SORT_NAME}</td>
+ <td>{'Permalink'|@translate} {$SORT_PERMALINK}</td>
</tr>
-<!-- BEGIN permalink -->
+{foreach from=$permalinks item=permalink}
<tr>
- <td>{permalink.id}</td>
- <td>{permalink.name}</td>
- <td>{permalink.permalink}</td>
+ <td>{$permalink.id}</td>
+ <td>{$permalink.name}</td>
+ <td>{$permalink.permalink}</td>
</tr>
-<!-- END permalink -->
+{/foreach}
</table>
-<h3>{lang:Permalink history} <a name="old_permalinks"></a></h3>
+<h3>{'Permalink history'|@translate} <a name="old_permalinks"></a></h3>
<table class="table2">
<tr class="throw">
- <td>Id {SORT_OLD_CAT_ID}</td>
- <td>{lang:Category}</td>
- <td>{lang:Permalink} {SORT_OLD_PERMALINK}</td>
- <td>Deleted on {SORT_OLD_DATE_DELETED}</td>
- <td>Last hit {SORT_OLD_LAST_HIT}</td>
- <td>Hit {SORT_OLD_HIT}</td>
+ <td>Id {$SORT_OLD_CAT_ID}</td>
+ <td>{'Category'|@translate}</td>
+ <td>{'Permalink'|@translate} {$SORT_OLD_PERMALINK}</td>
+ <td>Deleted on {$SORT_OLD_DATE_DELETED}</td>
+ <td>Last hit {$SORT_OLD_LAST_HIT}</td>
+ <td>Hit {$SORT_OLD_HIT}</td>
<td></td>
</tr>
-<!-- BEGIN deleted_permalink -->
+{foreach from=$deleted_permalinks item=permalink}
<tr>
- <td>{deleted_permalink.cat_id}</td>
- <td>{deleted_permalink.name}</td>
- <td>{deleted_permalink.permalink}</td>
- <td>{deleted_permalink.date_deleted}</td>
- <td>{deleted_permalink.last_hit}</td>
- <td>{deleted_permalink.hit}</td>
- <td><a href="{deleted_permalink.U_DELETE}" {TAG_INPUT_ENABLED}><img src="{pwg_root}{themeconf:icon_dir}/delete.png" alt="Delete"></a></td>
+ <td>{$permalink.cat_id}</td>
+ <td>{$permalink.name}</td>
+ <td>{$permalink.permalink}</td>
+ <td>{$permalink.date_deleted}</td>
+ <td>{$permalink.last_hit}</td>
+ <td>{$permalink.hit}</td>
+ <td><a href="{$permalink.U_DELETE}" {$TAG_INPUT_ENABLED}><img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" alt="Delete"></a></td>
</tr>
-<!-- END deleted_permalink -->
+{/foreach}
</table>
diff --git a/template/yoga/admin/rating.tpl b/template/yoga/admin/rating.tpl
index d10bf57db..aa91892dc 100755
--- a/template/yoga/admin/rating.tpl
+++ b/template/yoga/admin/rating.tpl
@@ -1,68 +1,64 @@
-<!-- DEV TAG: not smarty migrated -->
-<h2>{lang:Rating} [{NB_ELEMENTS} {lang:elements}]</h2>
+{* $Id$ *}
+<h2>{'Rating'|@translate} [{$NB_ELEMENTS} {'elements'|@translate}]</h2>
-<form action="{F_ACTION}" method="GET" id="update" class="filter">
+<form action="{$F_ACTION}" method="GET" id="update" class="filter">
<fieldset>
- <legend>{lang:Filter}</legend>
+ <legend>{'Filter'|@translate}</legend>
<label>
- {lang:Sort by}
+ {'Sort by'|@translate}
<select name="order_by">
- <!-- BEGIN order_by -->
- <option value="{order_by.VALUE}" {order_by.SELECTED}>{order_by.CONTENT}</option>
- <!-- END order_by -->
+ {html_options options=$order_by_options selected=$order_by_options_selected}
</select>
</label>
<label>
- {lang:Users}
+ {'Users'|@translate}
<select name="users">
- <!-- BEGIN user_option -->
- <option value="{user_option.VALUE}" {user_option.SELECTED}>{user_option.CONTENT}</option>
- <!-- END user_option -->
+ {html_options options=$user_options selected=$user_options_selected}
</select>
</label>
<label>
- {lang:Number of items}
- <input type="text" name="display" size="2" value="{DISPLAY}">
+ {'Number of items'|@translate}
+ <input type="text" name="display" size="2" value="{$DISPLAY}">
</label>
- <input class="submit" type="submit" name="submit_filter" value="{lang:Submit}" />
+ <input class="submit" type="submit" name="submit_filter" value="{'Submit'|@translate}" />
<input type="hidden" name="page" value="rating" />
</fieldset>
</form>
-<div class="navigationBar">{NAVBAR}</div>
+<div class="navigationBar">{$NAVBAR}</div>
<table width="99%">
<tr class="throw">
- <td>{lang:File}</td>
- <td>{lang:Number of rates}</td>
- <td>{lang:Average rate}</td>
- <td>{lang:Controversy}</td>
- <td>{lang:Sum of rates}</td>
- <td>{lang:Rate}</td>
- <td>{lang:Username}</td>
- <td>{lang:Rate date}</td>
+ <td>{'File'|@translate}</td>
+ <td>{'Number of rates'|@translate}</td>
+ <td>{'Average rate'|@translate}</td>
+ <td>{'Controversy'|@translate}</td>
+ <td>{'Sum of rates'|@translate}</td>
+ <td>{'Rate'|@translate}</td>
+ <td>{'Username'|@translate}</td>
+ <td>{'Rate date'|@translate}</td>
<td></td>
</tr>
-<!-- BEGIN image -->
+{foreach from=$images item=image}
<tr valign="bottom">
- <td rowspan="{image.NB_RATES_PLUS1}"><a href="{image.U_URL}"><img src="{image.U_THUMB}" alt="{image.FILE}" title="{image.FILE}"></a></td>
- <td rowspan="{image.NB_RATES_PLUS1}"><strong>{image.NB_RATES}/{image.NB_RATES_TOTAL}</strong></td>
- <td rowspan="{image.NB_RATES_PLUS1}"><strong>{image.AVG_RATE}</strong></td>
- <td rowspan="{image.NB_RATES_PLUS1}"><strong>{image.STD_RATE}</strong></td>
- <td rowspan="{image.NB_RATES_PLUS1}" style="border-right: 1px solid;" ><strong>{image.SUM_RATE}</strong></td>
+ <td rowspan="{$image.NB_RATES_TOTAL+1}"><a href="{$image.U_URL}"><img src="{$image.U_THUMB}" alt="{$image.FILE}" title="{$image.FILE}"></a></td>
+ <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.NB_RATES}/{$image.NB_RATES_TOTAL}</strong></td>
+ <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.AVG_RATE}</strong></td>
+ <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.STD_RATE}</strong></td>
+ <td rowspan="{$image.NB_RATES_TOTAL+1}" style="border-right: 1px solid;" ><strong>{$image.SUM_RATE}</strong></td>
</tr>
-<!-- BEGIN rate -->
+{foreach from=$image.rates item=rate}
<tr>
- <td>{image.rate.RATE}</td>
- <td><b>{image.rate.USER}</b></td>
- <td><span class="date">{image.rate.DATE}</span></td>
- <td><a href="{image.rate.U_DELETE}" {TAG_INPUT_ENABLED}><img src="{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{lang:delete}]"/></a></td>
+ <td>{$rate.RATE}</td>
+ <td><b>{$rate.USER}</b></td>
+ <td><span class="date">{$rate.DATE}</span></td>
+ <td><a href="{$rate.U_DELETE}" {$TAG_INPUT_ENABLED}><img src="{$themeconf.icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{'delete'|@translate}]"/></a></td>
</tr>
-<!-- END rate -->
-<!-- END image -->
+{/foreach} {*rates*}
+{/foreach} {*images*}
</table>
-<div class="navigationBar">{NAVBAR}</div>
+<div class="navigationBar">{$NAVBAR}</div>
diff --git a/template/yoga/admin/tabsheet.tpl b/template/yoga/admin/tabsheet.tpl
index 6daafb506..930771916 100644
--- a/template/yoga/admin/tabsheet.tpl
+++ b/template/yoga/admin/tabsheet.tpl
@@ -1,7 +1,8 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
+{if isset($tabsheet) and count($tabsheet)}
<ul class="tabsheet">
-<!-- BEGIN tab -->
- <li class="{tab.CLASSNAME}"><a href="{tab.URL}">{tab.CAPTION}</a></li>
-<!-- END tab -->
+{foreach from=$tabsheet item=tab}
+ <li class="{if isset($tab.selected) and $tab.selected}selected_tab{else}normal_tab{/if}"><a href="{$tab.url}">{$tab.caption}</a></li>
+{/foreach}
</ul>
+{/if} \ No newline at end of file
diff --git a/template/yoga/comments.tpl b/template/yoga/comments.tpl
index 94f4f82f4..e2f8777c2 100644
--- a/template/yoga/comments.tpl
+++ b/template/yoga/comments.tpl
@@ -1,38 +1,34 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div id="content">
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
+ <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
</ul>
- <h2>{lang:User comments}</h2>
+ <h2>{'User comments'|@translate}</h2>
</div>
-<form class="filter" action="{F_ACTION}" method="get">
+<form class="filter" action="{$F_ACTION}" method="get">
<fieldset>
- <legend>{lang:Filter}</legend>
+ <legend>{'Filter'|@translate}</legend>
- <label>{lang:Keyword}<input type="text" name="keyword" value="{F_KEYWORD}" /></label>
+ <label>{'Keyword'|@translate}<input type="text" name="keyword" value="{$F_KEYWORD}" /></label>
- <label>{lang:Author}<input type="text" name="author" value="{F_AUTHOR}" /></label>
+ <label>{'Author'|@translate}<input type="text" name="author" value="{$F_AUTHOR}" /></label>
<label>
- {lang:Category}
+ {'Category'|@translate}
<select name="cat">
- <!-- BEGIN category -->
- <option {category.SELECTED} value="{category.VALUE}">{category.OPTION}</option>
- <!-- END category -->
+ <option value="0">------------</option>
+ {html_options options=$categories selected=$categories_selected}
</select>
</label>
<label>
- {lang:Since}
+ {'Since'|@translate}
<select name="since">
- <!-- BEGIN since_option -->
- <option {since_option.SELECTED} value="{since_option.VALUE}">{since_option.CONTENT}</option>
- <!-- END since_option -->
+ {html_options options=$since_options selected=$since_options_selected}
</select>
</label>
@@ -40,66 +36,64 @@
<fieldset>
- <legend>{lang:Display}</legend>
+ <legend>{'Display'|@translate}</legend>
<label>
- {lang:Sort by}
+ {'Sort by'|@translate}
<select name="sort_by">
- <!-- BEGIN sort_by_option -->
- <option value="{sort_by_option.VALUE}" {sort_by_option.SELECTED} >{sort_by_option.CONTENT}</option>
- <!-- END sort_by_option -->
+ {html_options options=$sort_by_options selected=$sort_by_options_selected}
</select>
</label>
<label>
- {lang:Sort order}
+ {'Sort order'|@translate}
<select name="sort_order">
- <!-- BEGIN sort_order_option -->
- <option value="{sort_order_option.VALUE}" {sort_order_option.SELECTED} >{sort_order_option.CONTENT}</option>
- <!-- END sort_order_option -->
+ {html_options options=$sort_order_options selected=$sort_order_options_selected}
</select>
</label>
<label>
- {lang:Number of items}
+ {'Number of items'|@translate}
<select name="items_number">
- <!-- BEGIN items_number_option -->
- <option value="{items_number_option.VALUE}" {items_number_option.SELECTED} >{items_number_option.CONTENT}</option>
- <!-- END items_option -->
+ {html_options options=$item_number_options selected=$item_number_options_selected}
</select>
</label>
</fieldset>
- <p><input class="submit" type="submit" value="{lang:Filter and display}"></p>
+ <p><input class="submit" type="submit" value="{'Filter and display'|@translate}"></p>
</form>
-<div class="navigationBar">{NAVBAR}</div>
+<div class="navigationBar">{$NAVBAR}</div>
+{if isset($comments)}
<div id="comments">
- <!-- BEGIN comment -->
+ {foreach from=$comments item=comment}
<div class="comment">
- <a class="illustration" href="{comment.U_PICTURE}"><img src="{comment.TN_SRC}" alt="{comment.ALT}" /></a>
- <p class="commentHeader"><span class="author">{comment.AUTHOR}</span> - <span class="date">{comment.DATE}</span>
- <!-- BEGIN action_delete -->
- <a href="{comment.action_delete.U_DELETE}" title="{lang:comments_del}">
- <img src="{pwg_root}{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{lang:delete}]"/>
+ <a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}" alt="{$comment.ALT}" /></a>
+ <p class="commentHeader"><span class="author">{$comment.AUTHOR}</span> - <span class="date">{$comment.DATE}</span>
+
+ {if isset($comment.U_DELETE)}
+ <a href="{$comment.U_DELETE}" title="{'comments_del'|@translate}">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{'delete'|@translate}]"/>
</a>
- <!-- END action_delete -->
- <!-- BEGIN action_validate -->
- <a href="{comment.action_validate.U_VALIDATE}" title="validate this comment">
- <img src="{pwg_root}{themeconf:icon_dir}/validate_s.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[validate]"/>
+ {/if}
+
+ {if isset($comment.U_VALIDATE)}
+ <a href="{$comment.U_VALIDATE}" title="validate this comment">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/validate_s.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[validate]"/>
</a>
- <!-- END action_validate -->
+ {/if}
+
</p>
- <blockquote>{comment.CONTENT}</blockquote>
+ <blockquote>{$comment.CONTENT}</blockquote>
<hr class="separation">
</div>
-
- <!-- END comment -->
-
+
+ {/foreach}
</div>
+{/if}
</div> <!-- content -->
diff --git a/template/yoga/identification.tpl b/template/yoga/identification.tpl
index 3c23e6f9e..5cb4555e8 100644
--- a/template/yoga/identification.tpl
+++ b/template/yoga/identification.tpl
@@ -1,61 +1,60 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div id="content">
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}"><img src="{themeconf:icon_dir}/lost_password.png" class="button" alt="{lang:Forgot your password?}"></a></li>
-<!-- BEGIN register -->
- <li><a href="{U_REGISTER}" title="{lang:Create a new account}"><img src="{themeconf:icon_dir}/register.png" class="button" alt="{lang:register}"/></a></li>
-<!-- END register -->
- <li><a href="{U_HOME}" title="{lang:Go through the gallery as a visitor}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
+ <li><a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}"><img src="{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"></a></li>
+ {if isset($U_REGISTER) }
+ <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}"><img src="{$themeconf.icon_dir}/register.png" class="button" alt="{'register'|@translate}"/></a></li>
+ {/if}
+ <li><a href="{$U_HOME}" title="{'Go through the gallery as a visitor'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
</ul>
- <h2>{lang:Identification}</h2>
+ <h2>{'Identification'|@translate}</h2>
</div>
- <!-- BEGIN errors -->
+ {if isset($errors) }
<div class="errors">
<ul>
- <!-- BEGIN error -->
- <li>{errors.error.ERROR}</li>
- <!-- END error -->
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
</ul>
</div>
- <!-- END errors -->
+ {/if}
-<form action="{F_LOGIN_ACTION}" method="post" name="login_form" class="properties">
+<form action="{$F_LOGIN_ACTION}" method="post" name="login_form" class="properties">
<fieldset>
- <legend>{lang:Connection settings}</legend>
+ <legend>{'Connection settings'|@translate}</legend>
- <input type="hidden" name="redirect" value="{U_REDIRECT}">
+ <input type="hidden" name="redirect" value="{$U_REDIRECT}">
<ul>
<li>
<span class="property">
- <label for="username">{lang:Username}</label>
+ <label for="username">{'Username'|@translate}</label>
</span>
- <input tabindex="1" class="login" type="text" name="username" id="username" size="25" maxlength="40" value="{USERNAME}" />
+ <input tabindex="1" class="login" type="text" name="username" id="username" size="25" maxlength="40" />
</li>
<li>
<span class="property">
- <label for="password">{lang:Password}</label>
+ <label for="password">{'Password'|@translate}</label>
</span>
<input tabindex="2" class="login" type="password" name="password" id="password" size="25" maxlength="25" />
</li>
- <!-- BEGIN remember_me -->
+ {if $authorize_remembering }
<li>
<span class="property">
- <label for="remember_me">{lang:remember_me}</label>
+ <label for="remember_me">{'remember_me'|@translate}</label>
</span>
<input tabindex="3" type="checkbox" name="remember_me" id="remember_me" value="1">
</li>
- <!-- END remember_me -->
+ {/if}
</ul>
</fieldset>
- <p><input class="submit" tabindex="4" type="submit" name="login" value="{lang:submit}"></p>
+ <p><input class="submit" tabindex="4" type="submit" name="login" value="{'submit'|@translate}"></p>
</form>
<script type="text/javascript"><!--
@@ -63,10 +62,10 @@ document.login_form.username.focus();
//--></script>
<p>
-<!-- BEGIN register -->
- <a href="{U_REGISTER}" title="{lang:Create a new account}"><img src="{themeconf:icon_dir}/register.png" class="button" alt=""> {lang:Register}</a>
-<!-- END register -->
- <a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}"><img src="{themeconf:icon_dir}/lost_password.png" class="button" alt=""> {lang:Forgot your password?}</a>
+ {if isset($U_REGISTER) }
+ <a href="{$U_REGISTER}" title="{'Create a new account'|@translate}"><img src="{$themeconf.icon_dir}/register.png" class="button" alt=""> {'Register'|@translate}</a>
+ {/if}
+ <a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}"><img src="{$themeconf.icon_dir}/lost_password.png" class="button" alt=""> {'Forgot your password?'|@translate}</a>
</p>
</div> <!-- content -->
diff --git a/template/yoga/notification.tpl b/template/yoga/notification.tpl
index 5a7df4006..bb98b27f5 100644
--- a/template/yoga/notification.tpl
+++ b/template/yoga/notification.tpl
@@ -1,15 +1,15 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<div id="content">
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
+ <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
</ul>
- <h2>{lang:Notification}</h2>
+ <h2>{'Notification'|@translate}</h2>
</div>
- <p>{lang:The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.}</p>
+ <p>{'The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'|@translate}</p>
- <p><a href="{U_FEED_IMAGE_ONLY}">{lang:Image only RSS feed}</a></p>
- <p><a href="{U_FEED}">{lang:Complete RSS feed}</a></p>
+ <p><a href="{$U_FEED_IMAGE_ONLY}">{'Image only RSS feed'|@translate}</a></p>
+ <p><a href="{$U_FEED}">{'Complete RSS feed'|@translate}</a></p>
</div>
diff --git a/template/yoga/password.tpl b/template/yoga/password.tpl
index a2fe78857..efb384299 100644
--- a/template/yoga/password.tpl
+++ b/template/yoga/password.tpl
@@ -1,55 +1,54 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div id="content">
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HOME}" title="{lang:Go through the gallery as a visitor}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
+ <li><a href="{$U_HOME}" title="{'Go through the gallery as a visitor'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
</ul>
- <h2>{lang:Password forgotten}</h2>
+ <h2>{'Password forgotten'|@translate}</h2>
</div>
- <!-- BEGIN errors -->
+ {if count($errors)}
<div class="errors">
<ul>
- <!-- BEGIN error -->
- <li>{errors.error.ERROR}</li>
- <!-- END error -->
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
</ul>
</div>
- <!-- END errors -->
+ {/if}
- <!-- BEGIN infos -->
+ {if count($infos)}
<div class="infos">
<ul>
- <!-- BEGIN info -->
- <li>{infos.info.INFO}</li>
- <!-- END info -->
+ {foreach from=$infos item=info}
+ <li>{$info}</li>
+ {/foreach}
</ul>
</div>
- <!-- END infos -->
+ {/if}
-<form action="{F_ACTION}" method="post" class="properties">
+<form action="{$F_ACTION}" method="post" class="properties">
<fieldset>
- <legend>{lang:Retrieve password}</legend>
+ <legend>{'Retrieve password'|@translate}</legend>
<ul>
<li>
<span class="property">
- <label for="mail_address">{lang:Email address}</label>
+ <label for="mail_address">{'Email address'|@translate}</label>
</span>
<input class="login" type="text" name="mail_address" id="mail_address" size="40" maxlength="40" >
</li>
<li>
<span class="property">
- <label for="no_mail_address">{lang:No email address}</label>
+ <label for="no_mail_address">{'No email address'|@translate}</label>
</span>
<input type="checkbox" id="no_mail_address" name="no_mail_address" value="1">
</li>
</ul>
</fieldset>
- <p><input class="submit" type="submit" name="submit" value="{lang:Send new password}"></p>
+ <p><input class="submit" type="submit" name="submit" value="{'Send new password'|@translate}"></p>
</form>
</div> <!-- content -->
diff --git a/template/yoga/picture.tpl b/template/yoga/picture.tpl
index 34efe877d..ebfba0998 100644
--- a/template/yoga/picture.tpl
+++ b/template/yoga/picture.tpl
@@ -57,8 +57,6 @@
<!-- END caddie -->
</div>
{NAV_BUTTONS}
- </div>
-
</div> <!-- imageToolBar -->
<div id="theImage">
diff --git a/template/yoga/popuphelp.tpl b/template/yoga/popuphelp.tpl
index a31a0df90..3b7eb1932 100644
--- a/template/yoga/popuphelp.tpl
+++ b/template/yoga/popuphelp.tpl
@@ -1,6 +1,6 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<div id="content">
-{HELP_CONTENT}
+{$HELP_CONTENT}
</div> <!-- content -->
-<p id="pageBottomActions"><a href="#" onclick="window.close();" title="{lang:Close this window}"><img src="{themeconf:icon_dir}/exit.png" class="button" alt="close"></a></p>
+<p id="pageBottomActions"><a href="#" onclick="window.close();" title="{'Close this window'|@translate}"><img src="{$themeconf.icon_dir}/exit.png" class="button" alt="close"></a></p>
diff --git a/template/yoga/search.tpl b/template/yoga/search.tpl
index 328efb805..1b03c34c3 100644
--- a/template/yoga/search.tpl
+++ b/template/yoga/search.tpl
@@ -1,134 +1,130 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div id="content">
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}" rel="nofollow"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
- <li><a href="{U_HOME}" title="{lang:return to homepage}" rel="home"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}" rel="nofollow"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}" rel="home"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
</ul>
- <h2>{lang:Search}</h2>
+ <h2>{'Search'|@translate}</h2>
</div>
-<form class="filter" method="post" name="search" action="{S_SEARCH_ACTION}">
-<!-- BEGIN errors -->
+{if isset($errors) }
<div class="errors">
<ul>
- <!-- BEGIN error -->
- <li>{errors.error.ERROR}</li>
- <!-- END error -->
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
</ul>
</div>
-<!-- END errors -->
+{/if}
+
+<form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}">
<fieldset>
- <legend>{lang:Filter}</legend>
- <label>{lang:search_keywords}
+ <legend>{'Filter'|@translate}</legend>
+ <label>{'search_keywords'|@translate}
<input type="text" style="width: 300px" name="search_allwords" size="30" />
</label>
<ul>
<li><label>
- <input type="radio" name="mode" value="AND" checked="checked" />{lang:search_mode_and}
+ <input type="radio" name="mode" value="AND" checked="checked" />{'search_mode_and'|@translate}
</label></li>
<li><label>
- <input type="radio" name="mode" value="OR" />{lang:search_mode_or}
+ <input type="radio" name="mode" value="OR" />{'search_mode_or'|@translate}
</label></li>
</ul>
- <label>{lang:search_author}
+ <label>{'search_author'|@translate}
<input type="text" style="width: 300px" name="search_author" size="30" />
</label>
</fieldset>
-<!-- BEGIN tags -->
+{if isset($TAG_SELECTION)}
<fieldset>
- <legend>{lang:Search tags}</legend>
- {TAG_SELECTION}
- <label><span><input type="radio" name="tag_mode" value="AND" checked="checked" /> {lang:All tags}</span></label>
- <label><span><input type="radio" name="tag_mode" value="OR" /> {lang:Any tag}</span></label>
+ <legend>{'Search tags'|@translate}</legend>
+ {$TAG_SELECTION}
+ <label><span><input type="radio" name="tag_mode" value="AND" checked="checked" /> {'All tags'|@translate}</span></label>
+ <label><span><input type="radio" name="tag_mode" value="OR" /> {'Any tag'|@translate}</span></label>
</fieldset>
-<!-- END tags -->
+{/if}
<fieldset>
- <legend>{lang:search_date}</legend>
+ <legend>{'search_date'|@translate}</legend>
<ul>
- <li><label>{lang:search_date_type}</label></li>
+ <li><label>{'search_date_type'|@translate}</label></li>
<li><label>
- <input type="radio" name="date_type" value="date_creation" checked="checked" />{lang:Creation date}
+ <input type="radio" name="date_type" value="date_creation" checked="checked" />{'Creation date'|@translate}
</label></li>
<li><label>
- <input type="radio" name="date_type" value="date_available" />{lang:Post date}
+ <input type="radio" name="date_type" value="date_available" />{'Post date'|@translate}
</label></li>
</ul>
<ul>
- <li><label>{lang:search_date_from}</label></li>
+ <li><label>{'search_date_from'|@translate}</label></li>
<li>
<select name="start_day">
- <!-- BEGIN start_day -->
- <option {start_day.SELECTED} value="{start_day.VALUE}">{start_day.OPTION}</option>
- <!-- END start_day -->
+ <option value="0">--</option>
+ {section name=day start=1 loop=31}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
</select>
<select name="start_month">
- <!-- BEGIN start_month -->
- <option {start_month.SELECTED} value="{start_month.VALUE}">{start_month.OPTION}</option>
- <!-- END start_month -->
+ {html_options options=$month_list selected=$START_MONTH_SELECTED}
</select>
<input name="start_year" type="text" size="4" maxlength="4" >
</li>
<li>
- <a href="#" onClick="document.search.start_day.value={TODAY_DAY};document.search.start_month.value={TODAY_MONTH};document.search.start_year.value={TODAY_YEAR};return false;">{lang:today}</a>
+ <a href="#" onClick="document.search.start_day.value={$smarty.now|date_format:"%d"};document.search.start_month.value={$smarty.now|date_format:"%m"};document.search.start_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
</li>
</ul>
<ul>
- <li><label>{lang:search_date_to}</label></li>
+ <li><label>{'search_date_to'|@translate}</label></li>
<li>
<select name="end_day">
- <!-- BEGIN end_day -->
- <option {end_day.SELECTED} value="{end_day.VALUE}">{end_day.OPTION}</option>
- <!-- END end_day -->
+ <option value="0">--</option>
+ {section name=day start=1 loop=31}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
</select>
<select name="end_month">
- <!-- BEGIN end_month -->
- <option {end_month.SELECTED} value="{end_month.VALUE}">{end_month.OPTION}</option>
- <!-- END end_month -->
+ {html_options options=$month_list selected=$END_MONTH_SELECTED}
</select>
<input name="end_year" type="text" size="4" maxlength="4" >
</li>
<li>
- <a href="#" onClick="document.search.end_day.value={TODAY_DAY};document.search.end_month.value={TODAY_MONTH};document.search.end_year.value={TODAY_YEAR};return false;">{lang:today}</a>
+ <a href="#" onClick="document.search.end_day.value={$smarty.now|date_format:"%d"};document.search.end_month.value={$smarty.now|date_format:"%m"};document.search.end_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
</li>
</ul>
</fieldset>
<fieldset>
- <legend>{lang:search_options}</legend>
- <label>{lang:search_categories}
+ <legend>{'search_options'|@translate}</legend>
+ <label>{'search_categories'|@translate}
<select class="categoryList" name="cat[]" multiple="multiple" >
- <!-- BEGIN category_option -->
- <option value="{category_option.VALUE}">{category_option.OPTION}</option>
- <!-- END category_option -->
+ {html_options options=$category_options selected=$category_options_selected}
</select>
</label>
<ul>
- <li><label>{lang:search_subcats_included}</label></li>
+ <li><label>{'search_subcats_included'|@translate}</label></li>
<li><label>
- <input type="radio" name="subcats-included" value="1" checked="checked" />{lang:yes}
+ <input type="radio" name="subcats-included" value="1" checked="checked" />{'yes'|@translate}
</label></li>
<li><label>
- <input type="radio" name="subcats-included" value="0" />{lang:no}
+ <input type="radio" name="subcats-included" value="0" />{'no'|@translate}
</label></li>
</ul>
<ul>
- <li><label>{lang:search_sort}</label></li>
+ <li><label>{'search_sort'|@translate}</label></li>
<li><label>
- <input type="radio" name="sd" value="AND" />{lang:search_ascending}
+ <input type="radio" name="sd" value="AND" />{'search_ascending'|@translate}
</label></li>
<li><label>
- <input type="radio" name="sd" value="d" checked="checked" />{lang:search_descending}
+ <input type="radio" name="sd" value="d" checked="checked" />{'search_descending'|@translate}
</label></li>
</ul>
</fieldset>
<p>
- <input class="submit" type="submit" name="submit" value="{lang:submit}" />
- <input class="submit" type="reset" value="{lang:reset}" />
+ <input class="submit" type="submit" name="submit" value="{'submit'|@translate}" />
+ <input class="submit" type="reset" value="{'reset'|@translate}" />
</p>
</form>
diff --git a/template/yoga/search_rules.tpl b/template/yoga/search_rules.tpl
index b015c42b6..5cf2241e6 100644
--- a/template/yoga/search_rules.tpl
+++ b/template/yoga/search_rules.tpl
@@ -1,57 +1,56 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<div id="content">
-<h2>{lang:Search rules}</h2>
+<h2>{'Search rules'|@translate}</h2>
-<p>{INTRODUCTION}</p>
+{if isset($INTRODUCTION) }
+<p>{$INTRODUCTION}</p>
+{/if}
<ul>
- <!-- BEGIN words -->
- <li>{words.CONTENT}</li>
- <!-- END words -->
+ {if isset($search_words) }
+ {foreach from=$search_words item=v}
+ <li>{$v}</li>
+ {/foreach}
+ {/if}
- <!-- BEGIN tags -->
+ {if isset($SEARCH_TAGS_MODE) }
<li>
- <p>{tags.LIST_INTRO}</p>
-
+ <p>{if 'AND'==$SEARCH_TAGS_MODE}{'All tags must match'|@translate}{else}{'At least one tag must match'|@translate}{/if}</p>
<ul>
- <!-- BEGIN tag -->
- <li>{tags.tag.NAME}</li>
- <!-- END tag -->
+ {foreach from=$search_tags item=v}
+ <li>{$v}</li>
+ {/foreach}
</ul>
</li>
- <!-- END tags -->
+ {/if}
- <!-- BEGIN author -->
- <li>{author.CONTENT}</li>
- <!-- END author -->
-
- <!-- BEGIN date_creation -->
- <li>{date_creation.CONTENT}</li>
- <!-- END date_creation -->
+ {if isset($DATE_CREATION) }
+ <li>{$DATE_CREATION}</li>
+ {/if}
- <!-- BEGIN date_available -->
- <li>{date_available.CONTENT}</li>
- <!-- END date_available -->
+ {if isset($DATE_AVAILABLE) }
+ <li>{$DATE_AVAILABLE}</li>
+ {/if}
- <!-- BEGIN categories -->
+ {if isset($search_categories) }
<li>
- <p>{categories.LIST_INTRO}</p>
+ <p>{'Categories'|@translate}</p>
<ul>
- <!-- BEGIN category -->
- <li>{categories.category.NAME}</li>
- <!-- END category -->
+ {foreach from=$search_categories item=v}
+ <li>{$v}</li>
+ {/foreach}
</ul>
</li>
- <!-- END categories -->
+ {/if}
</ul>
</div> <!-- content -->
<p id="pageBottomActions">
- <a href="#" onclick="window.close();" title="{lang:Close this window}">
- <img src="{themeconf:icon_dir}/exit.png" class="button" alt="close">
+ <a href="#" onclick="window.close();" title="{'Close this window'|@translate}">
+ <img src="{$themeconf.icon_dir}/exit.png" class="button" alt="close">
</a>
</p>
diff --git a/template/yoga/tags.tpl b/template/yoga/tags.tpl
index 023c5965b..2548065ce 100644
--- a/template/yoga/tags.tpl
+++ b/template/yoga/tags.tpl
@@ -1,19 +1,19 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div id="content">
<div class="titrePage">
<ul class="categoryActions">
- <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
+ <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
</ul>
- <h2>{lang:Tags}</h2>
+ <h2>{'Tags'|@translate}</h2>
</div>
+ {if isset($tags)}
<ul id="fullTagCloud">
- <!-- BEGIN tag -->
- <li><a href="{tag.URL}" class="{tag.CLASS}" title="{tag.TITLE}">{tag.NAME}</a></li>
- <!-- END tag -->
- <li>&nbsp;</li> <!-- FIXME W3C HTML Conformity said: No empty UL -->
+ {foreach from=$tags item=tag}
+ <li><a href="{$tag.URL}" class="{$tag.CLASS}" title="{$tag.TITLE}">{$tag.NAME}</a></li>
+ {/foreach}
</ul>
+ {/if}
</div> <!-- content -->