vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   View Ranksets (https://vborg.vbsupport.ru/showthread.php?t=51709)

DigitalDesktops 04-16-2003 11:43 PM

View Ranksets
 
1 Attachment(s)
Hi, i'm making an addon for this hack:
https://vborg.vbsupport.ru/showthrea...&highlight=lob

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

PHP Code:

<?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:
PHP Code:

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

1 Attachment(s)
heres the template im using:

Stadler 04-17-2003 10:34 PM

You should have replaced the old while-part:
PHP Code:

<?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 Code:

<?php
error_reporting
(7);

require(
"./global.php");

with
PHP Code:

<?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"


All times are GMT. The time now is 09:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01083 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete