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!
The only problem is I just spent an hour editing the php & template and then trying to get them to work without much luck! I don't know much about doing this kind of thing as you could probably guess.
I changed all the 'Test' areas to 'MORE'
I added the php to the root
I created the template and added 'MORE' where applicable
I made sure the global path was correct
and nothing worked! Have I overlooked something!
Quote:
Originally Posted by dpakman91
alright, hopefully someone can help me with this:
i have some large files i want to make available to certain usergroups, but not other. the files are way too large to upload as "attachments" with vb so i would have to upload them via ftp and then just post a link in a thread...of course this means the only way to prevent people from downloading it is to prevent them from seeing the thread at all, which is not my intention.
with this new way of making a vb page, is there any way to do what i am trying to do?
any help would be great.
Quote:
Originally Posted by Gary King
Try something like:
PHP Code:
<?php
require_once('./global.php');
if ($_REQUEST[filename])
{
if ($bbuserinfo[usergroupid] == 6)
{
header("Location: $_REQUEST[filename]");
}
}
?>
Be sure to change the path to the global.php and the usergroupid as well (currently it's 6 for admins only).
The above is exactly what I want to do. Can someone tell me where I should add the new php code please. Also how would I FTP into these pages...just a little confused at the moment!
I know this has probably been answered a 1000 times but i get a blank page. My PHP file and template are :
test.php
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(