2011-02-02, 02:49 AM
I wanted to build a new page that uses MyBB. So far I have:
I added groups.php to the array $valid on global.php because I thought I was supposed to. The only link that shows up is User CP. I also need to know how to put the Powered By MyBB notice at the bottom of the page. On all the default pages the notice prints fine. Sorry if I am posting this in the wrong section.
<?php
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'groups.php');
require("global.php");
echo "<body style='background-color:#000077; color:white'>$username<br />";
$query="SELECT * FROM mybb_users WHERE username='$username'";
mysql_query($query);
$userinfo=mysql_query($query);
$num=mysql_numrows($userinfo);
$group=mysql_result($userinfo,0,"usergroup");
/*Build the navbar*/
if ($num<1)
{
echo "<a href='/usercp.php'>User CP - </a>";
if ($group==3 || $group==4 || $group==6)
{
echo "<a href='/modcp.php'>Mod CP - </a>";
}
if ($group==4 || $group==3)
{
echo "<a href='/admincp.php'>Admin CP</a>";
}
}
/*More things specific to what the page does.*/
?>
I added groups.php to the array $valid on global.php because I thought I was supposed to. The only link that shows up is User CP. I also need to know how to put the Powered By MyBB notice at the bottom of the page. On all the default pages the notice prints fine. Sorry if I am posting this in the wrong section.