2013-12-12, 03:52 PM
2013-12-12, 04:15 PM
if it is pure php file then simple method could be to use echo for the header & footer like below
assuming that custom php file is in the forum root folder - if it is not then change path for global.php
assuming that custom php file is in the forum root folder - if it is not then change path for global.php
<?php
define('IN_MYBB', 1);
require_once ("./global.php");
echo $headerinclude;
echo "<title>______________</title>";
echo $header;
// your php file contents
echo $footer;
?>
2013-12-12, 04:17 PM
1. Create new file newpage.php
Save
2. Open your Template, and add new template.
The name "new_template"
Gluck
<?php
define('IN_MYBB', 1);
require_once("global.php");
add_breadcrumb("Your Forum - Description - New Pages", $_SERVER['PHP_SELF']);
eval("\$page = \"".$templates->get("new_template")."\";");
output_page($page);
?>
Save
2. Open your Template, and add new template.
The name "new_template"
<html>
<head>
<title>{$mybb->settings['bbname']} - Your Costum Page</title>
{$headerinclude}
</head>
<body id="forums">
{$header}
<br/>
<center><h2>Your Content Here ;D</center><br/>
<br style="clear: both" />
{$footer}
</body>
</html>
Gluck
2013-12-12, 04:25 PM
thanks both of u but i am getting error. I want to add this in a script that require other file with it and it is in http://mybb.com/tts