vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Creating Links page on VB - Almost there (https://vborg.vbsupport.ru/showthread.php?t=79179)

RVSmarter 04-01-2005 05:03 PM

Creating Links page on VB - Almost there
 
Hello,

I have created a page called links.php (here is the code):

<?php
// GO TO FORUM DIR
chdir('/home/talco/public_html/rv-forum/');
// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'links');
require_once('./global.php');
// GENERIC_SHELL VARS
$pagetitle = "Resources";
$HTML = ""; // PIECED TOGETHER IN SCRIPT
//eval('$HTML = "' . fetch_template('header') . '";');
$navbits = array();
$navbits[$parent] = 'Links';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('GENERIC_SHELL') . '");');
?>

It looks good, however I don't know how to add my html links in between the header and the footer.

I now have a page with only the header and footer.

Do I need to call a custom template? If so how do I create one and then call it.

Thanks for the help

David

ramprage 04-01-2005 08:10 PM

Once you find the meaning of life, I mean the answer to life... errmm the answer to this question I'd really like to know as well, I want to do a similar thing.

Cheers man

RVSmarter 04-01-2005 08:16 PM

I am getting Close. I have the following code:
<?php

// ####################### SET PHP ENVIRONMENT ###########################

error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('NO_REGISTER_GLOBALS', 1);

define('THIS_SCRIPT', 'Links'); // 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(

'index',

);

// pre-cache templates used by specific actions

$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################

require_once('./global.php');

// ################################################## #####################

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

// ################################################## #####################

$navbits = array();

$navbits[$parent] = 'Links';

$navbits = construct_navbits($navbits);

eval('$navbar = "' . fetch_template('navbar') . '";');

eval('print_output("' . fetch_template('links') . '");');

?>

However when I guest views this page i.e. not logged in the following error is shown:
Unable to add cookies, header already sent.
File: /home/mathhelp/public_html/math-help/links.php
Line: 2

When I log it then the error is gone and it works great.

Any ideas?


All times are GMT. The time now is 03:55 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.01091 seconds
  • Memory Usage 1,713KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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