hello
i am almost finish from my own module which can allow visitor to write commment in the guestbook. but i have problem when i want to assign 'body' to the template file. this problem only in the addcomment.php
the index.php it's work very well and there isn't any problem there it's only appear with me when i want call the link " /modules/gustbook/addcomment.php "
look at the error" Warning: Smarty error: unable to read resource: "/modules/gustbook/templates/addcomment.tpl" in /home/q8board/public_html/includes/classes/smarty/Smarty.class.php on line 1092"
and this is the code in the file addcomment.php
PHP Code:
<?php
include ($_SERVER['DOCUMENT_ROOT'] . '/modules/gustbook/includes/class.php');
include ($_SERVER['DOCUMENT_ROOT'] . '/includes/init.php');
$gustbook = new Guestbook();
if(isset($_POST['action']) && $_POST['action']=="add") {
$gustbook->AddNewRecord();
$msg= 'Thank you for add comment in our site.';
$class_tpl->assign('msg',$msg);
$class_tpl->assign('body','/modules/gustbook/templates/msg.tpl');
$class_tpl->display('layout.tpl');
} else {
$class_tpl->assign('body','/modules/gustbook/templates/addcomment.tpl');
$class_tpl->display('layout.tpl');
}
?>
so any idea to solve this problem please