[NBM] Step 8: Change info plain-text to html-text (pwg designed)

git-svn-id: http://piwigo.org/svn/trunk@1118 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2006-04-01 09:42:55 +00:00
parent 7b4a6232ca
commit 68ed2ea617
3 changed files with 56 additions and 12 deletions

34
nbm.php
View file

@ -55,34 +55,46 @@ if (isset($_GET['unsubscribe'])
}
else
{
echo l10n('nbm_unknown_identifier');
exit();
/* echo l10n('nbm_unknown_identifier');
exit();*/
array_push($page['errors'], l10n('nbm_unknown_identifier'));
}
// +-----------------------------------------------------------------------+
// | infos & errors display |
// | template initialization |
// +-----------------------------------------------------------------------+
echo '<pre>';
$title = $lang['nbm_item_notification'];
$page['body_id'] = 'theNBMPage';
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames(array('nbm'=>'nbm.tpl'));
$template->assign_vars(array('U_HOME' => make_index_url()));
// +-----------------------------------------------------------------------+
// | errors & infos |
// +-----------------------------------------------------------------------+
if (count($page['errors']) != 0)
{
echo "\n\nErrors:\n";
$template->assign_block_vars('errors',array());
foreach ($page['errors'] as $error)
{
echo $error."\n";
$template->assign_block_vars('errors.error',array('ERROR'=>$error));
}
}
if (count($page['infos']) != 0)
{
echo "\n\nInformations:\n";
$template->assign_block_vars('infos',array());
foreach ($page['infos'] as $info)
{
echo $info."\n";
$template->assign_block_vars('infos.info',array('INFO'=>$info));
}
}
echo '</pre>';
// +-----------------------------------------------------------------------+
// | html code display |
// +-----------------------------------------------------------------------+
$template->parse('nbm');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>

View file

@ -12,7 +12,8 @@ BODY#theSearchPage #content,
BODY#theAboutPage #content,
BODY#thePopuphelpPage #content,
BODY#thePasswordPage #content,
BODY#theNotificationPage #content
BODY#theNotificationPage #content,
BODY#theNBMPage #content
{
margin: 1em;
}

31
template/yoga/nbm.tpl Normal file
View file

@ -0,0 +1,31 @@
<!-- $Id: admin.tpl 1091 2006-03-21 22:58:59Z rub $ -->
<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>
</ul>
<h2>{lang:nbm_item_notification}</h2>
</div>
<!-- BEGIN errors -->
<div class="errors">
<ul>
<!-- BEGIN error -->
<li>{errors.error.ERROR}</li>
<!-- END error -->
</ul>
</div>
<!-- END errors -->
<!-- BEGIN infos -->
<div class="infos">
<ul>
<!-- BEGIN info -->
<li>{infos.info.INFO}</li>
<!-- END info -->
</ul>
</div>
<!-- END infos -->
</div>