We are working on a maillinglist module that uses webgroups its almost finished but what we are looking for is a way to disable /hide the newsgroups that are mailgroups in the webuser admin/edit part of the manager. so that a manager can not add or remove people from a mailinglist. removing can be done in the module.
so I looked at the code and noticed the part where the webgroups are gathered:
<?php
echo $_lang['access_permissions_user_message']."<p />";
$sql = "SELECT name, id FROM $dbase.`".$table_prefix."webgroup_names` ORDER BY name";
$rs = mysql_query($sql);
$limit = mysql_num_rows($rs);
for($i=0; $i<$limit; $i++) {
$row=mysql_fetch_assoc($rs);
echo "<input type='checkbox' name='user_groups[]' value='".$row['id']."'".(in_array($row['id'], $groupsarray) ? " checked='checked'" : "")." />".$row['name']."<br />";
}
?>
for us a small hack would do the trick:
<?php
echo $_lang['access_permissions_user_message']."<p />";
$sql = "SELECT name, id FROM $dbase.`".$table_prefix."webgroup_names` WHERE type=0 ORDER BY name";
$rs = mysql_query($sql);
$limit = mysql_num_rows($rs);
for($i=0; $i<$limit; $i++) {
$row=mysql_fetch_assoc($rs);
echo "<input type='checkbox' name='user_groups[]' value='".$row['id']."'".(in_array($row['id'], $groupsarray) ? " checked='checked'" : "")." />".$row['name']."<br />";
}
?>
just adding WHERE type=0 would do the trick
but can this be done using a plugin or maybe jquery to hide those fields?
or is it only possible by hacking the core?
If we want to release this to the public that this issue must be fixed its not realy a cool idea to make user hack the core to make this module dummy proof.