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

Display User's Age in Message User Info 1.0.1

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

  1. Chris D

    Chris D XenForo Developer Staff Member

    Yorick submitted a new resource:

    Display User's Age in Message User Info (version 1.0) - Style property to display user's age in user info plus helper to use in other templates

    Read more about this resource...
     
    Adam Howard likes this.
  2. Eagle

    Eagle Well-Known Member

    Great work, thank you..
     
    Yorick likes this.
  3. Bulent

    Bulent New Member

    Hi Chris,
    Is that extension work for latest version xenforo platform.
    We tried but it doesn't work
    Regards
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    It was written for version 1.1.3 and works on all currently supported versions of XenForo.

    You'l have to be a bit more specific on the problems you're having...

    Have you actually enabled it?

    Admin CP > Appearance > Styles Properties > Message Elements
     
  5. Bulent

    Bulent New Member

    Yes, i enabled "display user age" in message elements options.
    I can see user age in tapatalk mobile "author's profile "
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    I've just been all through the code for this.

    There's really not many places this can go wrong.

    The add-on honours the user's privacy settings so it won't automatically show up.

    Three things need to happen for this add-on to work:

    1) You need to enable it (as you have done) in Message Elements
    2) Your user needs to have the "Show year of birth" option ticked in their Privacy Settings:
    [​IMG]

    3) And obviously they need to have configured their year of birth in the first place (which is optional).

    If you've confirmed that all three of those things are happening, then you might need to let me have a look at your site.
     
  7. Bulent

    Bulent New Member

  8. Chris D

    Chris D XenForo Developer Staff Member

    I've just noticed a possible bug :D

    Could you try uploading the attached file to:

    <xenforo root>/library/DisplayUserAge

    And overwrite the existing Listener.php

    Let me know if it starts working
     

    Attached Files:

  9. eyilmaz

    eyilmaz Member

    Hi Chris,
    The problem is resolved.
    Thanks for your interest.
     
  10. Bulent

    Bulent New Member

    Chris
    Its working fine.
    We really appreciate all of your effort.
    Regards
     
  11. Chris D

    Chris D XenForo Developer Staff Member

    Thank you :) And thank you for the donation :)
     
    Bulent likes this.
  12. Chris D

    Chris D XenForo Developer Staff Member

  13. Kintaro

    Kintaro Well-Known Member

    Is this a resource manager bug? The rm remember the original username?

    A possible plus for this addon could be, visualize after the age how many days remain to the birthday.
     
  14. Chris D

    Chris D XenForo Developer Staff Member

    Yes it is a resource manager bug. I released this under the name of Yorick then I recently changed my name and for some reason the RM keeps referring to me as Yorick on older releases. It's been reported as a bug.

    That's not a bad suggestion, actually.

    How should it be visualised? Should it literally say: Days until birthday: 365 - or something?
     
  15. Kintaro

    Kintaro Well-Known Member

  16. Eagle

    Eagle Well-Known Member

    Works great but I think add-on needs an update for 1.2 pairsJustified;

    Code:
    <xen:if is="!{xen:property displayUserAge}">
    <xen:elseif is="{$user.show_dob_year}" />
        <dl class="pairsJustified">
            <dt>{xen:phrase age}:</dt>
            <dd>{xen:helper userage, $user}</dd>
        </dl>
    </xen:if>
    
    And it will fix dl class problem in message user info.
     
  17. AyKuT

    AyKuT Member

    Yes, that should be changed otherwise some visual issues appear. (for XenForo 1.2)
     
  18. Allan

    Allan Well-Known Member

    Suggestion: Add into conversation.
     
  19. Amaury

    Amaury Well-Known Member

    @Chris Deeming

    Is it possible to move "Age" below "Gender" and then move the actual age number to the right side of the user info box to match the other items?

    Age.png
     
  20. Amaury

    Amaury Well-Known Member

Share This Page