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 |
#662
|
|||
|
|||
just templates and new php
|
#663
|
|||
|
|||
In the instructions it says I have to open up includes/functions_online.php and edit to enable Who's Online. Isn't that a file?
Sorry if these are stupid questions. |
#664
|
|||
|
|||
I have like 30 lines of php code which I want inside the box instead of Text. How do I make it so that I can have the template read my php code? (Take a look at the template I created), how do I get the php to be executed?
|
#665
|
|||
|
|||
Quote:
But what hook do I use? |
#666
|
|||
|
|||
I know the global_start hook location works, but I think there is a way around the hook/plugin system.
|
#667
|
|||
|
|||
Yeah, I was pretty sure global_start would work but thought there might be a better hook location, don't want the piece of code being executed for every page call....
|
#668
|
|||
|
|||
ea, same here. I'm trying to figure out a way to do this without using the hook thing, if I find it, ill let you know, k?
|
#669
|
|||
|
|||
Cheers mate, that'd be great.
The powered pages are exactly what I'm after but if I can't include a bunch of PHP code in the actual templated, they are pretty useless to me. |
#670
|
|||
|
|||
You dont have to edit any vbulletin php file to make new pages work. Who's online can be done using hooks.
php code is not supposed to be written in templates. Hooks are needed only if you want to insert code into the existing pages. This thread is about creating new pages. The idea is to have a new page. See the countries page on my site for example. For a general explanation of how templates and hooks work, see the vbulletin manual. |
#671
|
|||
|
|||
is this what you used http://www.vbulletin.com/docs/html/m..._externalfiles ?
What hook location did you use? Thanks... --------------- Added [DATE]1207200276[/DATE] at [TIME]1207200276[/TIME] --------------- Also, did you create a custom template, like this tutorial? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|