LoveHate 0 Posted March 5 Report Share Posted March 5 (edited) hi I want to show user's last post date in profile header. so I use blow code but it doesn't work an display the same time for all users {{if $member->member_id == \IPS\Member::loggedIn()->member_id}} {{$userlastpost['lastpost'] == \IPS\Member::loggedIn()->member_last_post;}} <li> <h4 class='ipsType_minorHeading'>{lang="activity_member_last_post"}</h4> <span>{datetime="$userlastpost['lastpost']"}</span> </li> {{endif}} whats the problem? Edited March 5 by LoveHate Обратиться Quote Link to comment Share on other sites More sharing options...
Кирилл 178 Posted March 5 Report Share Posted March 5 {{$userlastpost['lastpost'] == \IPS\Member::loggedIn()->member_last_post;}} Here you are comparing instead of assigning 1 Обратиться Quote Link to comment Share on other sites More sharing options...
LoveHate 0 Posted March 6 Author Report Share Posted March 6 On 3/5/2023 at 7:50 PM, Кирилл said: Here you are comparing instead of assigning I'm beginner... can you correct that? please Обратиться Quote Link to comment Share on other sites More sharing options...
Кирилл 178 Posted March 7 Report Share Posted March 7 {{if $member->member_id == \IPS\Member::loggedIn()->member_id}} {{$userlastpost['lastpost'] = \IPS\Member::loggedIn()->member_last_post;}} <li> <h4 class='ipsType_minorHeading'>{lang="activity_member_last_post"}</h4> <span>{datetime="$userlastpost['lastpost']"}</span> </li> {{endif}} 1 Обратиться Quote Link to comment Share on other sites More sharing options...
LoveHate 0 Posted March 7 Author Report Share Posted March 7 thanks... When I log in, the correct date is displayed for me, but when I try to view other users' profiles, the date is not correct but if I login as users the date is correct. I want users to be able to view each other's last post date! Обратиться Quote Link to comment Share on other sites More sharing options...
Кирилл 178 Posted March 9 Report Share Posted March 9 <li> <h4 class='ipsType_minorHeading'>{lang="activity_member_last_post"}</h4> <span>{datetime="$member->member_last_post"}</span> </li> 1 1 Обратиться Quote Link to comment Share on other sites More sharing options...
New_Vicious 0 Posted April 6 Report Share Posted April 6 Thanks is working Обратиться Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.