Sorting member to group upon registration
4 posters
Page 1 of 2
Page 1 of 2 • 1, 2
Sorting member to group upon registration
Technical Details
Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
Forum link : ( link is hidden, you must reply to see )
Description of problem
Soo hey!Is it possible to sort a person upon registration to a specific member group? A person would complete a test and based on the results he would be added to a specific group. If that is not possible, then maybe activating a certain profile field would?
I imagine, that this could be done with an HTML page?
Re: Sorting member to group upon registration
Groups are only automatic by the number of posts.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Sorting member to group upon registration
No sorry you can only do it by post count or set it to non poster then 1 post then say 5 posts. There is no other way to do it.
Re: Sorting member to group upon registration
Yea, I had a feeling it is not possible.
What about profile field? Would that be possible? based on test results profile field would be assigned a specific value.
What about profile field? Would that be possible? based on test results profile field would be assigned a specific value.
Re: Sorting member to group upon registration
What about, if users name would be included in a widget or page info after the results?
Example:
1) on HTML page or widget or portal user does a test
2) Test result is A
3) Somewhere appears text - username A
Example:
1) on HTML page or widget or portal user does a test
2) Test result is A
3) Somewhere appears text - username A
Re: Sorting member to group upon registration
not really sure it can be done but maybe @luffy can say if it can or not.
but i think its something we can't do but i could be wrong thou.
but i think its something we can't do but i could be wrong thou.
Re: Sorting member to group upon registration
Well programming can do a lot
Question how to integrate that in HTML
Question how to integrate that in HTML
Re: Sorting member to group upon registration
Hello @Kami-sama,
I did not understand what exactly you want to do.. Could you please explain to me a little bit more?
Thanks and Happy New Year!
I did not understand what exactly you want to do.. Could you please explain to me a little bit more?
Thanks and Happy New Year!
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
Hey Luffy! so tis is what I imagine:
- user registers
- (if possible) during registration user completes a test
- test result is A
- somewhere text appears: username A
somewhere - either on that users profile or on a separate widget, html page.
- user registers
- (if possible) during registration user completes a test
- test result is A
- somewhere text appears: username A
somewhere - either on that users profile or on a separate widget, html page.
Re: Sorting member to group upon registration
Okay so i have 2 questions:
- What kind of test is this? I mean do you have the code for the test upon registration or do you need a code for it?
- This A that will be the result, do you want it to appear next to the username as A for example or to be included in the name?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
1. No, I do not ave the test. I would need a code for that as well.
2. A is a group the member would belong to. So as we cannot add member automatically to groups, then the username should just appear next to A.
2. A is a group the member would belong to. So as we cannot add member automatically to groups, then the username should just appear next to A.
Re: Sorting member to group upon registration
So what will the test be?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
Well it depends how complicated it can be and how the answers will be calcucalted.
For example:
Will every answer have points. And results would be in ranges like from 0-5 result a, from 6-10 result b and so on.
OR:
Answers will add a point directly to the result. And in the end prevails the result that has the most points.
Anyways, for the sence of testing we can do something like this:
1. First question?
1) B result
2) A result
3) C result
4) D result
2. Second question?
1) a result
2) d result
3) b result
4) c result
For example:
Will every answer have points. And results would be in ranges like from 0-5 result a, from 6-10 result b and so on.
OR:
Answers will add a point directly to the result. And in the end prevails the result that has the most points.
Anyways, for the sence of testing we can do something like this:
1. First question?
1) B result
2) A result
3) C result
4) D result
2. Second question?
1) a result
2) d result
3) b result
4) c result
Re: Sorting member to group upon registration
@Kami-sama so i managed to create a script that adds that letter to the username but do you want this to be visible all the times?
I mean i am a new user, and i register and i'm in group A. You want my username to show up Luffy and next to it the letter A forever?
I believe it's more simple if you simply do the ranking with profiles that way they'll show up automatically. Do you agree with this? Or do you want the A to be there forever?
I mean i am a new user, and i register and i'm in group A. You want my username to show up Luffy and next to it the letter A forever?
I believe it's more simple if you simply do the ranking with profiles that way they'll show up automatically. Do you agree with this? Or do you want the A to be there forever?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
I think you maybe misunderstood me
The goal of this test is to sort a member to a group.
As I understood, there is no way to have members sorted automatically.
There I and other Mods need a list of results. Example:
username1 - A
username2 - D
So as I see there could be 3 ways about this:
1) user sorted to group automatically (not possible)
2) user profile field value set with the test result
3) list of results as in example above
The goal of this test is to sort a member to a group.
As I understood, there is no way to have members sorted automatically.
There I and other Mods need a list of results. Example:
username1 - A
username2 - D
So as I see there could be 3 ways about this:
1) user sorted to group automatically (not possible)
2) user profile field value set with the test result
3) list of results as in example above
Re: Sorting member to group upon registration
Yes but sorting members can only be via these options:
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
Okay so you'll be creating 4 groups in which you will add members in there?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
Okay this script i made can create a rank (automatically) to those names with their group if you want!
Anyway, this script is ready if you want, only thing i need to know now is the test because we have to adjust it to the forum!
Anyway, this script is ready if you want, only thing i need to know now is the test because we have to adjust it to the forum!
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
By rank you mean something like we have here - "Forummember", "Manager"?
And one more thing, will it create a new rank every time or use already created ones?
And how the script can be implemented? HTML page? Portal? Widget?
P.S. Thank you for all your hard work
And one more thing, will it create a new rank every time or use already created ones?
And how the script can be implemented? HTML page? Portal? Widget?
P.S. Thank you for all your hard work
Re: Sorting member to group upon registration
Okay so here's how this script works:
You create 3 new profile fields.
1. Question1 that has 4 possible answers
2. Question2 that has 4 possible answers
3. Result that grabs both question answers and give you a group result.
Let me explain some more. So we have 2 questions. Each answer has some certain points:
Question 1:
- Answer 1 (2 pts)
- Answer 2 (3 pts)
- Answer 3 (4 pts)
- Answer 4 (5 pts)
Question 2:
- Answer 1 (2 pts)
- Answer 2 (3 pts)
- Answer 3 (4 pts)
- Answer 4 (5 pts)
Now you have a new field named Result which grabs the answers and based on their points it adds the group as their group. For example:
4-5 pts -> Group A
6-7 pts -> Group B
8-9 pts -> Group C
10 pts -> Group D
All you need to do is add the javascript, make the fields and add some CSS.
You create 3 new profile fields.
1. Question1 that has 4 possible answers
2. Question2 that has 4 possible answers
3. Result that grabs both question answers and give you a group result.
Let me explain some more. So we have 2 questions. Each answer has some certain points:
Question 1:
- Answer 1 (2 pts)
- Answer 2 (3 pts)
- Answer 3 (4 pts)
- Answer 4 (5 pts)
Question 2:
- Answer 1 (2 pts)
- Answer 2 (3 pts)
- Answer 3 (4 pts)
- Answer 4 (5 pts)
Now you have a new field named Result which grabs the answers and based on their points it adds the group as their group. For example:
4-5 pts -> Group A
6-7 pts -> Group B
8-9 pts -> Group C
10 pts -> Group D
All you need to do is add the javascript, make the fields and add some CSS.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
Oh this is great
After the test is completed the question fields will be still visible or no?
I can test te script right now
P.S. Many of my templates are adjusted so hopefully it will not be an issue.
P.P.S. Would this test be available only upon registration or for anyone who hasn't completed it yet? If it's the last option, is it possible to apply rank change only if a member has a specific rank? I think a simple if would do that.
After the test is completed the question fields will be still visible or no?
I can test te script right now
P.S. Many of my templates are adjusted so hopefully it will not be an issue.
P.P.S. Would this test be available only upon registration or for anyone who hasn't completed it yet? If it's the last option, is it possible to apply rank change only if a member has a specific rank? I think a simple if would do that.
Re: Sorting member to group upon registration
These adjustments can be always changed by you. You can tell whether members will be able to see this field or not when you create the fields.
So i will post a tutorial below in a few moments because i need to explain in detail what each thing is okay?
So i will post a tutorial below in a few moments because i need to explain in detail what each thing is okay?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
Fields Creation:
Field 1:
Type: A list
Name: Question 1 (or whatever you want)
Description: Anything you want
URL icon: if you want you can add one
Necessarily filled? Yes
Display: Choose where you want them to show (i recommend only Profiles)
Display Type: Text
Who can modify the profile field value? Moderators (so members can't edit this) This way you can ask members these questions and you can edit these fields on their profiles or do it as you wish.
Display this field for users that are at least: Members
Separator: Back to the line
Now as list you can add the 4 potential answers. Let's say those answers are:
- Answer 1
- Answer 2
- Answer 3
- Answer 4
Now you have to create a second field with the exact same information.
For the third field you create it like this:
Type: Text Zone
Name: Test Result (or whatever you want)
Description: Anything you want
URL icon: if you want you can add one
Necessarily filled? No
Display: Choose where you want them to show (i recommend only Profiles)
Display Type: Text
Who can modify the profile field value? None because this field will not be touched.
Display this field for users that are at least: Members
Separator: Back to the line
and to the Text Zone as the default text you have to add this:
- Code:
[table id="resultTest"][tr][td][/td][/tr][/table]
Javascript:
Now once you add the below javascript you need to make sure you add the correct profile field ids. Here's the javascript code:Name: Anything
Placement: In all the pages
Code:
- Code:
//Code by Luffy
$(document).ready(function(){
var a=$('dl#field_id1 .field_uneditable'), // id1
b=$('dl#field_id2 .field_uneditable'); // id2
//Question 1 Answers
$('dl#field_id1 .field_uneditable:contains(Answer 1)').addClass('2ptsA'); // id1
$('dl#field_id1 .field_uneditable:contains(Answer 2)').addClass('3ptsA'); // id1
$('dl#field_id1 .field_uneditable:contains(Answer 3)').addClass('4ptsA'); // id1
$('dl#field_id1 .field_uneditable:contains(Answer 4)').addClass('5ptsA'); // id1
//Question 2 Answers
$('dl#field_id2 .field_uneditable:contains(Answer 1)').addClass('2ptsB'); // id2
$('dl#field_id2 .field_uneditable:contains(Answer 2)').addClass('3ptsB'); // id2
$('dl#field_id2 .field_uneditable:contains(Answer 3)').addClass('4ptsB'); // id2
$('dl#field_id2 .field_uneditable:contains(Answer 4)').addClass('5ptsB'); // id2
if ( a.hasClass('2ptsA') && b.hasClass('2ptsB') || a.hasClass('2ptsA') && b.hasClass('3ptsB') || a.hasClass('3ptsA') && b.hasClass('2ptsB') ) {
$('table#resultTest').addClass('groupA');
} else if ( a.hasClass('3ptsA') && b.hasClass('3ptsB') || a.hasClass('2ptsA') && b.hasClass('4ptsB') || a.hasClass('4ptsA') && b.hasClass('2ptsB') || a.hasClass('4ptsA') && b.hasClass('3ptsB') || a.hasClass('3ptsA') && b.hasClass('4ptsB') || a.hasClass('2ptsA') && b.hasClass('5ptsB') || a.hasClass('5ptsA') && b.hasClass('2ptsB') ) {
$('table#resultTest').addClass('groupB')
} else if ( a.hasClass('4ptsA') && b.hasClass('4ptsB') || a.hasClass('3ptsA') && b.hasClass('5ptsB') || a.hasClass('5ptsA') && b.hasClass('3ptsB') || a.hasClass('4ptsA') && b.hasClass('5ptsB') || a.hasClass('5ptsA') && b.hasClass('4ptsB') ) {
$('table#resultTest').addClass('groupC')
} else if ( a.hasClass('5ptsA') && b.hasClass('5ptsB') ) {
$('table#resultTest').addClass('groupD')
}
});
Modifications:
Now as you can see in the javascript you can see the possible answers of the 2 fields. Now depending on the answers you added, please change the text in the parenthesis.
Also i have added some id1 and id2 comments in there to locate the parts where the 2 fields are. Now to indicate those fields ids go to your profile, find the question fields, right click > inspect element and check what id they are under:
- Example:
After you do those modifications, click Submit.
CSS
Lastly you have to add this CSS:- Code:
table#resultTest.groupA:before{content:'Group A'}
table#resultTest.groupB:before{content:'Group B'}
table#resultTest.groupC:before{content:'Group C'}
table#resultTest.groupD:before{content:'Group D'}
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Sorting member to group upon registration
Well instructions seamed simple enough. But the result does not change.
I am positive, that IDs are correct and answers match.
Also, maybe it is possible to use simple math, rather than classes? It would be more simple, just to add values to an argument and then check IF r>=10, else if r>=5, else if r>=0
Also, what's the outcome if user selects "no choice".
I am positive, that IDs are correct and answers match.
Also, maybe it is possible to use simple math, rather than classes? It would be more simple, just to add values to an argument and then check IF r>=10, else if r>=5, else if r>=0
Also, what's the outcome if user selects "no choice".
Re: Sorting member to group upon registration
Nothing will show if they don't select anything. Now because i added classes i thought it would be simple enough like that. But because it doesn't sum anything due to class additions i didn't add any rules.
What are the answers you added? Also what are the fields ids and what script you use now? Just to make sure everything is okay..
What are the answers you added? Also what are the fields ids and what script you use now? Just to make sure everything is okay..
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Page 1 of 2 • 1, 2
Similar topics
» Sorting of new users upon registration
» Registration for New member
» Member registration
» New Member Registration
» New Member Registration
» Registration for New member
» Member registration
» New Member Registration
» New Member Registration
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum