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 had the same style problem on my page outside of the forum. Copying the clientscript and images folders in the directory the test.php page resides seemed to correct that.
The problem I can't figure out though... the links in the navbar and footer portion of the test page do not link properly if the page is outside of the forum folder. The address is missing the forum portion of the URL. Example: link leads to http://www.yourdomain.com/register.php when it should lead to http://www.yourdomain.com/forum/register.php.
$vboptions[homeurl]/
"also needs to be added to the beginning of all the relative links in the navbar and footer templates."
If I have to copy any script out there, I'm not even going to mess with it. I did have use for it if I could get it to work though. I'm also going to use it within my forum dir for two or three pages that I need too. Will start working on those tonight!
I have removed the following code from the PHP file and it still works. Could you tell me what the purpose of this code is and what it does?
Code:
// ################### 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(
);
They save you queries; yes you can remove them, but they are there as 'fillers' so you can put in yourown values if you ever need to.
They are for phrasegroups, and also for template-cache; meaning if you put your template names there then you will save 1 extra query.
They save you queries; yes you can remove them, but they are there as 'fillers' so you can put in yourown values if you ever need to.
They are for phrasegroups, and also for template-cache; meaning if you put your template names there then you will save 1 extra query.
The reason I asked this is because shortly after I install this mod and replaced it with the other version I was using I started getting MYSQL errors. I narrowed down where the errors were coming from. They were coming from to much memory being used. So I removed this mod and put the other version back in and now I have not had any problem any MYSQL errors. I don't know if this was just coindence or not. But I like this version of the mod here and would like to reinstall it. But I am afraid to put it back in because the errors might come back. The other mod that I am using now it pretty much identical to this mod except for the lines I asked about.
I will switch back over and reinstall it again later this week and see if the errors come back. I hope they do not. I like this version of the hack. I will keep you posted.
is it possible to get the member age (if specified by the user in in his options) to show on the page...and is it possible to get the contact column from memberlist.php to work on this custom page? if so...how?
is it possible to get the member age (if specified by the user in in his options) to show on the page...and is it possible to get the contact column from memberlist.php to work on this custom page? if so...how?
Is this for the person viewing the page or for making a page about a specific member?
To display the info about whoever is viewing the page (if they're a member) shouldn't be too hard.