Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-21-2007, 03:53 AM
hhillegas hhillegas is offline
 
Join Date: Dec 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Creating New Blog Templates?

Hi,

I'm sorta new to any massive VBB changes - I'm a Ruby on Rails developer that is drawn to the nice VBB+Blog platform.

I have some Wordpress themes that I need to convert to work with the VBB blog addition.

I have PHP, Java, Ruby, Objective-C and C++ experience but what I don't have experience with is how VBB hangs together - what files do what and how they interact.

If anyone could point me in the direction of a tutorial, example code or something like that, I'd be very grateful.

Cheers,
Hunter
Reply With Quote
  #2  
Old 09-21-2007, 05:03 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vBulletin uses a template system. Basically, what that means is that the files do all the data preprocessing (note PHP's recursive acronym: "PHP: HTML Preprocessor") and the template uses that data.

http://www.vbulletin.com/docs/html/styles_and_templates
Reply With Quote
  #3  
Old 09-21-2007, 09:22 PM
hhillegas hhillegas is offline
 
Join Date: Dec 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I actually have read through the entire VBB manual.

What I'm hoping to find is an article that would say, take me through the process of adding a new template to the system. Or even example code or something.

What files do I need to include? How do the templates and PHP files on the filesystem interact? What rules do I need to follow? Those sort of questions... The 'Hello World' of VBB mods for instance.

Is that out there somewhere?

Thanks,
Hunter
Reply With Quote
  #4  
Old 09-21-2007, 11:11 PM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your going to be doing a lot of poking around to get the basics down.

admincp - styles and templates - edit style
Edit your style and at the bottom is an option to add a template.
The template is added to that style and its children ONLY.

for example:

Parent Style One (I added a new template "x" here)
- Blue Style
- Red Style
- Green Style
(these inherit the properties of Parent Style One, including the new Template but we can change each style as needed, in this case to have a different color)

Parent Style Two
- Gray
- Orange
- Purple
(These styles didn't get template X because they don't roll up to Parent Style One)

The templates are stored in the database and the php files call them through an eval.

Here is a good tutorial for creating your own vb powered php page (ala hello world) which goes through the basics of creating a page that fully taps into the power of the vbulletin backend.... meaning you get to use your forums header, footer, templates, phrases, user info, etc.

[How-To] vBulletin API Basics: Creating Custom Pages & Misc.

That is further expanded on here with many variables you will want to use.
[How-To] vBulletin API Basics: Variables, Functions, Objects

Here are some others I bookmarked:
Adding the vbulletin editor into your mods
Using the vbulletin database class

There are more here:
https://vborg.vbsupport.ru/forumdisplay.php?f=218
Reply With Quote
  #5  
Old 09-22-2007, 04:50 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hhillegas View Post
What rules do I need to follow?
If you indeed read through the whole manual, you would've found the "vBulletin Coding Standards".
Reply With Quote
  #6  
Old 09-23-2007, 05:30 AM
hhillegas hhillegas is offline
 
Join Date: Dec 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reeve - thanks very much. I'm starting to realize that it seems much of this isn't documented as with other commercial environments. I appreciate steering me towards all of that stuff.

Dismounted- I did see those, yes. Great to have them, no doubt. They don't take the place of tutorials but of course coding standards are important.

It's nice for Jelsoft that this community exists but I'm honestly surprised there isn't more of the type of docs we were looking for around (or even better comments in the code). I know that when you've worked on a platform for long periods of time, things seem obvious and these questions may seem rudimentary. Anyway, I appreciate all who helped out.
Reply With Quote
  #7  
Old 09-24-2007, 02:46 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not sure if it's what you are looking for...
Skinning: Understanding A Template-Based System

it's directed towards programming newbies - but I thought what the heck
Reply With Quote
Reply


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


All times are GMT. The time now is 10:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04684 seconds
  • Memory Usage 2,222KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete