1
I have 2 smarty templates for editing and deleting records (confirmation), which should show the record and edit or delete it: /templates/admin_areas_edit.html and /templates/admin_areas_delete.html
So, i decided to write 3rd template for displaying current record - /templates/admin_areas_form.html - which is used by both modules to optimize code.
Main script is admin_areas.php, which in case of $action parameter shows one of another template:
if ($action == "edit")
{
//start edit record
// include template
$xoopsOption['template_main'] = 'admin_areas_edit.html';
// ...
}
else
{
//confirm deleting
// include template
$xoopsOption['template_main'] = 'admin_areas_delete.html';
// ...
}
Both templates include 3rd and set some parameters:
<{include file="db:admin_areas_form.html" ok_name="edit_done" ok_value="Edit" no_value="Reset" action="edit"}>
Templates 'admin_areas_form.html' is also listed in xoops_version.php.
So, after instaling module (PHP debug mode), it's installed with 2 messages in installation log:
Warning [Xoops]: Smarty error: unable to read resource: "db:admin_areas_form.html" in file class/smarty/Smarty.class.php line 1084
Scripts work right without any debug errors or bugs.
Why so and is it important?