Previous Thread
Next Thread
Print Thread
Rate Thread
#224946 09/22/2002 10:14 AM
Joined: Mar 2002
Posts: 6
Lurker
Lurker
Offline
Joined: Mar 2002
Posts: 6
Hey all,
I'm doing some free work for a Boys & Girls Club near me but I'm too new to PHP to figure this one out on my own. I would love some help with this if at all possible. Here's what I would like to be done. I am trying to get a combobox on the signup form with 3 age groups in it, 6-9, 10-12 and 13-18. I want Threads to see which one is selected and from that they get access to all the forums plus one chat forum that only their age groups is allowed in. I figured It would have to do with the user groups but is there any way to automate this rather than going in and hand adding people? If it can't be done too easily I understand fully. Anyways thanks for any help provided.

Sincerly,
Quantum

Sponsored Links
bugbee #224947 09/22/2002 10:55 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

sjsaunders #224948 09/24/2002 6:01 AM
Joined: Mar 2002
Posts: 6
Lurker
Lurker
Offline
Joined: Mar 2002
Posts: 6
Thanks a ton man!


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,575
Posts293,927
Members13,822
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
cgregg 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)