Jump to content

user last post date


LoveHate
 Share

Recommended Posts

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 by LoveHate
Link to comment
Share on other sites
{{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}}

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using our site you agree to our Privacy Policy