Different secondary groups on join for different MSNs

Post

Posted
Rating:
#4484 (In Topic #902)
Joe

+ possible bug

When adding or editing a group, there is a feature called "Automatic secondary usergroup" which allows a secondary group to be given to a member upon joining.

My MSN is configured to add all users to a default "registered" group once they join. But, I was hoping to configure the setting mentioned above differently on each MSN I am operating and add them to distinct secondary groups so I can distinguish which site the user registered on, however, group settings cannot be changed on satellite sites and just gives a weird error (which may be a bug):

You are running from a multi-site-network satellite which means you need to select an existing theme image for this resource (as uploads would not go to the central site), rather than uploading one. However all theme images from the cns_rank_images set seem to be missing.

This error occurs after selecting 'edit' on a usergroup from within a satellite site on a MSN.

Is it possible to manage group settings on a satellite site or is it restricted to just the main site?

To elaborate a bit on what I'm trying to accomplish, here's an example:
  • User registers on any of the following MSN sites
    • aaa.com
    • bbb.com
    • ccc.com
  • User is added to a primary 'Registered' usergroup regardless of where he/she registered from
  • User is then added to a secondary group upon join depending on the site they registered from
    • "AAA Member" will be assigned to users who sign up on aaa.com
    • "BBB Member" will be assigned to users who sign up on bbb.com
    • "CCC Member" will be assigned to users who sign up on ccc.com

I believe this would all be possible if I had the ability to modify groups from each satellite site, or at the very least, configure the "Automatic secondary usergroup" option within each site.

Post

Posted
Rating:
#4528
Hi,

You did find a minor bug with that error message, but the fix is not going to help you. Almost any call to something in a f_ prefixed table (e.g. f_groups) is going to go to the central site, i.e. they will share the same data. There's no kind of merge/override system.

You might be able to fudge something using CPFs. Make a user-editable CPF required at join. Note down the form field name it is using on the join form (e.g. field_14.
On each site override the FORM_SCREEN_FIELD template with something like:

Code

{$SET,make_hidden,{$AND,{$EQ,{NAME},field_14},{$MATCH_KEY_MATCH,:join}}}
{+START,IF,{$GET,make_hidden}}
<input type="hidden" name="{NAME*}" value="Some site" />
{+END}
{+START,IF,{$NOT,{$GET,make_hidden}}}
   (original template code goes here)
{+END}

Post

Posted
Rating:
#4561
Joe
Chris, I think I get the idea but not so sure the code works as intended.

I did what you said, but all this did was show the CPF on the join page without a default value but it still displayed the textarea even though our INPUT tag is "hidden". I imagine your solution was meant to populate the field with a default value and be hidden from the user?

Post

Posted
Rating:
#4562
Might be FORM_SCREEN_INPUT_HUGE_COMCODE.tpl template, if it's a multi-line Comcode field.

Post

Posted
Rating:
#4563
Joe
Sorry, it was the first template you mentioned. I was editing the wrong theme!

Thanks Chris, works like a charm!
0 guests and 0 members have recently viewed this.