ElkArte Community

Title: View online status while on mobile
Post by: meetdilip on July 20, 2016, 07:40:47 am
I am currently browsing using Android, and I am not able to see the online status of members. Is there any way to view that ?
Title: Re: View online status while on mobile
Post by: emanuele on July 20, 2016, 07:52:30 am
Directly in the topics, on the default theme, no. But you can click on the profile and it's one of the first things shown.
Title: Re: View online status while on mobile
Post by: meetdilip on July 20, 2016, 08:04:11 am
You mean this green "letter" icon ?

(Link-3916)
Title: Re: View online status while on mobile
Post by: emanuele on July 20, 2016, 08:18:56 am
No, I mean this:
http://www.elkarte.net/community/index.php?action=profile;u=162

clicking on the name of on the image will bring you there.
Title: Re: View online status while on mobile
Post by: meetdilip on July 20, 2016, 08:27:27 am
Would have been nice to have it on screen itself
Title: Re: View online status while on mobile
Post by: ahrasis on July 20, 2016, 06:59:50 pm
You can customize it to have its image has a blurred affect or its link has a different color but that will cost some query, I think. I will prefer it as it is.
Title: Re: View online status while on mobile
Post by: Jorin on July 21, 2016, 01:02:44 am
Quote from: ahrasis – I think. I will prefer it as it is.

Dito! I don't need to now on a mobile who's online at the same time. I only use my mobile for a quick visit on my board.
Title: Re: View online status while on mobile
Post by: meetdilip on July 21, 2016, 01:06:03 am
Since we have it enabled on desktop view, I would assume that online status is something that people would want to know. Also, there are people like me who stay online on boards like these from mobile even when PC is far away at home.
Title: Re: View online status while on mobile
Post by: ahrasis on July 21, 2016, 07:58:41 am
May be I should try coding this into an addon. It has been a long while since I did that.
Title: Re: View online status while on mobile
Post by: ahrasis on July 21, 2016, 12:42:51 pm
Currently, I am testing this code in GenericMessages.template.php and so far it is working:

Code: [Select]
	// Show avatars, images, etc.?
if (empty($options['hide_poster_area']) && !$ignoring)
{
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']) && $message['member']['online']['is_online'])
$poster_div .= '
<li class="listlevel1 poster_avatar">
<a class="linklevel1" href="' . $scripturl . '?action=profile;u=' . $message['member']['id'] . '">
' . $message['member']['avatar']['image'] . '
</a>
</li>';

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']) && !$message['member']['online']['is_online'])
$poster_div .= '
<li class="listlevel1 poster_avatar">
<a class="linklevel1 blur_avatars" href="' . $scripturl . '?action=profile;u=' . $message['member']['id'] . '">
' . $message['member']['avatar']['image'] . '
</a>
</li>';

And for the css (may be added to custom css):
Code: [Select]
@media screen and (max-width: 50em) {
.blur_avatars {
opacity: 0.4;
filter: alpha(opacity=40);
-webkit-filter: grayscale(100%);
  -moz-filter: grayscale(100%);
-o-filter: grayscale(100%);
-ms-filter: grayscale(100%);
filter: grayscale(100%);
}
}

The code can further simplified and there should an easier way to inject this css to avatar in messages or elsewhere something like in HLBM addon which I will attempt later.
Title: Re: View online status while on mobile
Post by: ahrasis on July 21, 2016, 01:27:13 pm
Edited: I have packaged it for fully hook but it is not working yet. I thought it was working but it was the manual modifications. It will later be available here: http://www.elkarte.net/community/index.php?topic=3882.0

If someone can look into the hook version and tell me what is wrong will be much appreciated. I supposed to add a class blur_avatars next to linklevel1 or avatar in display page.
Title: Re: View online status while on mobile
Post by: badmonkey on July 21, 2016, 02:50:07 pm
This could be a great feature.  Better than 60% of my traffic is from mobile devices.  Some users never use a PC for forum surfing.