PDA

View Full Version : Isit Possible


breamy1990
04-07-2007, 09:59 PM
isit possible to have 5 vbulletin pages in my main site directionary while still having my forums in a seperate directionary

so ive got 5 vb pages in trueconsoleghosts.com using my vbulletin template and login system

and have my forum and vbadvanced all remain the same in forum.trueconsoleghosts.com ?

is this possible?

Logikos
04-07-2007, 11:10 PM
5 different installations of vB?

breamy1990
04-07-2007, 11:12 PM
its 5 different pages to match the template thats installed on my vb forum so custom pages but outside of the forums folder

Logikos
04-07-2007, 11:22 PM
Do this:

Create a file titled "vbglobal.php" with the following contents and upload it to your public_html directory. Make sure to edit the value of $forumpath to the absolute forum path.


<?php
/* ################################################## ############## *\
Created By: Ken Iovino
Email: KenIovino@gmail.com
--
Copyright ?2007 iVino, Inc. All Rights Reserved.
This file may not be redistributed in whole or significant part.
\* ################################################## ############## */

// enter the absolute forum path. (Use ending slash!)
$forumpath = "/home/name/public_html/forum/";

// move to vBulletin directory
chdir($forumpath);

// require vBulletin's core file
require_once($forumpath . 'global.php');

// bass CSS infomation
$basecss = "<base href=\"" . $vbulletin->options['bburl'] . "/\">";

?>
Then anytime you create a new file in the public_html directory, you could use this:


<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'scriptname');

// ################### 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();

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

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

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

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

?>
Make sure to edit the "template_name_here" to the template you want to use. Hope this helps.

Here is a quick default template:


$stylevar['htmldoctype']
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
$basecss
$headinclude
<title>Your Title</title>

</head>
<body>
$header
$navbar

my code here

$footer
</body>
</html>


Having the $basecss in place insures that all your links "should" point to the correct path.

- Ken Iovino

breamy1990
04-08-2007, 08:57 PM
so basically i have to create a file called vbglobal.php and put it in www.trueconsoleghosts.com

then i create another file called index.php and put the 2nd lot of code into the file and stick that in the www.trueconsoleghosts.com

then create a template in style manage in admincp ?

Logikos
04-09-2007, 12:47 AM
Yep.

breamy1990
04-09-2007, 03:14 PM
i get an error ???

http://www.trueconsoleghosts.com/index.php