The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Profile Field in SHOWTHREAD
I am trying to add a User Profile field in SHOWTHREAD but can't get it to work-- and am not sure if it's even possible.
These posts have some good info: http://www.vbulletin.com/forum/forum...tbit-templates http://www.vbulletin.com/forum/forum...var-name-again I have tried this with a Single-Selection Radio Buttons and a single Multiple-Selection Checkbox - neither work. For the checkbox, I tried the following condition: <vb:if condition="$show['field17'] & 1"> Which is just like the example in the first link: <vb:if condition="$post['fieldx'] & 1"> Can this work? Is "show" the correct variable? (It's used throughout the SHOWTHREAD template). Post didn't work either. Is there info on what variables are available where? Thank you for any help. |
#2
|
|||
|
|||
Show should be the correct variable. Basically show works like this:
If user has the field filled in -> Show the field. From there then you would need to POST the field contents, if it's going in Postbit_Legacy. |
#3
|
||||
|
||||
Why are you using $show['field17'] instead of $post['field17'] ? I would guess that $show['field17'] isn't even defined unless you have some other code you added somewhere to define it.
|
#4
|
|||
|
|||
Thank you both. Lynne, I tried using "post" first, but it didn't work, so I tried "show" after that (didn't work either). I'm not sure of the docs that help understand what to use where.
By "didn't work", I mean all evaluations of the field were 0, regardless of the set data. So I'm wondering if I have any setup problems - is there something I need to make sure is done before this would work? Is there anything I can check? I'm actually not interested in posting the field content, I just want to use it as a switch to do one of two different actions, that the user can select. Thanks again. |
#5
|
||||
|
||||
Wait a sec... you are putting this in the SHOWTHREAD template - so you aren't trying to post the field of the posters, but of the viewer instead? If so, you need to use $bbuserinfo['field17']
|
Благодарность от: | ||
tbworld |
#6
|
|||
|
|||
That's it! Using $bbuserinfo['field17'] worked. Yes, I want the viewer.
Thanks so much Lynne! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|