Warning: Expiry date cannot have a year greater then 9999 in /home/kilandor/seditioforge.com/system/common.php on line 244
Simple core hack to make a group invisible in db_online list using the HIDDEN property in group settings and exclude webmaster from shield protection - Make a group invisible and Site-Admin shield protection excluded - Seditio Forge
Simple core hack to make a group invisible in db_online list using the HIDDEN property in group settings and exclude webmaster from shield protection
Author: donP
Submitted by: donP
Date: 2008-01-04 19:36
Comments: (0)
Ratings:
 
With this simple core hack, to the file footer.php, we can make a group of users invisible in db_online (whosonline) list using the HIDDEN property in user-groups settings and also exclude webmaster (user-id=1) from shield protection.

After this core hack, setting the desired user-group property "hidden" to "Yes", the members belonging to that group will be registered as visitors in db_online table at login moment (and traced as visitors during navigation), so, nobody can know if and when they logged-in.
A useful feature if you don't want your customers annoy you with instant PMs when you'r surfing your website... ;)

The second part of the hack is an exclusion of the webmaster (user-id=1) from shield protection. Also this feature is very important, cause the site Administrator has a very quick finger on his mouse when he menages his website and he doesn't like to be stopped by that shield...

1) Making a group of users invisible:
in your system/footer.php find this code (around lines 47-51):
Code:
if (!$cfg['disablewhosonline'] || $cfg['shieldenabled'])
{
if ($usr['id']>0)
{
$sql = sed_sql_query("SELECT online_id FROM $db_online WHERE online_userid='".$usr['id']."'");

and change them with these:
Code:
if (!$cfg['disablewhosonline'] || $cfg['shieldenabled'])
{
if ($usr['id']>0 && !$sed_groups[$usr['maingrp']]['hidden'])
{
$sql = sed_sql_query("SELECT online_id FROM $db_online WHERE online_userid='".$usr['id']."'");


2) Excluding Site Administrator from shield protection:
Again in system/footer.php find this code (around lines 79-81):
Code:
      if ($online_count>0)
         {
         if ($cfg['shieldenabled'])
            {

and change them with these:
Code:
      if ($online_count>0)
         {
         if ($cfg['shieldenabled'] && !$usr['isadmin'])
            {



WELL DONE!
Copyright © 2008 Domain.Com. All Rights Reserved.
Page created in 0.101 seconds