vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Error on Construct_navbits ($navbits); in a test mod (https://vborg.vbsupport.ru/showthread.php?t=201431)

Vaupell 01-11-2009 06:02 PM

Error on Construct_navbits ($navbits); in a test mod
 
Trying out that mod How to create your own vbulletin powerd....

first i coudnt get global to connect until i entered Full http path. then it worked.

now im getting error on navbits..

Code:

$navbits = array();
$navbits[$parent] = 'test';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('test') . '");');

and yes i named the template 'test'
for the test purpose..
then i thought proberly some directory issue.

but i got test.php in both forums/test.php and in folder under forum
same error every time..

Fatal error: Call to undefined function construct_navbits() in URL on line 42


and line 42 is the $navbits = construct_navbits($navbits);

Suggestions ?

Lynne 01-11-2009 06:26 PM

Can we see your full php code?

Vaupell 01-11-2009 06:31 PM

Ofcourse ;) nothing additional than from the mod..

template is named test in all skins and contain excaktly the same info as mod.

Code:

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(
   
);

// pre-cache templates used by all actions
$globaltemplates = array(
    'test',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once(' global.php url ');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################


$navbits = array();
$navbits[$parent] = 'test';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('test') . '");');

?>

So only thing i change is

Line 8 - - define('THIS_SCRIPT', 'test');
Line 23 - 'test'
Line 32 - Global url
Line 40 - $navbits[$parent] = 'test';
Line 44 - eval('print_output("' . fetch_template('test') . '");');

If anything then just a blank page right,, not an error.

Bellardia 01-11-2009 06:45 PM

Your line
Code:

require_once(' global.php url ');
is incorrect

Vaupell 01-11-2009 06:49 PM

Quote:

Originally Posted by Bellardia (Post 1708847)
Your line
Code:

require_once(' global.php url ');
is incorrect


im not really sure if im gonna respond to that.
i chose not to.

Edit : changed my mind, i am..

Ofcourse, no sense in showing internal file links
ewen if it is extremely and logical to find out, no reason to tempt fate.
and if you read post #1 i said that was working fine. the problem is the
navbits.

Bellardia 01-11-2009 06:51 PM

Was unaware if it was intentional or not. My apologies if it wasn't ;p

Vaupell 01-11-2009 06:55 PM

Quote:

Originally Posted by Bellardia (Post 1708856)
Was unaware if it was intentional or not. My apologies if it wasn't ;p

No worries, it is allright :D:up:

Dismounted 01-12-2009 03:31 AM

The include of global.php should be just "./global.php". You need to change the current working directory first, though. Use chdir() to do this.


All times are GMT. The time now is 03:51 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.01074 seconds
  • Memory Usage 1,731KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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