Support Forums

how to display the template in the module

This is a discussion on how to display the template in the module within the Modules / Plugins / Modifications forums, part of the Developer Forums category; hello i am almost finish from my own module which can allow visitor to write commment in the guestbook. but ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 07-10-2009, 09:05 PM   #1
Customer
 
Abdulaziz's Avatar
 
Join Date: Sep 2008
Location: Kuwait
Posts: 61
Rep Power: 14
Abdulaziz is on a distinguished road
Default how to display the template in the module

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
__________________
Developer 4.1.9
Abdulaziz is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
google maps module/seo friendly urls module incompatibility everyounce Techconnx 2 06-24-2009 12:01 AM
V4.1.x Internet Explorer - Template Display Issues seymourjames Modules / Plugins / Modifications 5 06-09-2009 04:42 AM
how to display var array in smary template Abdulaziz Templates, HTML, CSS, and Design Help 12 05-22-2009 03:17 AM
Hook for template display()? cheesegrits Technical Support 4 01-14-2008 11:59 AM


All times are GMT -4. The time now is 10:15 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0