<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Group type setting</title>
		<link>https://www.cotonti.com</link>
		<description>Son konu mesajları</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 02 May 2026 22:22:46 -0000</pubDate>

		<item>
			<title>GHengeveld</title>
			<description><![CDATA[I thınk dısabled shouldnt be put ın grp_type because you could have both hıdden and sub-only.<br />
Enabled dısabled ıs ınterestıng we could do more wıth that.<br />
<br />
Pardon my spellıng, usıng a turkısh keyboard ıs quıte trıcky... (ım on vacatıon ın alanya)]]></description>
			<pubDate>Paz, 03 Mayıs 2009 02:17:01 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=2584&d=0#post11988]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[Interestingly, there is an Enabled/Disabled (grp_disabled) option for groups but it is not used anywhere at all. Probably we could just use it so &quot;Disabled&quot; groups don't show at all or something.]]></description>
			<pubDate>Sal, 28 Nis 2009 12:27:50 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=2584&d=0#post11860]]></link>
		</item>
		<item>
			<title>pieter</title>
			<description><![CDATA[Hidden group is in seditio only for hidding the group.<br />
<br />
I was looking once how to hide users from a specific group.<br />
<br />
eg all banned users. <br />
It is nice to keep them for there IP and usernames. But also nice to get them out of the user list, to see all normal users.<br />
<br />
Maybe an idea to think about when you change some stuff of the usersgroups.]]></description>
			<pubDate>Sal, 28 Nis 2009 02:05:03 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=2584&d=0#post11854]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[This could be useful together with <a href="http://www.cotonti.com/forums.php?m=posts&amp;q=2076">right-less groups</a><br />
<br />
UPD:<br />
<br />
So far we found these types of groups usable:<br />
<ul>
<li>Normal group</li>
<li>Hidden group</li>
<li>Sub group only</li>
<li>Right-less status group</li>
</ul>
<br />
I think there should be just one field (grp_type) in the sed_groups table for all of them and group type should be selectable with a dropdown in Admin. Then scripts will check this field and implement appropriate behavior depending on group type.<br />
<br />
What do you think?]]></description>
			<pubDate>Pzt, 27 Nis 2009 12:08:31 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=2584&d=0#post11845]]></link>
		</item>
		<item>
			<title>GHengeveld</title>
			<description><![CDATA[This will add an option in user group settings. You can limit the group type a group can be set as. For example, you can have both regular users and Premium users. Normally, you would be able to set Premium user as Main group. With this patch you can disallow setting this group as main group, so it can only be set as a subgroup. This will make sure your Premium users are always inside the Users main group (or another Main group option).<br />
This is especially useful if you have a lot of different groups and multiple website administrators (with the right to edit a user's group).<br />
<br />
<strong>1. Adding database column</strong><br />
Run the following SQL query on your database:<br />
<pre class="code">ALTER TABLE 'sed_groups' ADD 'grp_type' VARCHAR(4) NOT NULL DEFAULT 'both';</pre>
<br />
<strong>2. Adding language items</strong><br />
Inside system/lang/xx/admin.lang.php on line 358, add:<br />
<pre class="code">$L&#091;'adm_rights_grouptype'&#093; = 'Can be set as';
$L&#091;'adm_rights_grouptype_both'&#093; = 'Main and sub group';
$L&#091;'adm_rights_grouptype_sub'&#093; = 'Sub group only';</pre>
<br />
<strong>3. New group selectbox</strong><br />
In system/core/admin/admin.users.inc.php on line 255, add:<br />
<pre class="code">$adminmain .= &quot;&lt;tr&gt;&lt;td&gt;&quot;.$L&#091;'adm_rights_grouptype'&#093;.&quot; :&lt;/td&gt;&lt;td&gt;&quot;;
$adminmain .= &quot;&lt;select name=\&quot;ntype\&quot;&gt;&quot;;
$adminmain .= &quot;&lt;option value=\&quot;both\&quot;&gt;&quot;.$L&#091;'adm_rights_grouptype_both'&#093;.&quot;&lt;/option&gt;&quot;;
$adminmain .= &quot;&lt;option value=\&quot;sub\&quot;&gt;&quot;.$L&#091;'adm_rights_grouptype_sub'&#093;.&quot;&lt;/option&gt;&quot;;
$adminmain .= &quot;&lt;/select&gt;&quot;;
$adminmain .= &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;</pre>
<br />
On line 47, add:<br />
<pre class="code">$ntype = sed_import('ntype','P','TXT');</pre>
<br />
On line 50 there should be an SQL query, replace it with:<br />
<pre class="code">$sql = (!empty($ntitle)) ? sed_sql_query(&quot;INSERT INTO $db_groups (grp_alias, grp_level, grp_disabled, grp_hidden,  grp_maintenance, grp_type, grp_title, grp_desc, grp_icon, grp_pfs_maxfile, grp_pfs_maxtotal, grp_ownerid) VALUES ('&quot;.sed_sql_prep($nalias).&quot;', &quot;.(int)$nlevel.&quot;, &quot;.(int)$ndisabled.&quot;, &quot;.(int)$nhidden.&quot;,  &quot;.(int)$nmtmode.&quot;, '&quot;.sed_sql_prep($ntype).&quot;', '&quot;.sed_sql_prep($ntitle).&quot;', '&quot;.sed_sql_prep($ndesc).&quot;', '&quot;.sed_sql_prep($nicon).&quot;', &quot;.(int)$nmaxsingle.&quot;, &quot;.(int)$nmaxtotal.&quot;, &quot;.(int)$usr&#091;'id'&#093;.&quot;)&quot;) : '';</pre>
<br />
<strong>4. Edit group selectbox</strong><br />
On line 81, add:<br />
<pre class="code">$rtype = sed_import('rtype','P','TXT');
$rtype = sed_sql_prep($rtype);</pre>
<br />
Somewhere around line 88 there should be an SQL query, replace it with:<br />
<pre class="code">$sql = (!empty($rtitle)) ? sed_sql_query(&quot;UPDATE $db_groups SET grp_title='$rtitle', grp_desc='$rdesc', grp_icon='$ricon', grp_alias='$ralias', grp_level='$rlevel', grp_pfs_maxfile='$rmaxfile', grp_pfs_maxtotal='$rmaxtotal', grp_disabled='$rdisabled', grp_hidden='$rhidden', grp_maintenance='$rmtmode', grp_type='$rtype' WHERE grp_id='$g'&quot;) : '';</pre>
<br />
On line 170, add:<br />
<pre class="code">$selected_both = ($row&#091;'grp_type'&#093; == 'both') ? ' selected=&quot;selected&quot;' : '';
$selected_sub = ($row&#091;'grp_type'&#093; == 'sub') ? ' selected=&quot;selected&quot;' : '';
	
$adminmain .= &quot;&lt;tr&gt;&lt;td&gt;&quot;.$L&#091;'adm_rights_grouptype'&#093;.&quot; :&lt;/td&gt;&quot;;
$adminmain .= &quot;&lt;td&gt;&lt;select name=\&quot;rtype\&quot;&gt;&quot;;
$adminmain .= &quot;&lt;option value=\&quot;both\&quot;$selected_both&gt;&quot;.$L&#091;'adm_rights_grouptype_both'&#093;.&quot;&lt;/option&gt;&quot;;
$adminmain .= &quot;&lt;option value=\&quot;sub\&quot;$selected_sub&gt;&quot;.$L&#091;'adm_rights_grouptype_sub'&#093;.&quot;&lt;/option&gt;&quot;;
$adminmain .= &quot;&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;</pre>
<br />
<strong>5. Modifying groups selection</strong><br />
In system/functions.php, on line 1249, find sed_build_groupsms(). Replace the entire function with:<br />
<br />
<pre class="code">function sed_build_groupsms($userid, $edit=FALSE, $maingrp=0)
{
	global $db_groups, $db_groups_users, $sed_groups, $L, $usr;

	$sql = sed_sql_query(&quot;SELECT gru_groupid FROM $db_groups_users WHERE gru_userid='$userid'&quot;);
	while ($row = sed_sql_fetcharray($sql))
	{
		$member&#091;$row&#091;'gru_groupid'&#093;&#093; = TRUE;
	}
	
	$sql = sed_sql_query(&quot;SELECT grp_id, grp_type FROM $db_groups&quot;);
	$onlysub&#091;&#093; = '';
	while ($row = sed_sql_fetcharray($sql))
	{
		if ($row&#091;'grp_type'&#093; == 'sub') $onlysub&#091;&#093; = $row&#091;'grp_id'&#093;;
	}

	foreach($sed_groups as $k =&gt; $i)
	{
		$checked = ($member&#091;$k&#093;) ? &quot;checked=\&quot;checked\&quot;&quot; : '';
		$checked_maingrp = ($maingrp==$k) ? &quot;checked=\&quot;checked\&quot;&quot; : '';
		
		$readonly = (!$edit || $usr&#091;'level'&#093; &lt; $sed_groups&#091;$k&#093;&#091;'level'&#093; || $k==SED_GROUP_GUESTS || $k==SED_GROUP_INACTIVE || $k==SED_GROUP_BANNED || ($k==SED_GROUP_TOPADMINS &amp;&amp; $userid==1)) ? &quot;disabled=\&quot;disabled\&quot;&quot; : '';
		$readonly_maingrp = (!$edit || $usr&#091;'level'&#093; &lt; $sed_groups&#091;$k&#093;&#091;'level'&#093; || $k==SED_GROUP_GUESTS || ($k==SED_GROUP_INACTIVE &amp;&amp; $userid==1) || ($k==SED_GROUP_BANNED &amp;&amp; $userid==1) || in_array($k, $onlysub)) ? &quot;disabled=\&quot;disabled\&quot;&quot; : '';

		if ($member&#091;$k&#093; || $edit)
		{
			if (!($sed_groups&#091;$k&#093;&#091;'hidden'&#093; &amp;&amp; !sed_auth('users', 'a', 'A')))
			{
				$res .= &quot;&lt;input type=\&quot;radio\&quot; class=\&quot;radio\&quot; name=\&quot;rusermaingrp\&quot; value=\&quot;$k\&quot; &quot;.$checked_maingrp.&quot; &quot;.$readonly_maingrp.&quot; /&gt; \n&quot;;
				$res .= &quot;&lt;input type=\&quot;checkbox\&quot; class=\&quot;checkbox\&quot; name=\&quot;rusergroupsms&#091;$k&#093;\&quot; &quot;.$checked.&quot; $readonly /&gt;\n&quot;;
				$res .= ($k == SED_GROUP_GUESTS) ? $sed_groups&#091;$k&#093;&#091;'title'&#093; : &quot;&lt;a href=https://www.cotonti.com/\&quot;&quot;.sed_url('users', 'gm='.$k).&quot;\&quot;&gt;&quot;.$sed_groups&#091;$k&#093;&#091;'title'&#093;.&quot;&lt;/a&gt;&quot;;
				$res .= ($sed_groups&#091;$k&#093;&#091;'hidden'&#093;) ? ' ('.$L&#091;'Hidden'&#093;.')' : '';
				$res .= &quot;&lt;br /&gt;&quot;;
			}
		}
	}

	return $res;
}</pre>[/][/]]]></description>
			<pubDate>Cmt, 11 Nis 2009 03:50:41 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=2584&d=0#post11292]]></link>
		</item>
	</channel>
</rss>