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'm having trouble getting this working.
Am getting the following errors (below).
=======
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: navbar in [path]/includes/functions.php on line 3957
Parse error: syntax error, unexpected T_STRING in /home/bostonwh/public_html/adhub1.php(42) : eval()'d code on line 1
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: adhub1 in [path]/includes/functions.php on line 3957
=======
The last part of my custom php file (named adhub1.php) is as follows (see just below):
(and I do have a template named 'adhub1'.)
Any ideas ?
I must be missing something simple.
Thanks.
If I turn Gzip off in VBadmin then the custom page shows up, but then I have no compression and a slow site, how can i get the custom page to show up with th egzip enabled? Thanks
Quote:
Originally Posted by jimjam
Hi I am using VB 3.84, I have followed the instructions but getting this error when i go to the page, any ideas, thanks
Can anyone explain how to use this approach to get an OScommerce installation (that lives outside the forums directory) to use vBulletin header/footer/navbar templates and usergroup permissions?
I have an OScommerce installation that I'd like to wrap with my vb header, navbar and footer template and have the user permissions tied in so that the header navigation that is displayed differs from usergroup to usergroup. I just can't figure out where to plug in some of the php code in the OScommerce files.
I didn't get a thing . Is there some good tutorial ,step by step i mean.
you probably named something wrong. I had the same problem and realized that I had missed a TEST that I needed to rename, and that my template name needed to match the template call exactly, including case.
look very closely and make sure all the names match up to what they need to be. I just got this working nicely on 3.8.3