1
hey guys,
i've been working on hacking all the XOOPS code for my site for better control using templates rather then beign hardcoded
sofar i have this
function xoops_error($messages = null, $title = null)
{
global $xoopsOption, $xoopsTpl;
$xoopsOption['template_main'] = "system_messages.html";
include XOOPS_ROOT_PATH.'/header.php';
if ($title != '')
{
$xoopsTpl->assign('title', $title);
}
$xoopsTpl->assign('messages', $messages);
include XOOPS_ROOT_PATH."/footer.php";
}
and the template is
<{if is_array($messages)}>
<div class="pm-notify-new"><div class="pm-notify-header"><{$title}>div>
<{section name=message loop=$messages}>
<{$messages[message]}>
<{/section}>
div>
<{else}>
<div class="pm-notify-new">
<div class="pm-notify-header"><{$title}>div>
<{$messages}>
div>
<{/if}>
i even tried foreach rather then section but it shows 1 error but not the array of error messages like the original function
Steve :)