Resource icon

Display User's Age in Message User Info 1.0.1

No permission to download
@Chris D

I tried looking in the message_user_info template since it makes sense to look there and couldn't find anything on age. Where does your add-on insert the code?
 
Hi, @Chris D!

We, specifically @Nights, got the alignment solved thanks to this:

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.

However, we still can't get the age below the gender and above the location:

@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?

View attachment 67359

To quote Nights on Skype:
[9:52:41 PM] Jordan: I don't know how to do that.
[9:52:59 PM] Jordan: I don't know where the code is being placed to move it around.
[9:53:41 PM] Jordan: I know there's a 'displayuserage' template but that doesn't tell me where it's placed at in the postbit template or even if it's in the postbit template.
[10:18:26 PM] Amaury: Any way you can figure it out?
[10:19:15 PM] Jordan: What?
[10:19:26 PM] Jordan: Oh, no.
[10:19:29 PM] Jordan: I doubt it.
[10:19:43 PM] Jordan: I need to know where/how it's being included in the postbit.

Any ideas?
 
There's probably not an easy way to do that.

Darn. Making it inline was so easy, I was hoping this would be, too. Oh, well.

I don't suppose you could add the code to the message_user_info template -- or something along those lines -- that would make it easy to move around if you ever have time in the future, could you?

Appreciate the response, though! :)

Edit: I'll try asking our coding administrator next time he's on and see if he can figure it out.
 
If this add-on is active, the online status indicator don't show, with XenForo 1.4 Beta 1.

Can you confirm?
 
It works perfectly with XenForo 1.4 RC2:

upload_2014-9-2_18-36-32.webp

I would not be willing to change anything about this add-on. The location of the age is consistent with the location of other message user info elements.
 
It works perfectly with XenForo 1.4 RC2:

View attachment 82637

I would not be willing to change anything about this add-on. The location of the age is consistent with the location of other message user info elements.

Speaking of working perfectly in 1.4 RC2. It appears to interfere with the online status indicator working? Checked both the stock and custom templates. Works fine with it off, not fine with it on. Can you confirm?
 
Yes, you may be right, actually...

In fact it was reported previously, sorry about that. I'll patch that up.
 
Cool lol, I was going to look at it myself because I already made changes to your plugin before. The main problem I had with it before is we have imported users without birthdates. So I threw in a content check to not display anything if the age was empty... consider it a suggestion?
 
Chris D updated Display User's Age in Message User Info with a new update entry:

A few bug fixes and XF 1.2+ improvements

Important: Please disable the add-on before upgrading or your users may be met with errors.

This update has improved compatibility with newer XenForo versions and as such is now compatible with XenForo 1.2 and above.
  • Uses Template Modifications instead of template hooks.
  • Uses an event hint while extending the Thread controller.
  • Extends the Thread _getPostFetchOptions function properly so that it will be compatible with all new and future XenForo additions plus existing add-ons.
  • Hence: The online status indicator now displays correctly while this add-on is enabled.
  • Template code improved to only show the Age template if an age is actually returned.

Read the rest of this update entry...
 
Top Bottom