The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
i tried:
HTML Code:
<div class="body_measurements"> <vb:if condition="$post['field8']"> <h2 style="display: inline;">H: {userdata.field8}cm | </h2> <vb:else /> <h2 style="display: inline;">H: -- | </h2> </vb:if> <vb:if condition="$post['field7']"> <h2 style="display: inline;">W: {userdata.field7} Lbs</h2> <vb:else /> <h2 style="display: inline;">W: -- </h2> </vb:if> </div> |
#12
|
|||
|
|||
Did you create a plugin like that guide showed? What code do you have in your plugin?
|
#13
|
||||
|
||||
my plugin is this:
PHP Code:
Any other ideas for how i can get my custom field data into my bodyspace profile page Kevin? |
#14
|
|||
|
|||
Sorry, I lost my internet connection for a couple hours. Anyway, I copied your plugin code to create a new plugin using hook member_complete, and I created a template called memberinfo_block_test using the code from the guide page you linked to, but I get a blank tab. I haven't had a chance to figure out why yet.
Are you seeing anything from your template? I think I might have been wrong about using $prepared, I think you might want to use $userdata instead. So maybe change the added line to: Code:
$templater->register('userinfo', $userinfo); then use {userinfo.field8}, etc. But if you're having the same issue I am with the tab being entirely blank then you probably still won't see the profile fields. |
#15
|
||||
|
||||
I tried that but that didn't work either, i am able to see "Congratulations, you can see me, I'm your PHP Code!" on the profile tab page, therefore it should work if it is right.
Not sure why this is so hard to do. |
#16
|
|||
|
|||
Yeah, I can't even get that message to show up and it's frustrating me. I don't think I can deal with it any more tonight.
I noticed that the template uses $userinfo in a condition, but for some reason it's not registered in the example plugin. Maybe it's preRegistered somewhere else or something. But that does mean that {userinfo.fieldX} would work if the profile fields are actually there (and since this is the profile page you'd think they would be). Did you create those fields as private? Even if you did they should appear when you're looking at your own profile. You have data entered for those fields, right? I just can't think of any other reason right now. Anyway, I'll look at it again in the morning if you haven't figured it out by then. If I can get the template to appear then I can figure out the field value problem. |
#17
|
||||
|
||||
Yeah Kevin, sometimes it is best to step back for the night, and come at it fresh in the morning.
|
#18
|
||||
|
||||
Yeah, i have entered data and i am even displaying this information on my postbit_legacy template with all the numbers showing up, but for some reason when i try the same thing on a member profile tab, nothing shows up.
I'm still trying to look for a way.. i know you can go into custom "profile field categories" and set it to display on it's own tab...i think it uses the template "memberinfo_block_profilefield" but even using that template the numbers don't show up in the code i used for postbit_legacy. Thanks for helping me out on this! do you have any ideas Chris? |
#19
|
|||
|
|||
OK, I have no idea what my problem was yesterday, but I went back to using the plugin code and template code from the guide and got it to appear. Then I added a register line for userinfo, like:
Code:
$templater->register('userinfo', $userinfo); Now here's where I might have steered you wrong, just because I was spacing out - you should add {vb:raw userinfo.field7} in the template (I don't know why I was forgetting the vb:raw part). Anyway, if that was the only problem you were having, I'm really sorry about that. So if you can get those values displaying then you probably would want to add code to the plugin to calculate whatever values you need for the chart and register them to the template, then you just have to copy that chart html to your template and insert the parameters. |
#20
|
||||
|
||||
You were pretty close, just forgot to mention to change (if $post) to (if $userinfo)... but thanks for your help. I will try get this chart working, if i have any questions i will post back.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|