View Full Version : Height and weight custom user field
SPEEDKILLZ
06-09-2015, 06:16 PM
Im trying to figure out how i would go about adding a custom user field "height and weight" where members can choose their stats, in the postbit it would read; Stats: 5'5", 135 lbs any help or guidance would be great.
It's pretty easy, if I understand what you're asking for. Just go to User Profile Fields in the admincp and create your fields. If you want the user to choose them you'd want Single-Selection Menu.
Then in the postbit (or postbit_legacy) template you just insert something like
Height: {vb:raw post.fieldX}<br/>
Weight: {vb:raw post.fieldY}
where the X and Y are the actual numbers for the height and weight fields you create (which you can see on the Profile Field Manager display).
This can also be done with a plugin to avoid editing the templates if you'd prefer that, you just need to add to one of the template hooks that are in the postbit. If you wanted the user to enter their data as text then check or format it, you'd need a plugin of course.
MarkFL
06-09-2015, 06:31 PM
I will be visiting your site tonight to finish what I began before, and I can take care of this too while I'm at it if you want. :D
SPEEDKILLZ
06-09-2015, 08:40 PM
It's pretty easy, if I understand what you're asking for. Just go to User Profile Fields in the admincp and create your fields. If you want the user to choose them you'd want Single-Selection Menu.
Then in the postbit (or postbit_legacy) template you just insert something like
Height: {vb:raw post.fieldX}<br/>
Weight: {vb:raw post.fieldY}
where the X and Y are the actual numbers for the height and weight fields you create (which you can see on the Profile Field Manager display).
This can also be done with a plugin to avoid editing the templates if you'd prefer that, you just need to add to one of the template hooks that are in the postbit. If you wanted the user to enter their data as text then check or format it, you'd need a plugin of course.
Great thank you buddy. So if i want them to be able to type in the weight and height i need a plugin? But if i want then to select a height and weight then that is in the user field? Do you know what pugin? Thank you.
--------------- Added 1433889702 at 1433889702 ---------------
I will be visiting your site tonight to finish what I began before, and I can take care of this too while I'm at it if you want. :D
Sounds great sir.
Great thank you buddy. So if i want them to be able to type in the weight and height i need a plugin? But if i want then to select a height and weight then that is in the user field? Do you know what pugin? Thank you.
Well, if you want the users to enter text instead of choose from a menu, then you still create one or two profile fields. And if you just want to display whatever they type in then you don't need a plugin. But if you want to check or reformat what they enter, then you'd need a plugin (which someone would have to write using php).
But I know MarkFL will get you fixed up.
SPEEDKILLZ
06-09-2015, 08:51 PM
Well, if you want the users to enter text instead of choose from a menu, then you still create one or two profile fields. And if you just want to display whatever they type in then you don't need a plugin. But if you want to check or reformat what they enter, then you'd need a plugin (which someone would have to write using php).
But I know MarkFL will get you fixed up.
Ok thanks buddy. Yes MarkFL is awesome and a huge help. I am just trying to get a concept on how it works for future use. Thank you again. :up:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.