Want to create your very own vBulletin powered page which includes the header, footer, and the user permissions system as well?
Well now you can
Want to know how it will look? Take a look at the attached screenshot below!
Now includes the Who's Online modification! Also, instructions included on how to create your own pages that are integrated with current vBulletin files!
I'm going to give you a generic page but you can easily modify the contents of the page by changing the template
So here we go
Instructions:
Create a new file, whatever you want to call it (let's say test.php).
Open up test.php and add the following (replace TEST with whatever template you want to show):
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'test'); // 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(
Be sure to change 'TEST' to the actual template name, and change 'test' to the filename. Also, change 'Test Page' to whatever you want to show in the navbar, such as 'Viewing Member Profile' (just an example).
Now create the template, called TEST with the following content:
Replace 'xxx' with whatever you want ?do= in the query string to be (for example, replace 'xxx' with 'showprofile' so then someone would type in example.php?do=showprofile to view this template.) Then of course, change TEMPLATE_XXX to your template name, it's that simple!
I need to include a PHP file output in my template, but
Code:
<?PHP include("filename") ?>
does not work in a template. I see this covered over and over in this thread (I did read it) but I don't understand the answer to the problem. It seems to come down to something about making a variable in the "php include start template." Can someone explain how to do that to me in detail? Thanks.
I cant get anything to work. On this mod, I get Parse errors on line 2. There inst even anything on line 2. And as for Brett, I am having problems with that thing to.
me too, I'm trying to create a page like this 1 directory up from the vbulletin one. When I try, I get a blank page, any ideas?
If you get a blank page, it could be one of several reasons. Usually when i get that, it's because I forgot to put a semicolon at the end of a line somewhere in the script. Also, since you're placing the script 1 directory up from forum directory, make sure that you're calling your required files the correct way like this:
PHP Code:
// ################## REQUIRE BACK-END ####
chdir('D:\webppliance\conf\domains\site\Inetpub\wwwroot\forum'); // path to forum dir
require_once('./global.php');
require_once('includes/class_bbcode.php');
Lets say that the test.php is called and the linked items that are displayed are links to other php pages which are articles that are written in php format.
So the issue that I have is that I can call the test.php page but when I click on a link I loose vbulletin and only have the new php page up.
Question:
How can I keep the other pages from exiting out of vb and keep the header and footer from vb displayed?