The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Phrase system, part two
How would I go about fetching a phrase in code (i.e., not from within a template)?
I am using fetch_phrase(), but it seems to be adding a query for every phrase it translates: Quote:
|
#2
|
||||
|
||||
That's what array $phrasegroups is for. Must be initalized before calling global.php so the phrases in this group will be cached.
Only use fetch_phrase or fetch_phrase_group when you really need to use a phrase(group) that has not been cached (which should rarely be the case). Otherwise just use $vbphrase['yourphrase'] |
#3
|
|||
|
|||
Quote:
PHP Code:
|
#4
|
||||
|
||||
$vbphrase contains all the global phrases as defined in I believe global.php, as well as all of the phrases from the phrasegroups defined in $phrasegroups at the top of the file.
|
#5
|
|||
|
|||
Excellent, thank you.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|