The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
If Conditions
I have a real name field at field 15 and at field 16 I ask them if they would like to use their real name, if not, to display their username.
However I dont know the code for this... <if condition="$userinfo[field16]==Yes">Show Real Name from Field 15 <else /> Show Their username instead</if> How? |
#2
|
||||
|
||||
You need to tell us what template you plan to use this in in order for use to help with the variable name. $userinfo is probably correct on, say, the member page, but in the showthread page you will want to use $post.
HTML Code:
<if condition="$userinfo['field16']==Yes">$userinfo[field15]<else />$userinfo[username]</if> |
#3
|
|||
|
|||
its not working.
Its to show on MEMBERINFO, but even though I put my full name in the field, it still shows username |
#4
|
||||
|
||||
You didn't give me the line of code you wish to replace. And, if you tried something and it didn't work, then please post what the line WAS and what you change it TO so we can see what is going on.
|
#5
|
|||
|
|||
Current Code:
PHP Code:
New Code I tried: PHP Code:
|
#6
|
||||
|
||||
It looks like the variable name in that template is $prepared, not $userinfo. You need to use the correct variable name. You may also need to look at the query and make sure the fields are even selected in the query. You may have to modify the query to add them.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|