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 |
#1372
|
|||
|
|||
ahhh yea is true, but there is no way to put on vb 4?
|
#1373
|
||||
|
||||
|
#1374
|
|||
|
|||
thanks bro, that what i need
|
#1375
|
|||
|
|||
OK, so being new to vB, I just tried this out and received the following error message and am not sure what I need to do? Probably very simple but...
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: navbar in [path]/includes/functions.php on line 4330 Parse error: syntax error, unexpected T_STRING in /home/brishi69/public_html/vb/test.php(42) : eval()'d code on line 1 Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: TEST in [path]/includes/functions.php on line 4330 Cheers, BriShi |
#1376
|
||||
|
||||
Please note that this tutorial is for vB3.x. You are obviously running vB4.x, so you need to look out for the vB4-article on this topic (in the vB4-articles subforum).
|
#1377
|
|||
|
|||
Thanks you for responding cellarius, I noticed and found the one for vB4 late last night and was too tired to change it then. I just tried that one and now I just get a white page. So am looking through the replies on that page too see if anyone had a similar problem before I post in there....
Cheers, BriShi |
#1378
|
|||
|
|||
When I am browsing my forum on my phone I am unable to view my custom page ... All I get is a white blank page. But when I view the forum on the desktop skin I can view the custom page just fine.
How can I get my custom page to show up when I am using my mobile theme? |
#1379
|
||||
|
||||
You probably need to add the template you created to your mobile style.
You probably added it initially only to your default style, so your mobile style is missing the template. I don't know if it talks about it in this article but you should really enable debug mode in the admin cp (https://vborg.vbsupport.ru/showthread.php?t=165623) In debug mode you can add a net template to the usually hidden "MASTER Style" which will automatically allow it to be used in ALL styles simultaneously instead of having to add it individually to each style. |
#1380
|
|||
|
|||
Thank you... that was the issue.
|
#1381
|
|||
|
|||
Hi all, i have created a privacy page using this code, but if i try to see that page logged out, the browser report:
Code:
Unable to add cookies, header already sent. File: /home/download/public_html/vb/tos.php Line: 1 Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE & ~8192);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'tos'); // 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(
'Tos',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Privacy e Tos';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('Tos') . '");');
?>
Thanks @@@@@@@@@@@@@@@@@@@@@@@@@@ Solved, there'was a white space before <?php |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|