Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 2 Years, 9 Months, 1 Week ago need code for show time here
#1
Solved: 2 Years, 9 Months, 1 Week ago
good evening everybody
[Image: last_time_online.jpg]
look at the pic. how can we show last time online in reputation below thanks
Reply
#2
Solved: 2 Years, 9 Months, 1 Week ago
Try this plugin: https://github.com/SvePu/MyBB-Postbit-Us...e/releases
Greetings Sven (ps: Sorry for my bad english!!)

My plugins - [email protected]
Reply
#3
Solved: 2 Years, 9 Months, 1 Week ago
thanks for replying but when user
Is online its showing online i want user online or offline it show always last time in this location
Reply
#4
Solved: 2 Years, 9 Months, 1 Week ago
OK, then open the file postbit_lastactive.php from /inc/plugins/ in editor (eg.: Notepad++), search for:
$lang->load("postbit_lastactive");
if($post['lastvisit'] == $post['lastactive'] && (is_member($mybb->settings['pla_groupselect']) || $mybb->settings['pla_groupselect'] == "-1"))
{
	if(empty($mybb->settings['pla_timeformat']))
	{
		$mybb->settings['pla_timeformat'] = "relative";
	}
	$lastactivetime = my_date($mybb->settings['pla_timeformat'], $post['lastactive']);
	$postlastactive = '<br />'.$lang->sprintf($db->escape_string($lang->pla_lastactive), $lastactivetime);
}
elseif($post['lastvisit'] != $post['lastactive'] && (is_member($mybb->settings['pla_groupselect']) || $mybb->settings['pla_groupselect'] == "-1") && $mybb->settings['pla_showonlinestatus'] == "1")
{
	$onlinetextstring = empty($mybb->settings['pla_onlinestatus_text']) ? 'Online' : $mybb->settings['pla_onlinestatus_text'];
	$onlinecssstyle = '';
	if(!empty($mybb->settings['pla_onlinestatus_style']))
	{
		$onlinecssstylesheet = preg_replace("%(\r\n)|(\r)%", "", $mybb->settings['pla_onlinestatus_style']);
		$onlinecssstyle = 'style="'.$onlinecssstylesheet.'"';
	}			
	$postlastactive = '<br /><span '.$onlinecssstyle.'>'.$onlinetextstring.'</span>';
}
else
{
	$postlastactive = '';
}

and replace all with:
$lang->load("postbit_lastactive");
$postlastactive = '';
if(is_member($mybb->settings['pla_groupselect']) || $mybb->settings['pla_groupselect'] == "-1")
{
	if(empty($mybb->settings['pla_timeformat']))
	{
		$mybb->settings['pla_timeformat'] = "relative";
	}
	$lastactivetime = my_date($mybb->settings['pla_timeformat'], $post['lastactive']);
	$postlastactive = '<br />'.$lang->sprintf($db->escape_string($lang->pla_lastactive), $lastactivetime);
}
Greetings Sven (ps: Sorry for my bad english!!)

My plugins - [email protected]
Reply
#5
Solved: 2 Years, 9 Months, 1 Week ago
thanks sir problem solved
Reply
#6
Solved: 2 Years, 9 Months, 1 Week ago
Nevermind
Reply
#7
Solved: 2 Years, 9 Months, 1 Week ago
very good i have installed this plugin but space is coming in my forum
[Image: zlast_time_online.jpg]
WHEN I CHECK THIS THROUGH inspect element its showing <br>
when i removed <br> through inspect element then space removed
how can i change in plugin
Reply
#8
Solved: 2 Years, 9 Months, 1 Week ago
You can remove the "<br />" in main plugin file from PHP variable $postlastactive

Change:
$postlastactive = '<br />'.$lang->sprintf($db->escape_string($lang->pla_lastactive), $lastactivetime);
and
$postlastactive = '<br /><span '.$onlinecssstyle.'>'.$onlinetextstring.'</span>';

To:
$postlastactive = $lang->sprintf($db->escape_string($lang->pla_lastactive), $lastactivetime);
and
$postlastactive = '<span '.$onlinecssstyle.'>'.$onlinetextstring.'</span>';
Greetings Sven (ps: Sorry for my bad english!!)

My plugins - [email protected]
Reply
#9
Solved: 2 Years, 9 Months, 1 Week ago
yes working perfect space removed thanks  mr SvePu
Reply
#10
Solved: 2 Years, 9 Months, 1 Week ago
You're welcome!
Greetings Sven (ps: Sorry for my bad english!!)

My plugins - [email protected]
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)