Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
[HOW TO - vB4] Create your own vBulletin page
Lynne
Join Date: Sep 2004
Posts: 41,294

California/Idaho
by Lynne Lynne is offline 16 Nov 2009
Rating: (8 votes - 4.50 average)

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!!!):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

- Be sure to change 'TEST' to the actual template name (WARNING: the template name is CASE SENSITIVE!!!), and change 'test' to the filename or a unique name for the page. Also, change 'Test Page' and 'My Page Title' to whatever you want to show in the navbits, such as 'Viewing Member Profile' (just an example).

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

.
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

.
2. hook location online_location_unknown:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

.
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

Last edited by Lynne; 17 Jun 2011 at 18:53.. Reason: added info regarding WOL plugins
Views: 204447
Reply With Quote
Comments
  #2  
Old 17 Nov 2009, 15:03
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
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?
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #3  
Old 17 Nov 2009, 16:18
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by cellarius View Post
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?
Yep. I did a search in the vb pages and couldn't find NO_REGISTER_GLOBALS lurking around in any of them.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #4  
Old 17 Nov 2009, 16:29
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
Excellent!
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #5  
Old 17 Nov 2009, 16:32
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Real name: Brandon
Thanks for the article Lynne

/me bookmarks this one
__________________
I offer contract work marketing and modifying forums, I'm also on LinkedIn & Twitter if you have any questions.
-----==== Check out The Best Forum Ever! =====-----
Reply With Quote
  #6  
Old 17 Nov 2009, 20:40
Mythotical Mythotical is offline
 
Join Date: Jun 2004
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just replace $myvar with the variable you are using from your db query and mytable should be replaced with the row or column you are calling from the db.
Reply With Quote
  #7  
Old 17 Nov 2009, 21:22
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #8  
Old 17 Nov 2009, 22:07
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Actually you point me to one article referring to conditions. I have not found one anywhere. You do that then your my savior.
Reply With Quote
  #9  
Old 17 Nov 2009, 22:35
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Real name: Bob
Originally Posted by Steve M View Post
Actually you point me to one article referring to conditions. I have not found one anywhere. You do that then your my savior.
http://www.vbulletin.org/forum/showthread.php?t=217570
__________________
Please Do Not PM me for vBulletin assistance... I am currently only doing customization & addon's for Xenforo.
Reply With Quote
  #10  
Old 17 Nov 2009, 22:35
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Actually I found that, seems I wasn't searching for the right term.
Reply With Quote
  #11  
Old 18 Nov 2009, 00:34
nomoreturn's Avatar
nomoreturn nomoreturn is offline
 
Join Date: Apr 2009
Real name: mastdunya.com
Where we have to upload test.php
Reply With Quote
  #12  
Old 18 Nov 2009, 00:45
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
Originally Posted by nomoreturn@hotm View Post
Where we have to upload test.php
Put it in your forum root.
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #13  
Old 18 Nov 2009, 03:11
Lionel Lionel is offline
 
Join Date: Dec 2001
Real name: Lionel
Nice, and what do you do if you want to have 3 columns in your page? Right now I had to create a table with 3 td, but I had rather avoid that
Reply With Quote
  #14  
Old 18 Nov 2009, 03:39
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Lionel View Post
Nice, and what do you do if you want to have 3 columns in your page? Right now I had to create a table with 3 td, but I had rather avoid that
There is no reason you can't use a table if you don't want to use divs. But, if you want to use divs to make 3 columns, google is a great place to start. There are lots of sites that will show you how to use divs in place of tables.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #15  
Old 18 Nov 2009, 04:22
Lionel Lionel is offline
 
Join Date: Dec 2001
Real name: Lionel
Got your first reply. Sorry Lynne. I asked because I found you extremely helpful and because I could not find any places by vb to explain about the new css, until I saw that there were new templates.

Specially whatever you put in $stylevar does not necessarily gets implemented. So instead of thinking that they were bugs, I inquire first.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 10:49.

Layout Options | Width: Wide Color: