Ok, I managed to to enable disable showing online time in postbit.
In short, you need to create new user profile field, choose that it is single selection menu, and option set default should be set to None. In options you set only one: Off (or whatever you want to call it, it doesn't matter).
In postbit legacy (or postbit) you need to find:
{vb:raw template_hook.postbit_userinfo_right_after_posts}
After this add:
<vb:if condition="!$post['field8']">
{vb:raw template_hook.postbit_userinfo_right_after_posts2}
</vb:if>
If you don't add template hook with 2 at the end, you'll turn of all additional postbit info if you use it (and usually you do).
After this, you need to change hook that plugin "Postbit: Fetch Total & Average Time Online" uses (find it under Product : IWT - Time Spent Online)
At the very end just add to the hook plugin calls:
$template_hook['postbit_userinfo_right_after_posts2'] .= $templater->render();
That's it. Users now can disable online time in their postbits. But not in profile, or leaderboard.
-----------------------------------
Also, I found minor bug. If users online time is full hour (seconds doesn't matter), there's N/A after hours (mining, there's no minutes to be shown). It's if you use Use Micro Phrases (Postbit Only!) option. And maybe with other options, but I didn't test it. You need to have user who's time online is a round hour to see it.
|