MyBB Community Forums

Full Version: Add values from custom profile fields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
These 4 custom profile fields are drop-down options with # values. These show on the Member Profile.  Would it be possible to also add up the #s the user selected from each field to get a total? I am needing a code I can put onto the Member profile page so it can show "Total: [whatever the total is]"

{$userfields['fid1']}
{$userfields['fid2']}
{$userfields['fid3']}
{$userfields['fid4']}


Example:

User selects the following:

field 1 = 1
field 2 = 1
field 3 = 5
field 4 = 3

Total: 10
Bump. Any help with this?
Use the Template Conditionals plugins :

http://mybbhacks.zingaburga.com/showthread.php?tid=464

<?=my_number_format($userfields['fid1'] + $userfields['fid2'])?>

Edit: Otherwise, you will need a plugin or the Hooks plugin (use the member_profile_end hook) :
https://github.com/frostschutz/MyBB-Hooks