View Full Version : Error on Construct_navbits ($navbits); in a test mod
Vaupell
01-11-2009, 06:02 PM
Trying out that mod How to create your own vbulletin powerd.... (https://vborg.vbsupport.ru/showthread.php?t=62164)
first i coudnt get global to connect until i entered Full http path. then it worked.
now im getting error on navbits..
$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.
<?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
require_once(' global.php url ');
is incorrect
Vaupell
01-11-2009, 06:49 PM
Your line
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
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.