MyBB Community Forums

Full Version: Time online in Profil hide
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How would the code, if I would like that all user in the profile of another user with the online time or last active only a "hidden"?

thank you

the code in the member.php:


// Lastvisit
        if($memprofile['lastactive'])
        {
            $memlastvisitsep = $lang->comma;
            $memlastvisitdate = my_date('relative', $memprofile['lastactive']);
        }

        // Time Online
        $timeonline = $lang->none_registered;
        if($memprofile['timeonline'] > 0)
        {
            $timeonline = nice_time($memprofile['timeonline']);
        }
This is a setting users can set themselves in the UserCP.
I would however for certain user this does not make visible, so there is then z.b. hidden...


This goes in any case, in another mbb forum is this so implemented with individual users or groups ...
(07-16-2017, 06:26 PM)hkkp Wrote: [ -> ]I would however for certain user this does not make visible, so there is then z.b. hidden...

Sorry I still don't understand your question.
Usergroup 2 should not see in the profile of one user or several
ACP >> settings >> group (2) >> can view profiles >> NO
something like that
Just comment those fields out of the template.

If you don't want members to see when other members are online or how much time they've spent online, just remove that entirely in the template?
I would just like that when viewing the profile of individual users at last active and the online time is a freely selectable concept. It should apply only to individual or a user.
Hi there. I think due to language barrier, I'm having a hard time understanding exactly what you are explaining...

Do you want individual users to be able to select whether to SHARE or NOT SHARE their "Last Visit" and "Time Spent Online" in their profile?

If so, this is already possible with an option in the User CP:

User CP > Edit Options > "Hide me from the Who's Online List"

^ When a user selects this option, they are hidden from the Who's Online List and the "Last Visit" and "Time Spent Online" fields in their public profiles display the word "Hidden"

If you are testing this functionality as an administrator, you are NOT going to see the change. These fields are ALWAYS viewable to administrators.

However, if you test this functionality with a test account (regular usergroup), you will see what I'm explaining.

I just tested this and it works.

Now, to the folks at MyBB.............

That option in the User CP should say "Hide me from Who's Online, Hide my Last Visit, Hide my Time Spent Online" OR it should say "Private Mode?" with a caption explaining what it does.

The existing description is incorrect and incomplete.

However, the ability to hide yourself from the Who's Online List is linked to the ability to hide your Last Visit and Time Spent Online......... so it's all or nothing with the current system.

For the description to more accurately depict the feature, I've just done the following on my forum. 

It should be much more clear to members now:

In the "usercp_options" template:

Change:


<td><span class="smalltext"><label for="invisible">{$lang->invisible_mode}</label></span></td>

To:


<td><span class="smalltext"><label for="invisible"><!--{$lang->invisible_mode}-->Enable Private Mode?<br /><br />If selected, you will not appear in the Who's Online List and your Last Visit and Time Spent Online will not be viewable (to other members) in your Profile or on the Member List.</label></span></td>
thank you moody. its korrekt.