MyBB Community Forums

Full Version: Show Last active (last logged in) in postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
is there any easy way how to show "Last active (last logged in)" information in the postbit template under the avatar? Thank you
You could try this?

<td width="15%" class="{$bgcolor}">{$user['lastvisit']}</td>
I tried, but no output
I think this needs a plugin, one that correctly hooks to the postbit.

Actually, you could try it like this:

Postbit Classic

<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<div class="post classic post{$usergroup['gid']} {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">
<div class="post_author scaleimages">
	<div class="author_information">
			<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
			<span class="smalltext">
				{$post['usertitle']}<br />

					var timestamp = {$post['lastvisit']}; // replace your timestamp
var date = new Date(timestamp * 1000);
var formattedDate = ('0' + date.getDate()).slice(-2) + '/' + ('0' + (date.getMonth() + 1)).slice(-2) + '/' + date.getFullYear() + ' ' + ('0' + date.getHours()).slice(-2) + ':' + ('0' + date.getMinutes()).slice(-2);


	<div class="author_statistics">
<div class="post_content">
	<div class="post_head">
		<span class="post_date">{$post['postdate']} <span class="post_edit" id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span>
	<div class="post_body scaleimages" id="pid_{$post['pid']}">
	<div class="post_meta" id="post_meta_{$post['pid']}">
<div class="post_controls">
	<div class="postbit_buttons author_buttons float_left">
	<div class="postbit_buttons post_management_buttons float_right">
Is there anybody who can make a simple plugin with hook for me? Thank you in advance! Thx to leefish, I will try Smile

Unfortunately it is not working Sad
Its only on classic and it worked for me. Did you copy the whole template?

[Image: hVqXE0L.jpg]
Oh, now it works fine! Can I show it only when the user is offline? I have a conditional plugin (I dont know it is proper name)
yea, wrap this bit :


in your if statement.
Leefish - everything is fine except one thing:

When you wanna post a new reply in quick reply box and hit post button -> time is shown but nothing else, you have to hit f5 and then you are reconnected into topic with your reply
hm, that is why a plugin is better Smile
Pages: 1 2 3 4