| Author |
Post |
|
|
#1 Tue Jul 15, 2008 9:08 pm
|
|
Member
Registered: Feb 2008
Posts: 8
Location: Bristol, UK
|
Hey All. I'm trying to create a 'About Us' page including header and footer, but i'm having a few problems.. I picked up some coding from here: http://www.usebb.net/community/topic-1996.htmlAnd i'm stuck when it comes to using $template->add_raw_content(); I get this error: E_WARNING - Missing argument 1 for template::add_raw_content(), called in about.php on line 15 and defined Heres the code i'm using: <? define('INCLUDED', false); define('ROOT_PATH', './'); require(ROOT_PATH.'sources/common.php');
$template->add_raw_content(); $session->update('PageAbout'); require(ROOT_PATH.'sources/page_head.php'); $template->set_page_title($lang['PageAbout']); ?>
Content Here .......
<? require(ROOT_PATH.'sources/page_foot.php'); ?> Please could someone point me in the right direction? - David _______________ -- David G,, UseBB "Wannabe Guru"
|
|
|
#2 Wed Jul 16, 2008 1:17 am
|
|
Moderator
Registered: Oct 2005
Posts: 502
Location: Canada
|
The $template->add_raw_content() function is where you would place your content. See: <? define('INCLUDED', false); define('ROOT_PATH', './'); require(ROOT_PATH.'sources/common.php');
$session->update('PageAbout'); require(ROOT_PATH.'sources/page_head.php'); $template->set_page_title($lang['PageAbout']);
//Your content goes inside the function $template->add_raw_content('Content Here....');
$template->add_raw_content('More content...');
require(ROOT_PATH.'sources/page_foot.php'); ?>
|
|
|
#3 Wed Jul 16, 2008 2:41 am
|
|
Member
Registered: Feb 2008
Posts: 8
Location: Bristol, UK
|
Ah now i see how it's done. Thanks tons for the help Gaia, all is working ok now  _______________ -- David G,, UseBB "Wannabe Guru"
|
|
|
#4 Mon Aug 04, 2008 3:02 pm
|
|
Member
Registered: Aug 2008
Posts: 8
|
Hey guys can you tell me how to do this I used the source code above it and it wont work.. i get this error E_NOTICE - Undefined index: PageAbout
|
|
|
#5 Mon Aug 04, 2008 9:35 pm
|
|
Moderator
Registered: Oct 2005
Posts: 502
Location: Canada
|
It's most likely due to this line: $template->set_page_title($lang['PageAbout']); Make sure you add the variable PageAbout to your language file, or change it to something else: $template->set_page_title('Your Page Title');
|
|
|
#6 Tue Aug 05, 2008 4:04 pm
|
|
Member
Registered: Aug 2008
Posts: 8
|
that fixed it i get how it works now thanks!
|
|
|
#7 Tue Aug 05, 2008 10:22 pm
|
|
Member
Registered: Aug 2008
Posts: 8
|
oh wait actually i just noticed something all the text seems to be centered im not sure why is there a way for it not to be centered?
|
|
|
#8 Wed Aug 06, 2008 3:55 am
|
|
Moderator
Registered: Oct 2005
Posts: 502
Location: Canada
|
I wouldn't be able to say, the above code doesn't have any type of center declarations. Either post the code you have, or provide a link to the page.
|
|
|
#9 Wed Aug 06, 2008 7:31 am
|
|
Member
Registered: Aug 2008
Posts: 8
|
The url is: http://opensourcesetup.com/community/a.phpand the code is below thanks for helping me out //Your content goes inside the function $template->add_raw_content('<table width="98%" border="0" cellspacing="0" cellpadding="12" style="border: 1px solid #e0e0e0;"><tr><td bgcolor="#EFF2F9">Welcome to Open Source Setup! Our team of open source experts provide you with <b>100% FREE WEB HOSTING</b>. We require NO Ads or Links of any kind. The OpenSourceSetup team specializes in web hosting for open source scripts such as content management systems, bulletin & forum boards, image & video galleries, web blogs, and more. Open source web scripts are normally updated frequently and free to use. If you have any questions feel free to ask on our support forum!<br><br><a href="http://www.opensourcesetup.com/free.php"><b><font size="3">Sign Up For Your Free Account Now!</font></b></a></font><br><br></td></tr></table> <br /><table width="98%" border="0" cellpadding="6" cellspacing="0" style="border: 1px solid #e0e0e0;"> <tr> <td valign="top" border="1" bgcolor="#EFF2F9"> <img width="65px" height="65px" src="http://www.opensourcesetup.com/templates/portal/images/fantastico.jpeg" /> </td> <td valign="middle" border="1" bgcolor="#EFF2F9">OpenSourceSetup provides Fantastico free of charge! Fantastico is an amazing application that gives its users the ability to automatically install various open source applications. Using Fantastico saves countless hours of installation headaches and procedures. Each script is just a few clicks away from install. The hassles of setting up databases, importing structure and chmoding files is now over!</td> </tr> </table> <br /> <table width="98%" border="0" cellpadding="12" cellspacing="0" style="border: 1px solid #e0e0e0;"> <tr> <td align="center" valign="top" border="1" bgcolor="#EFF2F9"> <img src="http://www.opensourcesetup.com/templates/portal/images/opensourceicons.gif" /> </td> </tr> </table><br><br>');
|
|
|
#10 Wed Aug 06, 2008 3:34 pm
|
|
Moderator
Registered: Oct 2005
Posts: 502
Location: Canada
|
Try changing it to this: //Your content goes inside the function $template->add_raw_content('<table width="98%" border="0" cellspacing="0" cellpadding="12" style="border: 1px solid #e0e0e0;text-align:left;"><tr><td bgcolor="#EFF2F9">Welcome to Open Source Setup! Our team of open source experts provide you with <b>100% FREE WEB HOSTING</b>. We require NO Ads or Links of any kind. The OpenSourceSetup team specializes in web hosting for open source scripts such as content management systems, bulletin & forum boards, image & video galleries, web blogs, and more. Open source web scripts are normally updated frequently and free to use. If you have any questions feel free to ask on our support forum!<br><br><a href="http://www.opensourcesetup.com/free.php"><b><font size="3">Sign Up For Your Free Account Now!</font></b></a></font><br><br></td></tr></table> <br /><table width="98%" border="0" cellpadding="6" cellspacing="0" style="border: 1px solid #e0e0e0;text-align:left;"> <tr> <td valign="top" border="1" bgcolor="#EFF2F9"> <img width="65px" height="65px" src="http://www.opensourcesetup.com/templates/portal/images/fantastico.jpeg" /> </td> <td valign="middle" border="1" bgcolor="#EFF2F9">OpenSourceSetup provides Fantastico free of charge! Fantastico is an amazing application that gives its users the ability to automatically install various open source applications. Using Fantastico saves countless hours of installation headaches and procedures. Each script is just a few clicks away from install. The hassles of setting up databases, importing structure and chmoding files is now over!</td> </tr> </table> <br /> <table width="98%" border="0" cellpadding="12" cellspacing="0" style="border: 1px solid #e0e0e0;"> <tr> <td align="center" valign="top" border="1" bgcolor="#EFF2F9"> <img src="http://www.opensourcesetup.com/templates/portal/images/opensourceicons.gif" /> </td> </tr> </table><br><br>');
|
|
|
#11 Wed Aug 06, 2008 3:52 pm
|
|
Member
Registered: Aug 2008
Posts: 8
|
nice what did you change?
|
|
|
#12 Wed Aug 06, 2008 4:38 pm
|
|
Member
Registered: Aug 2008
Posts: 8
|
nevermind figured it out thanks
|