MyBB Community Forums

Full Version: Custom user fields?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to create custom user fields that will be displayed on an user's profile and posts?

For example, I want to implement a dunno, "tickets" thing in my forum. Each user will have a tickets counter. They can't edit their amount of tickets. Tickets are displayed on their posts and profile. Amount of tickets can only be edited by me, the admin.

I am not talking about a currency system like NewPoints (I'm already using for something else anyway)
(2011-04-02, 05:37 AM)OmegaVemon Wrote: [ -> ]Is it possible to create custom user fields that will be displayed on an user's profile and posts?...

Yes Smile






.....


....



...


..


.

Posts / postbit templates:
This is an example of a template variable which should work in your postbit templates:
{$post['fid3']}


#
A php variable which will work in any template if you are using this plugin:
http://mybbhacks.zingaburga.com/showthread.php?tid=260
$mybb->user['fid12']


##
Profile / profile related templates:
Does this work? Toungue
{$user['fid3']}
...or is the format different, I forgot.


###
In general: The PHP variable format is always like this: $mybb->user['fidx'] ... (x is your custom fid number)
  • Template variables are more confusing since they (often) don't work in every template...
Have fun Smile