Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2004, 02:11 PM
nautiqeman nautiqeman is offline
 
Join Date: Jan 2003
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How it works...

I'm a newbie to vBulletin, but very experienced in web development (over 7 years). I've install 3.0.3 and I'm trying to figure out how everything interacts with each other, specifically the TEMPLATES in the admin area and the .php files. Like for example, MEMBERINFO in the Templates area of the Admin and where is the call to MEMBERINFO in the member.php file? I mean I see the very last 2 lines is
$templatename = iif($quick, 'memberinfo_quick', 'MEMBERINFO');
eval('print_output("' . fetch_template($templatename) . '");');

But things that happen in one area of the site in the MEMBERINFO aren't happening in the User Profile, but they should be. Specifically talking about the Age in Profile hack.

I appreciate any info or help in anyway. Thanks in advance.
Reply With Quote
  #2  
Old 10-14-2004, 03:17 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

It's not that hard:

Templates are called with something like $foo = fetch_template(foo), which stores the template in the var $foo. Afterwards, print_output() outputs the whole thing, using the template indicated in the fetch_template() inside print_output().

Additionally, you have template conditionals, with which you can show or hide certain parts of the template based on conditionals. Those look like this:
<if condition="$foo == 2">foo is 2<else />foo isn't 2</if>
The else part is optional.

There's also a lot more information in the vBulletin documentation which you can find at www.vbulletin.com/docs/


Have fun with vBulletin!
Reply With Quote
  #3  
Old 10-14-2004, 04:12 PM
nautiqeman nautiqeman is offline
 
Join Date: Jan 2003
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Colin,

But when you look in the ACP, there are templates that are all caps and ORANGE, like MEMBERINFO and others that are just lower case, does this mean anything???
Reply With Quote
  #4  
Old 10-14-2004, 04:24 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As far as I know not. Some that are all caps are page templates, the ones called with print_output, but I don't think it has any meaning other than to highlight them a bit more.
Reply With Quote
  #5  
Old 10-14-2004, 04:29 PM
nautiqeman nautiqeman is offline
 
Join Date: Jan 2003
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so what are the ones that are all lower case?
Reply With Quote
  #6  
Old 10-14-2004, 04:38 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Templates inside the actual page. For example the postbit is repeated (using $postbit .= fetch_template(postbit) ) for each post. So the postbit is an own template. Or the navbar. Or the header. pretty much everything is in a template somewhere, except for the basic page layout.
Reply With Quote
  #7  
Old 10-14-2004, 04:49 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nautiqeman
Thanks Colin,

But when you look in the ACP, there are templates that are all caps and ORANGE, like MEMBERINFO and others that are just lower case, does this mean anything???
Templates in all upper case are main templates. Basicly they are the template called at the end of the page, the main template contains all the code generated by other templates evaled durring page execution.

Basicly if you have this:

PHP Code:
// parse some templates
eval('$foo = "' fetch_template('foo') . '";');
eval(
'$foo2 = "' fetch_template('foo2') . '";');
eval(
'$foo3 = "' fetch_template('foo3') . '";');
eval(
'$foo4 = "' fetch_template('foo4') . '";'); 
It would output nothing, but lets asume we have a main template called FOODISPLAY in the database that contains the following:

HTML Code:
<html>$foo<br />$foo2<br />$foo3<br />$foo4</html>
So we would call it like this:

PHP Code:
eval('print_output("' fetch_template('FOODISPLAY') . '");'); 
The print_output function dose a few things, like flush the php buffer for instance and ensures all php is ended.
Reply With Quote
  #8  
Old 10-14-2004, 05:10 PM
nautiqeman nautiqeman is offline
 
Join Date: Jan 2003
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh ok -- I see - thanks

I also wanted to ask -- if I am working off the Default Style, and adding in hacks and such. If I change the style, will I have to go thru and change all the Templates again???
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 11:18 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
  • Page Generation 0.04206 seconds
  • Memory Usage 2,234KB
  • 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_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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