Log in

View Full Version : Problem adding a links section in vb - Almost there


RVSmarter
04-04-2005, 11:22 PM
Hello,

I am trying to add a link section to my forum: www.mathhelpforum.com it seems to only work when the viewer is logged in. When viewing as a guest i get this error:

Unable to add cookies, header already sent.
File: /home/mathhelp/public_html/math-help/links.php
Line: 2

I made a custom template called links:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<h3>Link to www.mathhelpforum.com</h3>

<h3>Resources</h3>
<P>

$footer
</body>
</html>

The code that I use in my links.php page is:

<title>RV Forum - RVing Tips for RVers</title><?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') . '");');

?>


Any help is greaty appreciated.
Thanks,
Dave

cinq
04-05-2005, 01:38 AM
Try removing the :

<title>RV Forum - RVing Tips for RVers</title>

in front of

<title>RV Forum - RVing Tips for RVers</title><?php

RVSmarter
04-05-2005, 02:40 PM
That worked!!

Thank you very much, I would have never realised that.

Dave