The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Calling profile field in template question
I am trying to called a profile field that is a setting and I can't for the life of me get it to work in a template. This works in PHP:
Code:
if ($vbulletin->userinfo["field{$vbulletin->options['boofo_link_1_name']}"]) But how do I do the same thing in a template? The option setting is set to the profile field number. I have tried the following and all I get are template errors: HTML Code:
<vb:if condition="$vbulletin->userinfo['field[$vboptions[boofo_link_1_name]']"> <vb:if condition="$vbulletin->userinfo["field{$vbulletin->options['boofo_link_1_name']}"]"> |
#2
|
||||
|
||||
You are missing brackets in the first one:
<vb:if condition="$vbulletin->userinfo['field[$vboptions[boofo_link_1_name]']"> should be: <vb:if condition="$vbulletin->userinfo['field[$vboptions[boofo_link_1_name]']']"> |
#3
|
||||
|
||||
Duh on me. Thank you, Lynne.
EDIT: That doesn't work either Lynne, I get the compilation error. |
#4
|
||||
|
||||
Hmmm, I don't know off the top of my head what it is, but I'm pretty sure I have struggled through something like that before. I did notice you are using $vbulletin->userinfo and you should be using $bbuserinfo instead. So maybe that will help.
|
#5
|
||||
|
||||
I tried bbuserinfo before and was getting the same errors.
|
#6
|
||||
|
||||
What is the template?
|
#7
|
||||
|
||||
It would be the header template, in this scenario. But the compilation error wouldn't have anything to do with $$bbuserinfo or $vbulletin->userinfo, anyway, would it?
|
#8
|
||||
|
||||
No one has any idea on this?
|
#9
|
||||
|
||||
What happens if you just try to print the varible in the template, does it show anything?
|
#10
|
||||
|
||||
I never get that far as I get a template compilation error.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|