The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
How to create your own vBulletin-powered page! (uses vB templates)
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:
Now create the template, called TEST with the following content: HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">Title</td> </tr> <tr> <td class="alt1">Text</td> </tr> </table> $footer </body> </html> Now check it out by going to test.php Who's Online Modification Now if you want to show who is browsing this new page of yours, just open up includes/functions_online.php and find: PHP Code:
PHP Code:
Then find: PHP Code:
PHP Code:
---------------------------------- Also if you want to create your own pages 'within' current vBulletin files, do the following: Open the file you want, and then right before the final ?> in the source code, add the following: PHP Code:
edit by Lynne: If running 3.8.4 or above, see this post to take care of the PHP 5.3.0-related problems - https://vborg.vbsupport.ru/showpost....postcount=1171 |
#492
|
|||
|
|||
im pretty sure to create a custom page, the link has to be in the root diretory...is there a way to get the custom page on another link like tournaments/index.php?
|
#493
|
|||
|
|||
Use http and www headers, I believe.
|
#494
|
|||
|
|||
Baahhh.. All I get is a blank page. The names are in Capitals. I still can't get it to work.
|
#495
|
||||
|
||||
I add this, but don't show, always first page:
Quote:
|
#496
|
|||
|
|||
Any reason why this would work on an install with the default vB skin and *not* with a customised skin (with the TEST template created in each?) As in, it is blank when selecting the custom style. I confirm again the correct templates are there.
|
#497
|
|||
|
|||
thanks!!
i want change $navbits[$parent] = 'deneme'; for test.php?do=deneme page |
#498
|
||||
|
||||
Hi i am looking to try and use this to set up a directory using vb headers and footer on it is this possible and if so how would i do this? the directory is in the folder called directory and uses smatry templates if that helps.
|
#499
|
|||
|
|||
Great mod. Does anyone have any idea how I'd integrate a PHP script into it though?
I'd like to integrate a php gallery script, but having no joy. <removed> Please don't post entire scripts, use an attachment (and check you have permission as well). |
#500
|
|||
|
|||
I need to include a PHP file output in my template, but
Code:
<?PHP include("filename") ?> |
#501
|
|||
|
|||
im getting a blank page. Im on vb 3.6.5 here are my codes. i want mydomain.com/sms.php
template Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> $headinclude <title>$vboptions[bbtitle]</title> </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">My Custom Page Title</td> </tr> <tr> <td class="alt1">Other Bluff...</td> </tr> </table> $footer </body> </html> and page Code:
<?php // ######################## SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // ##################### DEFINE IMPORTANT CONSTANTS ####################### // change the line below to the actual filename without ".php" extention. // the reason for using actual filename without extention as a value of this constant is to ensure uniqueness of the value throughout every PHP file of any given vBulletin installation. define('THIS_SCRIPT', 'sms'); // #################### 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( // change the lines below to the list of actual templates used in the script 'sms', ); // pre-cache templates used by specific actions $actiontemplates = array(); // ########################## REQUIRE BACK-END ############################ require_once('./global.php'); // #################### HARD CODE JAVASCRIPT PATHS ######################## $headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript', $headinclude); // ######################################################################## // ######################### START MAIN SCRIPT ############################ // ######################################################################## $navbits = array(); // change the line below to contain whatever you want to show in the navbar (title of your custom page) $navbits[$parent] = 'SMS Page'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); // change the line below to contain the name of the actual main output template used in your script eval('print_output("' . fetch_template('SMS') . '");'); ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|