vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   adding forum jump to a custom vb3 page (https://vborg.vbsupport.ru/showthread.php?t=70701)

evil kev 10-17-2004 07:50 PM

adding forum jump to a custom vb3 page
 
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 Code:

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


All times are GMT. The time now is 06:16 AM.

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.00946 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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