1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Simple Question

Discussion in 'XenForo Questions and Support' started by Smashbox, Jun 7, 2012.

  1. Smashbox

    Smashbox Member

    I am looking for the add-on/resource that enables you to add custom
    content along with post count etc below your avatar in a post.

    Here is an example:
  2. Pereira

    Pereira Well-Known Member

    Admin Panel > Appearance > Styles > "name of style" > Style Property Groups > Message Elements

    You can add more custom user fields by going to Admin Panel > Users > Custom User Fields
    Smashbox likes this.
  3. Chris D

    Chris D XenForo Developer Staff Member

    That doesn't need an add-on :)

    They are custom user fields.

    You can create custom user fields in the Admin CP > Users > Custom User Fields. You can choose for each field which can be shown in the message_user_info.

    Then, if you search your Admin CP for "messageShowCustomFields" you will find the option to display custom fields in the message_user_info.

    EDIT: Ninja!
    Smashbox and Pereira like this.
  4. Smashbox

    Smashbox Member

    Hmm - I made the fields and have a check mark in "Show custom user fields" however they aren't displaying.
  5. Chris D

    Chris D XenForo Developer Staff Member


    In the field options themselves, also ensure "Viewable in message user info" is checked.
  6. Smashbox

    Smashbox Member

    It's checked. Very odd. Think it may have something to do with my 'message_user_info' template?
  7. Chris D

    Chris D XenForo Developer Staff Member

    Yes, it could be. Have you changed this at all?

    This is the code in the template that renders the custom fields:

    <xen:if is="@messageShowCustomFields AND {$user.customFields}">
    <xen:hook name="message_user_info_custom_fields" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
    <xen:foreach loop="$userFieldsInfo" key="$fieldId" value="$fieldInfo">
    <xen:if is="{$fieldInfo.viewable_message}">
    <xen:if hascontent="true">
    <dl class="pairsInline userField_{$fieldId}">
    <dt>{xen:helper userFieldTitle, $fieldId}:</dt>
    <dd><xen:contentcheck>{xen:helper userFieldValue, $fieldInfo, $user, {$user.customFields.{$fieldId}}}</xen:contentcheck></dd>
  8. Smashbox

    Smashbox Member

    Yes that's what I have. Can't seem to figure out why my custom content won't display.
  9. Chris D

    Chris D XenForo Developer Staff Member

    For them to display, the fields actually need to contain content.

    I am more than happy to take a look at your site for you if you send me the URL, but I fear that for me to be able to see anything useful I will need to see your Admin CP.

    If you want me to do that for you, PM me login details for a restricted access admin account, and I'll happily take a look.
    Smashbox likes this.
  10. Smashbox

    Smashbox Member

    Sent. Thanks for your help :)
    Yorick likes this.
  11. Chris D

    Chris D XenForo Developer Staff Member

    Welcome, glad we got it sorted :)

Share This Page