Log in

View Full Version : Adding Pages


Charged
06-14-2005, 08:49 PM
Just wondered if there is an easy way to add pages using the same style as done on the forum

Can I just make a template called "page1" for example in the customer template area and then simply link to page1.php and it come up?

Also if that is possible as the froum is in a subfolder of domain.com/forum/ would that page link from domain.com/forum/page1.php or can I have it be domain.com/page1.php

or even better domain.com/page1/index.php ?

So I basically want to be able to add bits like $header and $footer to other pages to make page creation that bit easier.

I'd also like to be able to make the main domain.com use a forum marked news to have a news posting on the front page, any hints tips or where to look for help would be appreciated

And I just realised this should have been in the questions forum, so if someone wants to move it there ;]

Andreas
06-15-2005, 04:06 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=62164" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=62164</a>

Except the WOL part, it's still the same in vBulletin 3.5

Charged
06-16-2005, 11:06 PM
cheers Kirby looks like its just what i was after ;]

dsotmoon
10-11-2005, 05:38 PM
is there a way to do this outside the forum directory?

Andreas
10-11-2005, 05:49 PM
Yes.
require_once('/path/to/forum/global.php');

dsotmoon
10-11-2005, 06:16 PM
this is what i have but i cant get it to work outside the forum directory

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test.php'); // 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('/home/fullsize/public_html/forum/global.php');

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

$navbits = array();
$navbits[$parent] = 'Test Page';

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

?>

Adrian Schneider
10-11-2005, 06:18 PM
chdir('/path/to/forums');
require_once('./global.php');

dsotmoon
10-11-2005, 06:27 PM
chdir('/path/to/forums');
require_once('./global.php');


ok, that got me a little closer...

outside the forum ... edit

inside the forum ... edit

the latter looks exactly the way i want it to look outside the forum, both are using the same 'test' template

Andreas
10-11-2005, 06:30 PM
You must adjust the path for the CSS.

dsotmoon
10-11-2005, 06:44 PM
You must adjust the path for the CSS.

thank you Kirby and sirAdrian, got it working perfectly now

thanks again!