Show certain user data for all users
Hi everyone!
Due to our community purposes we need to display users' location for every user on profile page (by default only staff can see it) and in message author info block.
I do know how to call this data but, but still can't put into default non-contract component "author" - only after it.
Since I'm not very experienced, it's much complicated for me to create an extended custom component from nothing.
<#assign messageAuthorId = env.context.message.author.id /> <#assign profileLocation= restadmin("/users/id/${messageAuthorId}/profiles/name/location").value /> <div class="lia-message-author-location">Location: <span class="profileLocation">${profileLocation}</span> </div>
Any suggestions how can I make it visible for all our users?
Thanks in advance,
Yurii.
PandaUA - Seems like custom component is the only option you have here. You need to override these 2 components. Code is fine and fetch the location of the user.
Links for overriding a component - http://community.lithium.com/t5/Components-endpoints-and-the/Using-override-to-change-core-components/ta-p/61358