XF 2.2 Adding user/member number under avatar

Ineos Forum

New member
Ok, so I've scoured the forum and can't find anything so, sorry if this has been asked before.

On many forums I see a member number/ user number etc under the avatar? Thanks Tacoma3g.com for the screenshot. How do I enable this?

Thanks in advance,

Stu.


Screenshot 2022-12-08 at 12.57.26 PM.png
 

Mendalla

Well-known member
The options for populating that user block are in ACP - Appearance - Style Properties - Messages but there's no option for member number, just registration date, so maybe a template modification or something in a custom style?
 

Ineos Forum

New member
Ok, so at least I'm not going mad thinking there is a tick box somewhere.

So next question, any hand raisers on how to do a template modification to enable this?
 

Nicolas FR

Well-known member
This is the code to use instead the first one i provided.
HTML:
<dl class="pairs pairs--justified">
    <dt>User ID</dt>
    <dd>{{ $user.user_id }}</dd>
</dl>
 

Ineos Forum

New member
Just use this code and it will works fine.
HTML:
<dl class="pairs pairs--justified">
    <dt>User ID</dt>
    <dd>{{ $user.user_id }}</dd>
</dl>
Thanks @Nicolas FR I tired and still get some strange numbers, my account is the second one created and is giving me a "User ID8237368"

Could this be some sort of conflict with the theme that I'm using?

Sorry if the questions seem silly but coding isn't my thing.
 

Nicolas FR

Well-known member
I noticed that the IDs of the members on your forum are strange, I don't really know where it could come from, they are however correct because the URLs of your members' profiles contain these same IDs and the profiles are accessible normally. You should open a discussion about it, I don't think it can come from a theme though.
 
Top