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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2005, 08:41 AM
MamboCube's Avatar
MamboCube MamboCube is offline
 
Join Date: Jul 2005
Location: Cardiff, Wales
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default phrases-what is the template engine?

what exactly is the template engine and how do i use it?

i want to use vb phrases on my non vb pages and was told that u can use the template engine, but i have no idea wat thta is lol

any replies would b great

thnx
Reply With Quote
  #2  
Old 09-19-2005, 08:49 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vBulletin has it's own Template Engine, but that does not have thaat much to do with Phrases.
If you want to use the vBulletin Backend, just require global.php and you will be able to use its Template Engine, Language System, etc.
Reply With Quote
  #3  
Old 09-19-2005, 09:27 AM
MamboCube's Avatar
MamboCube MamboCube is offline
 
Join Date: Jul 2005
Location: Cardiff, Wales
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have required global.php and the phrases work when i use
Code:
<?php echo "$bbuserinfo[username]" ;?>
but i want to use the phrase tags so that i can use values from forms (database) for example

Code:
<phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase>
but when i use phrase tags i just get $vbphrase[welcome_x] as text

i tried making a custom phrase but i cant get it to work with php variables

does anyone know how to either use the phrase tags or to include php variables in custom phrases (if its even possible)

??
Reply With Quote
  #4  
Old 09-19-2005, 09:33 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. Set the 4 required arrays ($phrasegroups, $specialtemplates, $globaltemplates & $actiontemplates), require global.php

2. echo "Phrase: $vbphrase[phrasename]";

3. echo "Phrase with parameters: " . construct_phrase($vbphrase['phrasename'], $myparameter);
Reply With Quote
  #5  
Old 09-19-2005, 09:49 AM
MamboCube's Avatar
MamboCube MamboCube is offline
 
Join Date: Jul 2005
Location: Cardiff, Wales
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

like this ?

Code:
<?php echo "$vbphrase[welcome_x]";
echo "$bbuserinfo[username]".contsruct_phrase($vbphrase[welcome_x],$bbuserinfo[username]); ?>
because i get this error message

Fatal error: Call to undefined function: contsruct_phrase() in /home/****/public_html/*****/header.php on line 81

have i done something wrong or is it all wrong ?

----------------------------------------------------------------------





right i found out the reason i was getting an error message, it was because i was spelling construct wrong lol, but................ when i put this

Code:
<?php
echo "$bbuserinfo[username]".construct_phrase($vbphrase[welcome_x],$bbuserinfo[username]);
?>
i get this

MambocubeWelcome, Mambocube

i cant seem to get rid of the username in front

any ideas?

-------------------------------------------------------------------------
ok i managed to do it by doing this

Code:
echo "".construct_phrase($vbphrase['welcome_x'],$bbuserinfo[username]);


thnx for the help guys
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 08:43 AM.


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.04168 seconds
  • Memory Usage 2,197KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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