PDA

View Full Version : View Ranksets


DigitalDesktops
04-16-2003, 11:43 PM
Hi, i'm making an addon for this hack:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=27167&highlight=lob

and everything is working i think except that the page is blank. can anyone help me?

<?php
error_reporting(7);

require("./global.php");

if (isset($action)==0) {
$action="view_categories";
}

// ###################### View the rankset categories #######################
if ($action=="view_categories") {

// Lets query the database:
$rankset_db=$DB_site->query("SELECT cat_id, cat_name, cat_creator, cat_description, cat_ranks FROM rankcategories WHERE cat_id IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19) ORDER BY cat_name ASC");




while ($rankset_db2=$DB_site->fetch_array($rankset_db)){
eval("dooutput(\"".gettemplate('display_ranks_bit')."\");");
}




}
unset($output_cats);

while ($rankset_db2=$DB_site->fetch_array($rankset_db)) {
eval ('$output_cats .= "'.gettemplate("display_ranks_bit").'";');
}

dooutput($output_cats);
?>

Floris
04-17-2003, 12:08 AM
Time to check your conditions or missing/empty templates.

Stadler
04-17-2003, 10:20 PM
mmh ... try using this:unset($output_cats);

while ($rankset_db2=$DB_site->fetch_array($rankset_db)) {
eval ('$output_cats .= "'.gettemplate("display_ranks_bit").'";');
}

dooutput($output_cats);

DigitalDesktops
04-17-2003, 10:22 PM
heres the template im using:

Stadler
04-17-2003, 10:34 PM
You should have replaced the old while-part:<?php
error_reporting(7);

require("./global.php");

if (isset($action)==0) {
$action="view_categories";
}

// ###################### View the rankset categories #######################
if ($action=="view_categories") {

// Lets query the database:
$rankset_db=$DB_site->query("SELECT cat_id, cat_name, cat_creator, cat_description, cat_ranks FROM rankcategories WHERE cat_id IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19) ORDER BY cat_name ASC");

unset($output_cats);

while ($rankset_db2=$DB_site->fetch_array($rankset_db)) {
eval ('$output_cats .= "'.gettemplate("display_ranks_bit").'";');
}
dooutput($output_cats);
}
?>I hope, it works then.

DigitalDesktops
04-17-2003, 10:41 PM
cool, thanks it worked :)

Stadler
04-17-2003, 11:01 PM
For your question in IRC:

If you want the Navbar to be displayed, replace<?php
error_reporting(7);

require("./global.php");with<?php
error_reporting(7);

require("./global.php");

// Make first part of Chat Nav Bar
$nav_url="";
$nav_title="Chat";
eval('$navbits = "'.gettemplate('nav_linkoff').'";');
eval('$navbar = "'.gettemplate("navbar").'";');and Make sure, you restore the code for the navbar in the template.

[Edit:]Hu? What happened to error_reporting(7);? did somebody eat it? o.O"