I installed the plugin top posters which is shown in the board statistics but how do I shift the top posters onto a custom php page which I made. I managed to get it to show the variables in the correct places but how do I get it so that page understands what those variables are?
Are you using plugin's templates on your new page ?
No, this is a completely new file.
Would you like to paste the entire code here?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
/* <![CDATA[ */
table
{
border-color: #B0ACBB;
border-style: solid;
border-width: 1px 1px 1px 1px;
border-spacing: 0;
border-collapse: collapse;
}
td
{
margin: 0;
padding: 4px;
border-width: 1px 1px 1px 1px;
background-color: #CFDEF6;
}
/* ]]> */
</style>
<style type="text/css">
#left {
margin-right: 153px;
}
#right {
margin-left: 150px;
}
#left_wrapper {
width: 70%;
margin-right: -150px;
float: left;
position: relative;
z-index: 0;
}
#right_wrapper {
width: 39.9%;
float: left;
position: relative;
z-index: 1;
}
</style>
<script language="JavaScript" type="text/javascript" src="/prochatrooms/chat.js"></script>
<script type="text/javascript">
var ctr=0;
function openpopup(popurl){
var winName = "win_"+(ctr++);
winpops=window.open(popurl,winName,"width=300,height=370,resizable=no,scrollbars=no")
}
</script>
</head>
<?php
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'index.php');
$templatelist = "index,index_whosonline,index_welcomemembertext,index_welcomeguest,index_whosonline_memberbit,forumbit_depth1_cat,forumbit_depth1_forum,forumbit_depth2_cat,forumbit_depth2_forum,forumbit_depth1_forum_lastpost,forumbit_depth2_forum_lastpost,index_modcolumn,forumbit_moderators,forumbit_subforums,index_welcomeguesttext";
$templatelist .= ",index_birthdays_birthday,index_birthdays,index_pms,index_loginform,index_logoutlink,index_stats,forumbit_depth3,forumbit_depth3_statusicon,index_boardstats";
require_once("topics/global.php");
?>
<body>
<div id="left_wrapper">
<div id="left">
<p><table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td class="trow1" align="left" valign="middle" cellspacing="0" style="background-color:#CFDEF6" border="0"> <?php
echo "<img class='top' style=\"border:2px solid white;\" src='/topics/{$mybb->user['avatar']}' alt='Avatar' title='{$mybb->user['username']} 's Avatar' alt=\"\" width='100' height='100''>\n";
?><td width="91%" valign="top" style="background-color:#CFDEF6"><strong><font size='3pt'>Welcome back, <?php
echo "".$mybb->user["username"]."!</strong></font>\n";
?><br><br>Mail: <?php
echo "{$mybb->user["pms_unread"]}";
?><br>Ribbits: <?php
echo "{$mybb->user['newpoints']}";
?><br>Gifts: 0<br><br>
Enjoy more features as a VIP member!</td>
</tr></table><br>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td class="trow1" align="left" valign="top" cellspacing="0" style="background-color:#497BA8" border="0">
<center><b><font color="#ffffff">Latest forum discussions</font></b><br><br><font color="#ffffff">This section is coming soon!</font></center></td>
</tr></table><br>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td wialign="left" colspan="2"></td><td><b><center>Featured Rooms</center></b></td><td></td></tr>
<tr>
<th style="background-color:#CFDEF6"></th>
<th align="left" style="background-color:#CFDEF6">Room</th>
<th align="left" style="background-color:#CFDEF6">Topic</th>
<th align="left" style="background-color:#CFDEF6">Users</th>
</tr>
<tr>
<td><img src="http://icons.iconarchive.com/icons/fasticon/comic-iphone/32/chat-icon.png" align="top"></td>
<td><a href="http://frogga.co.uk/topics/misc.php?page=Chat-Lobby" onclick="openpopup(this.href);return false;"><b><font color="#497BA8">Lobby</font></b></a></td>
<td>English speaking room.</td>
<td><iframe src="http://www.frogga.co.uk/prochatrooms/online.php" width="50" height="20" frameborder="0"></iframe></td>
</tr>
<tr>
<td><img src="http://icons.iconarchive.com/icons/fasticon/comic-iphone/32/chat-icon.png" align="top"></td>
<td><a href="http://frogga.co.uk/topics/misc.php?page=Chat-Flirt" onclick="openpopup(this.href);return false;"><b><font color="#497BA8">Flirt</font></b></a></td>
<td>Laid back chat, adults only.</td>
<td><iframe src="http://www.frogga.co.uk/prochatrooms2/online.php" width="50" height="20" frameborder="0"></iframe></td>
</tr>
<tr>
<td><img src="http://icons.iconarchive.com/icons/fasticon/comic-iphone/32/chat-icon.png" align="top"></td>
<td><a href="http://frogga.co.uk/topics/misc.php?page=chat-teenz" onclick="openpopup(this.href);return false;"><b><font color="#497BA8">Teenz</font></b></a>
<td>A room just for teens. 13-18 years of age only.</td>
<td><iframe src="http://www.frogga.co.uk/prochatrooms3/online.php" width="50" height="20" frameborder="0"></iframe></td>
</tr>
</table>
<br>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td class="trow1" align="left" valign="top" cellspacing="0" style="background-color:#497BA8" border="0">
<center><b><font color="#ffffff">Featured Members</font></b><br><br><font color="#ffffff">
<?php
echo "{$templates->get('ttp_index')}";
?>
</font></center></td>
</tr></table>
</p>
</div>
</div>
<div id="right_wrapper">
<div id="right">
<p><table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="91%" valign="top" style="background-color:#CFDEF6"><b><center>Users online now!</center></b><iframe src='http://www.frogga.co.uk/topics/online.php' width='300' height='300' style='border: 0px'>
</tr></table>
</p>
</div>
</div>
</body>
</html>
That's the messy code.
Change;
require_once("topics/global.php");
to;
require_once("./global.php");