PDA

View Full Version : adding forum jump to a custom vb3 page


evil kev
10-17-2004, 07:50 PM
hey i'm sure this is an easy mod to do i'm just probably missing something obvious.

here's the php code for my page
<?php
include_once('chat/inc/common.php');

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'chat'); // 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(
'CHAT',
);

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

);

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

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

$navbits = array();
$navbits[$parent] = 'Chat Login';

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

$frmjmpsel['chat'] = ' selected="selected" class="fjsel"';
construct_forum_jump();
?>

and i tried just sticking $forumjump in my template but it just wouldn't appear i guess its because $forumjump hasn't been assigned to anything but i don't know where it would be assigned. any help would be excellent :)

AN-net
10-17-2004, 11:00 PM
$forumjump= construct_forum_jump();

also put that before the template print out function;)

evil kev
10-20-2004, 01:47 PM
thanks for your response! (first time i've got one here) i managed to make it work with your help, by just moving what i had done up above the print out like you said. why is that so?? (if anyone doesnt mind explaining?)

the $forumjump variable is assigned in the functions.php included in global.php so it wasn't needed to be assigned.

AN-net
10-20-2004, 04:56 PM
that is because you are already printing a page so any variables or functions after it will not be displayed on the printed out page, so if you want something to show on a printed out template/page it must be put before it in the php file. sort of like chronological order;)

evil kev
10-20-2004, 10:11 PM
ahhhhhhhhh i see! there was a true ping moment when i realised the second line of the printing out was no longer to do with navbar, and then it all became crystal :)