aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2008-03-08 10:24:07 +0000
committervdigital <vdigital@piwigo.org>2008-03-08 10:24:07 +0000
commita048738d8b9b6be6f16316b2a198386f92e1b600 (patch)
tree801beff370ac18b663dbb81ad825d77c4b9cd1fd /plugins
parentfe23062161d1e50a97685822c8ab94cdc2d43263 (diff)
- admin_advices.tpl goes smarty and related code has been revised.
git-svn-id: http://piwigo.org/svn/trunk@2266 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins')
-rw-r--r--plugins/admin_advices/admin_advices.tpl54
-rw-r--r--plugins/admin_advices/en_UK/lang.adv.php8
-rw-r--r--plugins/admin_advices/fr_FR/lang.adv.php8
-rw-r--r--plugins/admin_advices/main.inc.php41
4 files changed, 48 insertions, 63 deletions
diff --git a/plugins/admin_advices/admin_advices.tpl b/plugins/admin_advices/admin_advices.tpl
index 6c53fa55c..b4c7f6169 100644
--- a/plugins/admin_advices/admin_advices.tpl
+++ b/plugins/admin_advices/admin_advices.tpl
@@ -1,33 +1,39 @@
-<!-- DEV TAG: not smarty migrated -->
+{if isset($ADVICE_ABOUT)}
<div class="content">
- <h2>{lang:An_advice_about} {ADVICE_ABOUT}</h2>
- <h3>{ADVICE_TEXT}</h3>
+ <h2>{'An_advice_about'|@translate} {$ADVICE_ABOUT}</h2>
+ <h3>{$ADVICE_TEXT}</h3>
<table summary="Admin advices summary">
<tr><td style="text-align: left; width: 50%;">
- <!-- BEGIN More -->
- {More.ADVICE} <br />
- <!-- END More -->
+ {foreach from=$More item=advice}
+ {$advice}<BR />
+ {/foreach}
<br />
</td><td style="text-align: right; width: 20%;">
- <!-- BEGIN thumbnail -->
- <a href="{thumbnail.U_MODIFY}" title="{lang:link_info_image}">
- <img class="thumbnail" src="{thumbnail.IMAGE}"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"></a>
+ {if isset($thumbnail.IMAGE)}
+ <a href="{$thumbnail.U_MODIFY}" title="{'link_info_image'|@translate}">
+ <img class="thumbnail" src="{$thumbnail.IMAGE}"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"></a>
</td><td style="text-align: left;">
- <img src="{thumbnail.NAME}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Name}<br />
- <img src="{thumbnail.COMMENT}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Description}<br />
- <img src="{thumbnail.AUTHOR}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Author}<br />
- <img src="{thumbnail.CREATE_DATE}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Creation date}<br />
- <img src="{thumbnail.METADATA}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Metadata}<br />
- <img src="{thumbnail.TAGS}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Tags} ({thumbnail.NUM_TAGS})
- <!-- END thumbnail -->
- </td></tr>
+ <img src="{$themeconf.icon_dir}/{$thumbnail.NAME}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Name'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.COMMENT}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Description'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.AUTHOR}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Author'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.CREATE_DATE}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Creation date'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.METADATA}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Metadata'|@translate}<br />
+ <img src="{$themeconf.icon_dir}/{$thumbnail.TAGS}check.png"
+ alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Tags'|@translate} ({$thumbnail.NUM_TAGS})
+ {/if}
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan=2>{$smarty.now|date_format:"%A, %B %e, %Y - %r"} --- Templates generated by <a href="http://www.smarty.net/" onclick="window.open(this.href, ''); return false;">Smarty</a> {$smarty.version}</td>
+ </tr>
</table>
</div>
+{/if} \ No newline at end of file
diff --git a/plugins/admin_advices/en_UK/lang.adv.php b/plugins/admin_advices/en_UK/lang.adv.php
index 0f6b697b4..80e8bd7d3 100644
--- a/plugins/admin_advices/en_UK/lang.adv.php
+++ b/plugins/admin_advices/en_UK/lang.adv.php
@@ -2,13 +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 |
// +-----------------------------------------------------------------------+
-//$lang_info['language_name'] = 'English';
-//$lang_info['country'] = ''Great Britain';
-//$lang_info['charset'] = 'iso-8859-1';
-//$lang_info['direction'] = 'ltr';
-//$lang_info['code'] = 'en';
+
global $lang;
$lang['An_advice_about'] = 'A new advice about';
$lang['Metadata'] = 'Metadata';
diff --git a/plugins/admin_advices/fr_FR/lang.adv.php b/plugins/admin_advices/fr_FR/lang.adv.php
index 350ea53b0..9ce27e0e3 100644
--- a/plugins/admin_advices/fr_FR/lang.adv.php
+++ b/plugins/admin_advices/fr_FR/lang.adv.php
@@ -2,13 +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 |
// +-----------------------------------------------------------------------+
-//$lang_info['language_name'] = 'Français';
-//$lang_info['country'] = 'France';
-//$lang_info['charset'] = 'iso-8859-1';
-//$lang_info['direction'] = 'ltr';
-//$lang_info['code'] = 'fr';
+
global $lang;
$lang['An_advice_about'] = 'Un nouveau conseil à propos de ';
$lang['Metadata'] = 'Méta-données';
diff --git a/plugins/admin_advices/main.inc.php b/plugins/admin_advices/main.inc.php
index eff6ec82a..c518821d9 100644
--- a/plugins/admin_advices/main.inc.php
+++ b/plugins/admin_advices/main.inc.php
@@ -33,12 +33,12 @@ function set_admin_advice()
// Setup Advice Language (Maybe there is already a variable)
$advlang = ( isset($user['language']) ) ?
- $user['language'] : get_default_language(); // en_UK.iso-8859-1
+ $user['language'] : get_default_language(); // en_UK
$my_path = dirname(__FILE__).'/';
$adv = array();
if ( !@file_exists($my_path."$advlang/lang.adv.php") )
{
- $advlang = 'en_UK.iso-8859-1';
+ $advlang = 'en_UK';
}
// Include language advices
@include_once( $my_path."$advlang/lang.adv.php" );
@@ -63,55 +63,42 @@ LIMIT 0, 1
{
$url_modify = get_root_url().'admin.php?page=picture_modify'
.'&amp;image_id='.$row['id'];
- $url_check = get_themeconf('icon_dir').'/';
- $url_uncheck = $url_check . 'uncheck';
- $url_check .= 'check';
- $picture_id = $row['id'];
$query = '
SELECT * FROM '.IMAGE_TAG_TABLE.'
-WHERE image_id = ' . $picture_id .'
+WHERE image_id = ' . $row['id'] .'
;';
$tag_count = mysql_num_rows(mysql_query($query));
- $template->assign_block_vars(
- 'thumbnail',
+ $template->assign('thumbnail',
array(
'IMAGE' => get_thumbnail_url($row),
'IMAGE_ALT' => $row['file'],
'IMAGE_TITLE' => $row['name'],
'METADATA' => (empty($row['date_metadata_update'])) ?
- $url_uncheck : $url_check,
+ 'un' : '',
'NAME' => (empty($row['name'])) ?
- $url_uncheck : $url_check,
+ 'un' : '',
'COMMENT' => (empty($row['comment'])) ?
- $url_uncheck : $url_check,
+ 'un' : '',
'AUTHOR' => (empty($row['author'])) ?
- $url_uncheck : $url_check,
+ 'un' : '',
'CREATE_DATE' => (empty($row['date_creation'])) ?
- $url_uncheck : $url_check,
+ 'un' : '',
'TAGS' => ($tag_count == 0) ?
- $url_uncheck : $url_check,
- 'NUM_TAGS' => (string) $tag_count,
+ 'un' : '',
+ 'NUM_TAGS' => $tag_count,
'U_MODIFY' => $url_modify,
)
);
}
$advice_text = array_shift($adv);
- $template->assign_vars(
+ $template->assign(
array(
'ADVICE_ABOUT' => '$conf[' . "'$confk'] ",
'ADVICE_TEXT' => $advice_text,
)
);
- foreach ($adv as $advice)
- {
- $template->assign_block_vars(
- 'More',
- array(
- 'ADVICE' => $advice
- )
- );
- }
- $template->parse('admin_advice');
+ $template->assign('More', $adv );
+ $template->pparse('admin_advice');
}
}
?>