MyBB Community Forums

Full Version: Adding a new page - Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im trying to add a new page to my forum , heres what in using so far but its not working for some reason.

<?php

define('IN_MYBB', 1); // (1a)
require "./global.php"; // (1b)

add_breadcrumb("Friends Page", "friends.php"); // (2)

eval("\$friends = \"".$templates->get("friends")."\";"); // (3)
output_page($friends); // (4)
?>

And heres the template

<html>
<head>
<title>{$mybb->settings[bbname]}</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
<table width="100%" border="0">
<thead>
<tr>
<th>RULES</th>
</tr>
<tbody>
<tr>
<td>Our rules</td>
</tr>
</tbody>
</table>
{$footer}
</body>
</html>
What do you mean by, "It's not working"?
when i try to open " /friends.php" im getting a 404 error.
Is the file even called "friends.php"?...
Yes lol
This URL?? http://www.pro-coders.com/friends.php

I see no 404, the template's just empty.
Heres my template in "Global Templates"

<html>

<head>

<title>{$mybb->settings[bbname]}</title>

{$headerinclude}

</head>

<body>

{$header}

<br />

<table width="100%" border="0">

<thead>

<tr>

<th>Friends</th>

</tr>

<tbody>

<tr>

<td>Our Friends</td>

</tr>

</tbody>

</table>

{$footer}

</body>

</html>
And are you sure it's called friends?? Look at the page source, the PHP is working, it's just outputting nothing.
Template name is "friends" , Template set is "Global Templates"

I cant work it out what im doing wrong

Heres the php im using
<?php

define('IN_MYBB', 1); // (1a)
require "./global.php"; // (1b)

add_breadcrumb("friends", "friends.php"); // (2)

eval("\$friends = \"".$templates->get("friends")."\";"); // (3)
output_page($friends); // (4)
?>

I got it to work , i just deleted it all and started again , weird.