Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: ashlar on April 28, 2004, 02:36:01 AM

Title: Disable members from hiding their online status
Post by: ashlar on April 28, 2004, 02:36:01 AM
I've posted a request for this permission before somewhere... just wanted to know if and when it will be implemented.  Beta 5 is really improves the permission system BTW! ;D
Title: Re: Disable members from hiding their online status
Post by: Acf on April 28, 2004, 03:36:43 AM
we have got a nice search feature for that :P so that you can find you missing topics ;)
Title: Re: Disable members from hiding their online status
Post by: ashlar on April 28, 2004, 09:58:38 PM
I know..  Unknown mentioned that this feature was planned and I was hoping it would be included in Beta 5 but I guess not.  Just find it a bit annoying to see 10 visitors on my board and then having all of them invisible ;) I was thinking of giving the hide privilege to mods only.
Title: Re: Disable members from hiding their online status
Post by: dschwab9 on April 29, 2004, 02:42:09 AM
I'd like to see this implemented as a permission also.  But, in the meantime, you could just remove the option from the profile template.
Title: Re: Disable members from hiding their online status
Post by: ashlar on April 29, 2004, 07:41:45 AM
How is this done?  Thanks in advance!
Title: Re: Disable members from hiding their online status
Post by: dschwab9 on April 29, 2004, 03:24:17 PM
Quote from: ashlar on April 29, 2004, 07:41:45 AM
How is this done?  Thanks in advance!

Find in themes/profile.template.php:
echo '
<tr>
<td width="40%"><b>', $txt['show_online'], '</b></td>
<td><input type="hidden" name="showOnline" value="0" /><input type="checkbox" name="showOnline"', $context['member']['show_online'] ? ' checked="checked"' : '', ' value="1" class="check" /></td>
</tr>';


And replace with:

if ($context['user']['is_admin'])
echo '
<tr>
<td width="40%"><b>', $txt['show_online'], '</b></td>
<td><input type="hidden" name="showOnline" value="0" /><input type="checkbox" name="showOnline"', $context['member']['show_online'] ? ' checked="checked"' : '', ' value="1" class="check" /></td>
</tr>';


That should only show that option to admins.  Untested, but I don't see why it wouldn't work.
Title: Re: Disable members from hiding their online status
Post by: ashlar on April 30, 2004, 12:27:00 AM
thanks!!