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
Ys, maybe thats the problem, because I use additional groups in my forum. I will check it again

When I deactivate your plugin - I see about 10 numbers in the postbin

When I activate your plugin -> no numbers, not output. Permissions are set to all
OK...could you post the content of your actual postbit/postbit_classic template please?

The used is_member function also supports additional user groups from the plugin settings.
{$ignore_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<div class="post classic {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">
<div class="post_author scaleimages">
  <if $thread['uid'] == $post['uid'] then><center><span class="icon middle"><img src="/images/postbin_icons/meeple_gold.png" alt="Autor tématu" title="Autor tématu"></span><span class="middle">  <b>Autor tématu</b>  </span><span class="icon middle"><img src="/images/postbin_icons/meeple_gold.png" alt="Autor tématu" title="Autor tématu"></span></center><div class="author_statistics"></div></if>
	{$post['useravatar']}
	<div class="author_information">
<if $post['fid3']=="Muž" then><img src="images/postbin_icons/gender/male.png" title="{$post['fid3']}" /><elseif $post['fid3']=="Žena" then><img title="{$post['fid3']}" src="images/postbin_icons/gender/female.png" /><else /><img title="Neznámé" src="images/postbin_icons/gender/other.png" /></if></span> <strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
<span class="smalltext">
				{$post['usertitle']}<br />
				{$post['userstars']}
				{$post['groupimage']}
				{$post['additional_images_html']}	
</span>
	</div>
	<div class="author_statistics">
		{$post['user_details']}
</br><span class="icon middle"><img src="/images/postbin_icons/view.png" alt="Poslední přihlášení" title="Poslední přihlášení"></span> {$post['lastactive']}{$post['thanks_count']}{$post['thanked_count']}
	</div>
</div>
<div class="post_content" id="resize">
	<div class="post_head" title="{$post['subject_title']}">
		{$post['posturl']}
		{$post['icon']}
		<span class="post_date">{$post['postdate']} <span class="post_edit" id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span>
	{$post['subject_extra']}
	</div>
	<div class="post_body scaleimages" id="pid_{$post['pid']}">
		{$post['message']}
	</div>
	
{$post['attachments']}
	{$post['signature']}
	<div class="post_meta" id="post_meta_{$post['pid']}">
			{$post['quick_quote']}
		{$post['quick_quote']}
	{$post['iplogged']}
	</div>
</div>
<div style="{$post['tyl_display']}" id="tyl_{$post['pid']}">{$post['thankyoulike_data']}</div>
<div class="post_controls">
	<div class="postbit_buttons author_buttons float_left">
		{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
	</div>
	<div class="postbit_buttons post_management_buttons float_right">
{$post['button_tyl']}{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quickrestore']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_purgespammer']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
</div></div>
</div>{$post['adsaf']}
You moved {$post['lastactive']} manually to another position, thats why template modification on deactivation doesn't work.
Anyway, it doesnt affect functionality of the plugin itself
Please edit the main plugin file before deactivation/deinstallation.
Search for:
function postbit_lastactive_deactivate()
{
	require MYBB_ROOT."/inc/adminfunctions_templates.php";
	find_replace_templatesets("postbit", "#\n".preg_quote('{$post[\'lastactive\']}')."(\r?)#", '', 0);
	find_replace_templatesets("postbit_classic", "#\n".preg_quote('{$post[\'lastactive\']}')."(\r?)#", '', 0);
}

Replace that part with:
function postbit_lastactive_deactivate()
{
	require MYBB_ROOT."/inc/adminfunctions_templates.php";
	find_replace_templatesets("postbit", "#(\n?)".preg_quote('{$post[\'lastactive\']}')."(\r?)#", '', 0);
	find_replace_templatesets("postbit_classic", "#(\n?)".preg_quote('{$post[\'lastactive\']}')."(\r?)#", '', 0);
}
Now the lastvisit UNIX timestamp shouldn't be displayed after deactivation/deinstallation.

(2015-11-01, 04:35 PM)Eldenroot Wrote: [ -> ]Anyway, it doesnt affect functionality of the plugin itself
Yes, that's true...but I tried it a couple of times and I can't reproduce that issue.

Maybe another plugin blocks the functionality.
Did you remove all code I supplied Eldenroot?
@Leefish - Yes, I did. I provided my postbit_classic template above.

@SvePu - There must be a problem with another plugin - unfortunately I dont know whihc of them is the "bad" one Sad

EDIT: I will try to deactivate all one by one and try... I will keep your inform
OK...it must be a plugin which hooked into postbit.
Eldenroot - do you have it in the postbit or the postbit_author?
Pages: 1 2 3 4