Welcome to Our Community

Registration on our forums are now open for some days! Feel free to sign up today.

Display User's Age in Message User Info 1.0.1

tyle property to display user's age in user info plus helper to use in other templates

  1. Caldexi
    Compatible XF Versions:
    • 1.2
    • 1.3
    • 1.4
    • 1.5
    This add-on enables the displaying of a user's age in the Message User Info area. You as an admin can turn this on/off as a Style Property.

    Admin CP > Appearance > Styles Properties > Message Elements
    This is what it looks like:
    View attachment 10815
    Of course, (thanks to Jake Bunce) this honours the user's profile option. Their age will not display if the option is unchecked:
    7FgqdYg.png

    Finally, this add-on makes available a template helper, allowing you to use the age of the user elsewhere. (Subject to the parameter being available in the template).

    I haven't tested this, but in theory this could be used to prevent access to a forum based on age using template conditionals.

    The helper is called with: {xen:helper userage, $user}

    HOW TO INSTALL
    1. Download the zip file. Extract its contents.
    2. Upload the contents of the upload folder to the root of your XenForo installation.
    3. Install using the XML file provided.