inherit
254318
0
Jan 2, 2024 12:51:02 GMT -8
Bonnie
156
April 2018
bonniejo
|
Post by Bonnie on Apr 6, 2019 9:52:24 GMT -8
I recently changed the colors of the text in the Mini Profiles so the Member is Online/Offline status shows as green/red. It works fine but it brought the fact that a user sees their own status as Online even if they set themselves as Invisible to the attention of some of my users. I'm sure it's always been that way, it's just more noticeable to them when it's in living color.
Is there a code I can put in the mini profile layout so that the users see their own status as others do? Their concern is they aren't really Invisible even though they are. Staff would still have to be able to see them as online even if they set it to Invisible.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,780
January 2015
msg
|
Post by Lynx on Apr 6, 2019 11:16:49 GMT -8
I recently changed the colors of the text in the Mini Profiles so the Member is Online/Offline status shows as green/red. It works fine but it brought the fact that a user sees their own status as Online even if they set themselves as Invisible to the attention of some of my users. I'm sure it's always been that way, it's just more noticeable to them when it's in living color. Is there a code I can put in the mini profile layout so that the users see their own status as others do? Their concern is they aren't really Invisible even though they are. Staff would still have to be able to see them as online even if they set it to Invisible. A forum URL, or better yet, a copy of your mini profile template would be most useful. Also, how do others see it? Do other users see "Member is offline" for an invisible member or do they just not see anything?
|
|
inherit
254318
0
Jan 2, 2024 12:51:02 GMT -8
Bonnie
156
April 2018
bonniejo
|
Post by Bonnie on Apr 6, 2019 11:34:07 GMT -8
The Invisible user wants it to show in their Mini Profile that they are Offline. Currently it shows them as Member is Online even if they are invisible. Other users see them as Member is Offline. This is my Mini Profile code <div class="$[miniprofile_class]"> $[user]<br /> {if $[user.is_guest]}Guest<br />{/if} {if $[user.is_deleted]}<em>Deleted Member</em><br />{/if} {if $[user.group]} $[user.group.name]<br />$[user.group.stars]<br /> {elseif $[user.rank]} $[user.rank.name]<br /> {if $[user.rank.stars]} $[user.rank.stars]<br /> {/if} {/if} {if $[user.custom_title]}$[user.custom_title]<br />{/if} $[user.warning.bar] <br /> {if $[user.avatar]} <div class="avatar">$[user.avatar]</div><br /> {/if} {if $[user.personal_text.message]} $[user.personal_text]<br /> {/if} {if $[user.is_member]} <div class="info"> {if $[user.location]}Location: $[user.location]<br />{/if} Posts: $[user.posts]{if $[user.gender]}<span class="float-right">$[user.gender.image]</span>{/if} {foreach $[user.mini_custom_field]} <br /><span class="$[user.mini_custom_field.content_class]">$[user.mini_custom_field.name]: $[user.mini_custom_field.value]</span> {/foreach} {if $[user.is_online]}<br /><span class="italic" style="color:#0a990a;">Member is Online</span> {else}<br /><span class="italic" style="color:#ff0000;" >Member is Offline</span> {/if} </div><br /> {/if} {if $[user.badges_miniprofile]} <div class="$[user.badges_miniprofile_container_class]"> {foreach $[user.badges_miniprofile]} $[user.badges_miniprofile.icon] {/foreach} </div> {/if} </div>
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,780
January 2015
msg
|
Post by Lynx on Apr 6, 2019 11:42:53 GMT -8
I'd change this line:
{if $[user.is_online]}<br /><span class="italic" style="color:#0a990a;">Member is Online</span>
to something like this instead:
{if ($[current_user.is_staff] && $[user.is_online] && [user.invisible]) || ($[user.is_online] && !$[user.invisible])}<br /><span class="italic" style="color:#0a990a;">Member is Online</span>
That's checking to see if the current user is Staff AND if the user being looked at is online AND invisible, then show Member is Online. Your {else} clause will show if any of the conditions yields a false, so any non-Staff member will see the Member is Offline message - including the Member themselves (as long as they are not Staff).
EDIT: I edited my code above, as I saw a problem with it - when a user was online but not invisible, it would still show them as offline. The addition to the code above (also take note of the added parentheses) will also check to see if a user is online but not invisible, which will also show a Member is Online.
|
|
inherit
254318
0
Jan 2, 2024 12:51:02 GMT -8
Bonnie
156
April 2018
bonniejo
|
Post by Bonnie on Apr 6, 2019 12:11:59 GMT -8
Thank you!!!! It looks like it is working. I tried it with my invisible Test Account user and it sees itself as Member is Offline, another test user I have also sees it as Member is Offline. Me, as staff, it shows as Member is Online!
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,780
January 2015
msg
|
Post by Lynx on Apr 6, 2019 12:14:56 GMT -8
Thank you!!!! It looks like it is working. I tried it with my invisible Test Account user and it sees itself as Member is Offline, another test user I have also sees it as Member is Offline. Me, as staff, it shows as Member is Online! See my EDIT above. There is an issue where a visible online member would be shown as Offline. The modified code above should take care of that.
|
|
inherit
254318
0
Jan 2, 2024 12:51:02 GMT -8
Bonnie
156
April 2018
bonniejo
|
Post by Bonnie on Apr 6, 2019 12:32:24 GMT -8
With the new code, if they aren't online at all nothing shows.
|
|
inherit
254318
0
Jan 2, 2024 12:51:02 GMT -8
Bonnie
156
April 2018
bonniejo
|
Post by Bonnie on Apr 6, 2019 13:53:50 GMT -8
Lynx - I went back to my original code, saved it and then recopied the edited code and I think it's working now. I may have just messed up when I copied it the first time.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,780
January 2015
msg
|
Post by Lynx on Apr 6, 2019 15:20:00 GMT -8
Lynx - I went back to my original code, saved it and then recopied the edited code and I think it's working now. I may have just messed up when I copied it the first time. Okay. Thank you for posting back. I just tested it out on my test forum and it's working as it should. If it's still not working for you, please post your updated mini profile template and I'll take another look.
|
|
inherit
254318
0
Jan 2, 2024 12:51:02 GMT -8
Bonnie
156
April 2018
bonniejo
|
Post by Bonnie on Apr 6, 2019 15:53:15 GMT -8
It is working. I even heard from the user who requested it in the first place and she's ecstatic. Even though she knows she's invisible she feels more comfortable that it shows to her that she's offline. Thank you so much for the code!!
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,780
January 2015
msg
|
Post by Lynx on Apr 6, 2019 15:56:48 GMT -8
It is working. I even heard from the user who requested it in the first place and she's ecstatic. Even though she knows she's invisible she feels more comfortable that it shows to her that she's offline. Thank you so much for the code!! Glad I could be of help.
|
|
inherit
254318
0
Jan 2, 2024 12:51:02 GMT -8
Bonnie
156
April 2018
bonniejo
|
Post by Bonnie on Apr 8, 2019 9:51:08 GMT -8
Lynx - I wanted to give you an update. I moved your code up, right before the user name. I changed the text to images of a green dot and a blank dot that I saved as custom images in my theme. Everything appears to work perfectly and my users like the dot better than the text. Thanks again for the code! That's what made the thing whole thing work and still keep my invisible users happy.
|
|