![]() |
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]']"> |
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]']']"> |
Duh on me. Thank you, Lynne. ;)
EDIT: That doesn't work either Lynne, I get the compilation error. |
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.
|
I tried bbuserinfo before and was getting the same errors.
|
What is the template?
|
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?
|
No one has any idea on this?
|
What happens if you just try to print the varible in the template, does it show anything?
|
I never get that far as I get a template compilation error.
|
All times are GMT. The time now is 12:21 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|