In your newuser_signup.tmpl file find this:
code:
<br />
<br />
<input type="submit" name="buttsubmit" value="{$ubbt_lang['BUTT_SUBMIT']}" class="buttons" />
and change it to this:
code:
<select id="optingroups" name="optingroups" class="formboxes">
<option value="" selected="selected">Select Age Group</option>
<option value="5-">6 - 9</option>
<option value="6-">10 - 12</option>
<option value="7-">13 - 18</option>
</select>
<br />
<br />
<input type="submit" name="buttsubmit" value="{$ubbt_lang['BUTT_SUBMIT']}" class="buttons" />
Now in your adduser.php script find this:
code:
// ------------------------------------------------------------
// If all required info is not filled in, then we can't proceed
if((!$Username)||(!$Email)||($agree != "yes")){
$html -> not_right($ubbt_lang['ALL_FIELDS'],$Cat);
}
and change it to this:
code:
// ------------------------------------------------------------
// If all required info is not filled in, then we can't proceed
if((!$optingroups)||(!$Username)||(!$Email)||($agree != "yes")){
$html -> not_right($ubbt_lang['ALL_FIELDS'],$Cat);
}
Find this:
code:
$Groups = $config['newusergroup'];
and change it to this:
code:
$Groups = $config['newusergroup'];
$Groups .= $optingroups;
Ok I believe that should do it.
You can deligate what groups all new users are assigned to by editing your configure file from the admin directory. What the above code does is assign an additional group to the default groups depending on their selected age group. Make sure the groups values in the selection menu exist and are correct and they must end with the "-" character. On a fresh install of .threads there are 4 groups, Administrator(1), Moderator(2), User(3) and Guest(4). Each new group created thereafter is sequential from 5 forward. If you added 3 chat groups they would be 5, 6 and 7.
I think I'm seeing this correctly but you may want to test it out first.