Evil,
vBindex is completely different. Basically you have to make it a stand alone file and then include it in the template.
I have it just about worked out, but it's only returning the first time. Here is what my toptimes.php looks like (the part that matters)
PHP Code:
require_once('./global.php');
$pos = 0;
$users=$DB_site->query("SELECT *
FROM " . TABLE_PREFIX . "user AS user, " . TABLE_PREFIX . "userfield AS userfield
WHERE user.userid = userfield.userid
AND userfield.field55>0
ORDER BY userfield.field55 ASC
LIMIT 5");
// Set up vars
while($userinfo=$DB_site->fetch_array($users)) {
$pos++;
$rank= number_format($pos);
$TDusername= $userinfo[username];
$year= $userinfo[field5];
$model= $userinfo[field8];
$trim= $userinfo[field9];
if($userinfo[field52] > 0) {
$sixty= $userinfo[field52];
}
else {
$sixty="";
}
if($userinfo[field55] > 0) {
$quarter= $userinfo[field55];
}
else {
$quarter="";
}
if($userinfo[field56] > 0) {
$atmph2="@";
}
else {
$atmph2="";
}
if($userinfo[field56] > 0) {
$quartermph= $userinfo[field56];
}
else {
$quartermph="";
}
eval('$times .= "' . fetch_template('vbindex_times') . '";');
eval('print_output("' . fetch_template('vbindex_toptimes') . '");');
}
?>
You can see it on my site:
http://www.modernengineuity.com