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 was trying to add this to the php file and show up in the "TEST" template.
Can anyone could give me a hand on how to make it VB3 friendly. :cross-eyed:
PHP Code:
<?
$contribreport=mysql_query("SELECT userid,username,contrib FROM user WHERE contrib='1' ORDER BY userid");
while(list($userid,$username,$contrib)=mysql_fetch_row($contribreport)){
I was trying to add this to the php file and show up in the "TEST" template.
Can anyone could give me a hand on how to make it VB3 friendly. :cross-eyed:
PHP Code:
<?
$contribreport=mysql_query("SELECT userid,username,contrib FROM user WHERE contrib='1' ORDER BY userid");
while(list($userid,$username,$contrib)=mysql_fetch_row($contribreport)){
Very nice job on this, I finally got around to adding all the miscellaneous forum policies and a few subpages and this was just what the doctor ordered to accomplish it!
Gary, looks like a great mod... i have a question though
Would it be possible to call an external html page to be included within instead of using templates?
Well then there wouldn't be a header or footer, so no point in using this mod then I'd suggest copying the HTML and placing into the body of my template
Alright... vB newbie here, and this question is so basic, it almost makes me feel dirty...
Quote:
Originally Posted by Gary W
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:
Here's my (oh so humble ) question... I'm looking everywhere, and I'm very confused about templates, and the Template Manager. First of all, is the Template Manager the same thing as the Style Manager? And regardless of that, the above code doesn't look like somethign that would be dealt with in the Style Manager anyway... at least not anywhere I can find. Do I need to save this as a template file in my code source (can't find a place it would make sense for it to go), and if not, where would I drop it in in the Style Manager?
Alright... vB newbie here, and this question is so basic, it almost makes me feel dirty...
Here's my (oh so humble ) question... I'm looking everywhere, and I'm very confused about templates, and the Template Manager. First of all, is the Template Manager the same thing as the Style Manager? And regardless of that, the above code doesn't look like somethign that would be dealt with in the Style Manager anyway... at least not anywhere I can find. Do I need to save this as a template file in my code source (can't find a place it would make sense for it to go), and if not, where would I drop it in in the Style Manager?
Style Manager manages several styles. Each style contains hundreds of templates Let me know if that doesn't help, but should at least set you off on the right foot!