The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Profile Field Value
I have run several searches on .org and even tried seeing how some had gotten things to show via their mods and I am still drawing a blank.
What I am Trying To Do All I am trying to do is display the value of a custom profile field within a new tab on the profile. I am looking to render the inputed value as a link so it would appear like this within the template: Code:
<a href="{raw $userinfo['field281']">Title here</a> |
#2
|
|||
|
|||
Did you try {vb:raw userinfo.field281} ?
|
#3
|
||||
|
||||
I may have, it didn't work when I just tried it. I also wanted to wrap it in an if conditional like so:
HTML Code:
<vb:if condition="$userinfo['field281']"> $userinfo['field281'] </vb:if> |
#4
|
|||
|
|||
How did you create your new tab?
|
#5
|
||||
|
||||
|
#6
|
|||
|
|||
Oh, OK, I think you need to register $userinfo for use in your custom template, like this:
Code:
$templater->register('userinfo', $userinfo); [S]then I think what you have in post #3 should work.[/S] The condition you have in post #3 should work, but you need {vb:raw userinfo.field281} inside the if. |
#7
|
||||
|
||||
I tried this as well. I can get it to work with
Code:
<vb:if condition="$bbuserinfo['field281']"> {vb:raw bbuserinfo.field281} </vb:if> |
#8
|
|||
|
|||
Right, as you figured out I was wrong about post#3, the condition is correct but the tag inside needs to be a vb:raw tag.
So you added the register call where you're rendering your custom template and it still didn't work? If you want to post your code we might be able to see something. |
#9
|
||||
|
||||
I suspect it has more to do with "how" I am using this code than anything else. I wouldn't be able to post all of the code because alot of it belongs to vb.
Here is the entire concept: I have created a new tab using the method mentioned in my previous post that calls a secondary instance of the "friends" tab. On my dev profile I have my new friend tab (and the original doesn't display based on a conditional). The customized friend tab templates are renames of the originals but have allowed me to manipulate them in a manner fluent with what I am trying to achieve. I currently have my friends showing their instant message icons if they are using them beside their avatar. This makes reaching them pretty easy for me. I am looking to add the custom facebook field to that list so that I can access their facebook directly from my friends list as well. Essentially I would be able to pull this off if I could get the field to show on the friends tab since I am using the same code. --------------- Added [DATE]1331472906[/DATE] at [TIME]1331472906[/TIME] --------------- Anyone have any ideas for me to get this to work? I wasted a few more hours yesterday trying to figure it out to no avail. |
#10
|
|||
|
|||
I'm trying to do something similar... did you ever find out how to get profile fields to display on the added tab in the member.php page
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|