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 |
#702
|
||||
|
||||
Yup, just add it to your forum directory where all your other files are.
|
#703
|
|||
|
|||
im using this custom vb page for my site, so its forums/videos.php
im going to be adding videos so how can i make it so i dont need to add a template everytime...cause ive seen video.php?id=1 <-just something like that. any help is very much appreciated! |
#704
|
|||
|
|||
I am wanting to get a page from elsewhere and insert it so it looks like it's on my site (the other page is also mine ie hosted on the same please) how can i do this?
--------------- Added [DATE]1210794909[/DATE] at [TIME]1210794909[/TIME] --------------- I want to keep the html of that page seperate as it's updated automatically, so it means every day a few times a day i'd be manually copying and pasting the html into the template. How can i just CALL the html from the other page? ie open up the other page inside it? |
#705
|
||||
|
||||
Quote:
Just follow the instructions as stated, and then in the HTML area add: <iframe src="tickers/index.php" height="xx" width="xx" frameborder="0"></iframe> And, of course, you can adjust things as you like, and you'd never have to change the template again other then for tweaking and getting the style just right, and it will look like one integrated page. There's a also a really good script on Dynamic Drive for creating an iFrame that resizes based on the content of the frame, in case you have really dynamic content that would need that. You can save the page as tickets.php and it won't conflict with /tickers/ |
#706
|
|||
|
|||
Is there a way to make it open, just whatever size it is? Cos the page changes. Like 100% instead?
|
#707
|
||||
|
||||
100% wont do it. It will just stretch to 100% of the users browser window. The code for making the iframe adjust to the size of the content is at Dynamic Drive. http://www.dynamicdrive.com/dynamici...iframessi2.htm
|
#708
|
|||
|
|||
i have completed what the tutorial says. i have made a test template and changed header include to what is stated. then i put my code in another folder...
pub_html>community pub_html>file here heres the code i have i dont really know if i made the template right or not in stylemanager since it didnt really state where to put it. Code:
// ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'index1'); // change this depending on your filename //########################## REQUIRE BACK-END ############################ $currentdir = getcwd(); chdir('/home/site/public_html/community'); require_once('./global.php'); chdir($currentdir); // ################### 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( 't1', ); // pre-cache templates used by specific actions $actiontemplates = array( ); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $navbits = array(); $navbits[$parent] = 'Test Page'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('t1') . '");'); |
#709
|
||||
|
||||
Try just putting the PHP file in your main forum directory.
I'm not sure what you mean by you don't know where to put the template, as the template can only be in one place, in the style manager. Also, you should not have made any changes to your headinclude. |
#710
|
|||
|
|||
i added it to the main forum and i still have a blank page
|
#711
|
||||
|
||||
I just noticed that the code you posted looks quite different from the sample PHP code. I'd recommend starting over and keep everything exactly the way it is in the tutorial, except for your template and file names of course, and see if that fixes your problem.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|