The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Sorting member to group upon registration

4 posters

Page 1 of 2 1, 2  Next

Go down

In progress Sorting member to group upon registration

Post by Kami-sama Tue 3 Jan 2017 - 17:49

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?
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by SLGray Tue 3 Jan 2017 - 22:02

Groups are only automatic by the number of posts.



Sorting member to group upon registration Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51583
Reputation : 3526
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Ape Tue 3 Jan 2017 - 22:41

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.


Sorting member to group upon registration Left1212Sorting member to group upon registration Center11Sorting member to group upon registration Right112
Sorting member to group upon registration Ape_b110
Sorting member to group upon registration Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19460
Reputation : 2012
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Wed 4 Jan 2017 - 9:12

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.
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Ape Wed 4 Jan 2017 - 19:23

No sorry it can only be done by hand.


Sorting member to group upon registration Left1212Sorting member to group upon registration Center11Sorting member to group upon registration Right112
Sorting member to group upon registration Ape_b110
Sorting member to group upon registration Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19460
Reputation : 2012
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Wed 4 Jan 2017 - 21:14

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
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Ape Wed 4 Jan 2017 - 23:13

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.


Sorting member to group upon registration Left1212Sorting member to group upon registration Center11Sorting member to group upon registration Right112
Sorting member to group upon registration Ape_b110
Sorting member to group upon registration Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19460
Reputation : 2012
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Wed 4 Jan 2017 - 23:24

Well programming can do a lot Very Happy
Question how to integrate that in HTML
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Ape Wed 4 Jan 2017 - 23:29

I'm really not sure sorry


Sorting member to group upon registration Left1212Sorting member to group upon registration Center11Sorting member to group upon registration Right112
Sorting member to group upon registration Ape_b110
Sorting member to group upon registration Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19460
Reputation : 2012
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 11:14

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!


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 12:13

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.
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 13:11

Okay so i have 2 questions:
  1. 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?
  2. 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?


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 13:20

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.
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 14:51

So what will the test be?


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 15:32

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
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 20:02

@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?


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 20:54

I think you maybe misunderstood me Wink

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
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 21:02

Yes but sorting members can only be via these options:
Sorting member to group upon registration Abdeaa10


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 21:03

By "sorting" I mean assigning to a group ;D
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 21:13

Okay so you'll be creating 4 groups in which you will add members in there?


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 21:15

Exactly!
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 21:16

Okay this script i made can create a rank (automatically) to those names with their group if you want! Wink

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! Wink


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 21:20

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 Smile
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 21:28

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.


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 21:31

Oh this is great Smile

After the test is completed the question fields will be still visible or no?
I can test te script right now Wink

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.
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 21:52

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?


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 21:56

Sure Wink Thank you lots!!
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 22:19

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'}
and change the group names as you want.


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by Kami-sama Thu 5 Jan 2017 - 22:46

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".
Kami-sama
Kami-sama
Forumember

Female Posts : 407
Reputation : 12
Language : EN, RU, DE, LT
Location : Lithuania

http://hogas.huhohi.com/

Back to top Go down

In progress Re: Sorting member to group upon registration

Post by TheCrow Thu 5 Jan 2017 - 22:58

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.. Wink


Sorting member to group upon registration Thecro10
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!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum