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!
this time after resetting the php to what it defaults to in the beginning of the tutorial. and i also did the style change.
RESULTS TIME: still a plain white page. so i decided to see the source of that blank page and i got
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>
well i have no idea whats going on. really need some help on this. i have done the tutorial just as it had stated and the test.php well its in the forum directory.. but its still not doing anything! im really lost but need this for my site.
where do i put the second part of the tut if it doesnt explain really where to put it.. header, footer, includes. where?
100% wont do it. It will just stretch to 100% of the users browser window. The code for making the iframe adjust to the size of the content is at Dynamic Drive. http://www.dynamicdrive.com/dynamici...iframessi2.htm
Thanks, that only works on IE, so i won't bother with that at this stage - thanks
--------------- Added [DATE]1211384723[/DATE] at [TIME]1211384723[/TIME] ---------------
Quote:
Originally Posted by CommanderFluffy
this time after resetting the php to what it defaults to in the beginning of the tutorial. and i also did the style change.
RESULTS TIME: still a plain white page. so i decided to see the source of that blank page and i got
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>
well i have no idea whats going on. really need some help on this. i have done the tutorial just as it had stated and the test.php well its in the forum directory.. but its still not doing anything! im really lost but need this for my site.
where do i put the second part of the tut if it doesnt explain really where to put it.. header, footer, includes. where?
Okay, I think I understand what the problem is. It doesn't explain where to put it, because your supposed to create a new template with the template code provided. Your page is coming up blank because it's trying to fetch a template that you havn't created yet.
Quote:
Originally Posted by Gary King
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:
ok so now that i figured out that you have to have your test style witch i thought was the template. have the default style set to the main style for your setting... i had the wrong style set. and i thought the style was the template how to fix that tell them how to make a template! cause i didnt know how!
I'm not entirely sure I understand what you just said, but just in case, you create this template for each style the page will be using. You don't have to create a test or new style. Just a new template for each style your using.