[HOW TO - vB4] Create your own vBulletin page
This is an updated article on how to create your own vbulletin powered page. It's only for use with vB4.
This is NOT my work. I'm posting this from another thread where vB Style took the time to write this out. And his work is based on the article by Gary King here - How to create your own vBulletin-powered page! (uses vB templates) Instructions to Create your Own Page: 1. Create the php page: - 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 - WARNING: the template name is CASE SENSITIVE!!!): Code:
<?php 2. Create the Template: - If you are in debug mode, create the template in your MASTER STYLE so it shows up in all your styles, otherwise make sure you create the template in the style you are using. If following the page above, call the template TEST (WARNING: the template name is CASE SENSITIVE!!!) with the following content: HTML Code:
{vb:stylevar htmldoctype} Instructions to Add your Page to the Who's Online List (WOL): Create two plugins using the following hooks. Replace mypage and similar with your information. 1. hook location - online_location_process: Code:
switch ($filename) 2. hook location online_location_unknown: Code:
switch ($userinfo['activity']) The colored part in the code above shows what you need to change in the plugins (both reds should be the same and both blues should be the same, whereas green can be whatever you want). Please see this article for help with rendering templates - [vB4] Rendering templates and registering variables - a short guide |
Thanks Lynne for compiling this - this will be most helpful for many users, no doubt :)
So, I gather you agree with my doubts that the NO_REGISTER_GLOBALS constant is still needed? |
Quote:
|
Excellent! :)
|
Thanks for the article Lynne :)
[high]* Brandon Sheley bookmarks this one[/high] |
Might want to add if conditions to your article as well. I did a search through templates and found this:
To do an if condition in a template: HTML Code:
<vb:if condition="$myvar['mytable']"> |
There are already articles about conditions to use in templates. I would just be repeating them by putting them in this article. There are also articles about rendering templates and registering variables also (which I linked to). I wanted to put this up as just a basic outline to get someone started.
|
Actually you point me to one article referring to conditions. I have not found one anywhere. You do that then your my savior.
|
Quote:
|
Quote:
|
All times are GMT. The time now is 09:29 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|