Kami
Forum Cat
Posts: 40,200
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,200
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jun 8, 2022 6:27:14 GMT -8
theavatarrp.comI don't think this is possible with just variables, but IIRC there's a user group key for js -- I'd want to count the # of people in Group A + ungrouped users (MVP would be everyone in Group A only).
|
|
#e61919
Support Manager
154778
0
1
Nov 19, 2024 9:09:18 GMT -8
Michael
19,616
May 2010
wiseowl
|
Post by Michael on Jun 8, 2022 12:27:05 GMT -8
Hi Kami,
I had to double check first but you can only get the current users group (and not the number of people in a group) as far as I'm aware.
|
|
Kami
Forum Cat
Posts: 40,200
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,200
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jun 8, 2022 13:00:16 GMT -8
Hi Kami, I had to double check first but you can only get the current users group (and not the number of people in a group) as far as I'm aware. Would it be possible to have a read of this old discussion here? The technical talk for js is a bit over my head but it seems like there may be a possible way to fudge the info? support.proboards.com/thread/654653/member-group-statistics-display
|
|
#e61919
Support Manager
154778
0
1
Nov 19, 2024 9:09:18 GMT -8
Michael
19,616
May 2010
wiseowl
|
Post by Michael on Jun 8, 2022 13:26:56 GMT -8
Hi Kami, I had to double check first but you can only get the current users group (and not the number of people in a group) as far as I'm aware. Would it be possible to have a read of this old discussion here? The technical talk for js is a bit over my head but it seems like there may be a possible way to fudge the info? support.proboards.com/thread/654653/member-group-statistics-displayA plugin could be made that would be able to kinda manage this given a bunch of different variables like a manual count being provided to the plugin and the plugin group(s) being only controlled/updated by staff. Then the plugin could simply count up and down as Peter suggested in the thread. Realistically though you're probably better off just doing a manual count, displaying it as plain text however you like on the forum, and then manually updating it as groups change. This is obviously manual but even the plugin version of this would still be a mostly manual operation.
|
|
Kami
Forum Cat
Posts: 40,200
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,200
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jun 8, 2022 13:44:37 GMT -8
Got it. That's unfortunately a bit too high maintenance (in an RP context, Im just trying to find out the number of OOC accounts -- I found a way to fudge the character account #s, but needed something for OOC). There'll just be too many people getting added to the OOC group on a fairly regular basis for me to count it out manually and keep updating the count. Thanks for looking into it! (And if you have any ideas please don't hesitate to share haha)
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,848
January 2015
msg
|
Post by Lynx on Jun 8, 2022 14:43:15 GMT -8
If I may pop my $0.02 here. This can be done via plugin and most likely a super forum key, but the key would have to populate as users logged in - since it wouldn't know what groups they are in until they do. pb.data('user').group_ids returns an array of all of the groups that the current user is in. One could then run a comparison to see if they belonged to a certain group to take action on. Also, if a member's group array changes (user added or removed from a group), the key would not update until their next login. This could also be done without a key if you are just taking an action on a user right away if they are/aren't in a particular group - as gathered by the array - and don't need to actually save which groups they are in.
|
|
Kami
Forum Cat
Posts: 40,200
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,200
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jun 8, 2022 14:55:41 GMT -8
If I may pop my $0.02 here. This can be done via plugin and most likely a super forum key, but the key would have to populate as users logged in - since it wouldn't know what groups they are in until they do. pb.data('user').group_ids returns an array of all of the groups that the current user is in. One could then run a comparison to see if they belonged to a certain group to take action on. Also, if a member's group array changes (user added or removed from a group), the key would not update until their next login. This could also be done without a key if you are just taking an action on a user right away if they are/aren't in a particular group - as gathered by the array - and don't need to actually save which groups they are in. The caveat of users needing to login is not a problem -- existing accounts will need to relog anyway (we're on a bit of a hiatus) and new accounts will by default need to log in. Since we use these for RP versus non RP accounts, there's a decent amount of switching going on as people swap between IC and OOC so the data will be refreshed regularly. Ideal user-end experience would be: join site > get put into OOC group > log out for their IC account app submission > relog into OOC to wait for the app approval PM (this triggers the recount). Plugin effect: Pop a number into the (custom, so it can't rely on default pb elements) info center. I'd just need to count anyone in the OOC group, now that I think of it, and we can ignore unsorted accounts entirely.
|
|