The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I need help to understand how template variables works.
I need a variable from table phrase in database. Name of the variable key is a mix between plaintext and variable. Cannot explain exactly what I mean, so I show an example: Code:
{vb:phrase 'pre_'.$var['key'].'_post'}
Solved. That works: Code:
{vb:phrase prefix_$conversation['prefixid']_title_rich}
|
|
#2
|
||||
|
||||
|
I know it's solved and I was actually surprised your solution works. But I would do it this way using string concatenation:
Code:
{vb:set phraseVar, 'prefix_'}
{vb:strcat phraseVar, {vb:raw conversation.prefixid}}
{vb:strcat phraseVar, '_title_rich'}
{vb:phrase {vb:raw phraseVar}}
|
| Благодарность от: | ||
| BulliM | ||
|
#3
|
||||
|
||||
|
Quote:
Quote:
EDIT: Works! THX! |
| Благодарность от: | ||
| Anton Rahman | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|