Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [How To?] Add MyBB header & Footer in a Custom PHP Page
#1
Not Solved
How to Add MyBB header & Footer in a Custom PHP Page
Please tell me the code by that i can put mybb header & Footer in my custom page..
#2
Not Solved
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
<?php
define('IN_MYBB', 1);
require_once ("./global.php");
echo $headerinclude;
echo "<title>______________</title>";
echo $header;

// your php file contents

echo $footer;
?>
#3
Not Solved
1. Create new file newpage.php
<?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
#4
Not Solved
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


Forum Jump:


Users browsing this thread: 1 Guest(s)