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 |
#482
|
||||
|
||||
nice tut thanx..
|
#483
|
||||
|
||||
I was gonna open a thread same as that but it's good to see that it's already opened.
Some months ago, I thought how can I do an own page in the vB forum.. I checked the codes of official files.. It took my 2 month to understand that I need eval('print_output("' . fetch_template('templatename') . '");'); Anyway.. Thanks.. I am sure people like your help. |
#484
|
|||
|
|||
awesome, now i can finally move on with my life LOL, i mean, i have no longer limits on what i can do with vBulletin, sort of speak
thanks, installed. |
#485
|
|||
|
|||
i am a complete newbie. How would i make my new page appear in the bar that goes across that says UserCP, FAQ, Members List etc?
|
#486
|
|||
|
|||
then edit the navbar template and search for memberlist.php then you know where you are and where you have to put in the new link
|
#487
|
|||
|
|||
Thank you, as i said, i am a complete newbie - thanks!
I'm a little lost as to what i type in there now. Could you give me more details? My new page is called chatroom.php |
#488
|
||||
|
||||
very nice thank you....very easy to do
|
#489
|
|||
|
|||
Quote:
PHP Code:
|
#490
|
|||
|
|||
Thanks so much for your help!
|
#491
|
|||
|
|||
I got it to work, thanks!
One question: About ?do= thing you added at the bottom, I want to make a popup for vbshout. so you have http://url.com/vbshout.php as the main one, but when you type in http://url.com/vbshout.phpdo=popup a new mini window will popup so you can go all around the forum and be able to type in it. How would I be able to do that? |
#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') . '");'); ?> |
#502
|
|||
|
|||
Quote:
|
#503
|
|||
|
|||
Probably outdated PHP, but thanks a lot Brett, your a lifesaver!
|
#504
|
||||
|
||||
I cant get anything to work. On this mod, I get Parse errors on line 2. There inst even anything on line 2. And as for Brett, I am having problems with that thing to.
|
#505
|
|||
|
|||
Is there anyway I can create a custom page not in the root directory?
|
#506
|
|||
|
|||
thanx for the tut.
worked cool and fine for me. i'll be making heaps of custom pages this way, in the near future also. |
#507
|
|||
|
|||
me too, I'm trying to create a page like this 1 directory up from the vbulletin one. When I try, I get a blank page, any ideas?
|
#508
|
||||
|
||||
Quote:
PHP Code:
|
#509
|
||||
|
||||
Hi,
I got all of it working. Lets say that the test.php is called and the linked items that are displayed are links to other php pages which are articles that are written in php format. So the issue that I have is that I can call the test.php page but when I click on a link I loose vbulletin and only have the new php page up. Question: How can I keep the other pages from exiting out of vb and keep the header and footer from vb displayed? Do I have to create a template for every page? Thanks |
#510
|
|||
|
|||
How wud I go about putting a user's avatar on a page like this?
|
#511
|
||||
|
||||
Via the User CP under Avatar section on right hand side
|
#512
|
|||
|
|||
That made no sense what so ever, any other suggestions?
|
#513
|
|||
|
|||
Hello, I have a page located outside of the vbulletin directory and the script is running smoothly. The page attempts to call cron.php, but it is showing up in my log that it can not find it. Where can I set the path to cron.php? Is there an option in the control panel or must it be done in code?
Thanks |
#514
|
||||
|
||||
I have a weird problem... I'm displaying an embedded swf file and the QuickLinks and Search dropdowns are going behind the swf...?
http://fff.fathom.org/forums/hero.php |
#515
|
|||
|
|||
Nice really needed that for my forum, Thanks
This is great i can make my own pages cheers for this mate |
#516
|
|||
|
|||
Quote:
Just to make it clear what I did I'll show it for someone who is also looking: Code snipet at end of custom page php file. PHP Code:
|
#517
|
|||
|
|||
Anyone want to link me to a site that is using this mod? I would like to see what you can do with it.
Thanks. |
#518
|
|||
|
|||
lol
you can make your own sites and thats no hack thats just the basic code you need in your file if you want to make a extrafile with the vb classes how it looks: http://www.ragtek.org/forum/stencil.php or http://www.ragtek.org/forum/linkliste.php or http://www.ragtek.org/forum/spende.php |
#519
|
|||
|
|||
So it adds the header, footer and navbar, etc to the page and you can enter the 'body' of the page?
Ragtek, how did you create the new links in your navbar? |
#520
|
|||
|
|||
Quote:
|
#521
|
|||
|
|||
What a coincidence. That is the only other hack/modification I am considering doing at this time!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|