Fearstalker
inherit
-6414866
0
Nov 28, 2024 10:57:30 GMT -8
Fearstalker
0
January 1970
GUEST
|
Post by Fearstalker on Aug 9, 2015 7:22:38 GMT -8
Hi, I have several groups created for my members. I don't want new members to be able to view or comment in the shout box until they have been assigned to a group. Is this possible to do and if so, could someone kindly provide me some details? Thank you!
So, presently, I have the requirement set to disallow guest access to Shoutbox. When someone creates a new forum account, they are assigned as a member and can start accessing the shoutbox. I would like to remove that capability. Once assigned to one of the groups, they could view and access Shoutbox.
Thank you all!
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Aug 9, 2015 8:50:31 GMT -8
Hi,
It's possible to limit shoutbox access to a specific group, but this comes at the cost of the user always having to display as that group within their profile since there's no other way for the layout templates to tell which group you're a part of.
Basically this is the modification you'd have to make to the $[shoutbox] variable in Themes > Layout Templates > Forum Wrapper:
|
|
Fearstalker
inherit
-6415198
0
Nov 28, 2024 10:57:30 GMT -8
Fearstalker
0
January 1970
GUEST
|
Post by Fearstalker on Aug 9, 2015 13:28:53 GMT -8
The way I am setting up the forum, a user will only ever be in a single group while on the forums. If I have 5 groups defined, can I script all of these groups to have the requisite access or is this limited to a single group? Many thanks for the quick reply.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Aug 9, 2015 13:40:00 GMT -8
If all of those groups are meant to have access to the shoutbox it's possible to include them all by changing the first line to something like this:
|
|
inherit
223408
0
Nov 22, 2015 11:34:05 GMT -8
liontini
7
July 2015
liontini
|
Post by liontini on Nov 22, 2015 9:13:40 GMT -8
This there a way to write the script to prevent members of group from having access to the shoutbox?
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,849
January 2015
msg
|
Post by Lynx on Nov 22, 2015 9:39:25 GMT -8
You could use Brian's code above with a bit of modification. However, I would strongly recommend that you create a new Member Group (no need to give it any powers) that will be used to prevent them from using the shoutbox. Then simply add / remove Members from that Group to disallow / allow them to use it.
Please take note that the red parenthesis were added in to separate the OR's from the AND. The No Shoutbox Use Group would be the name you gave for the Member Group you created to restrict Members from posting in the shoutbox.
You may want to wait for Brian to reply to see if my code above is syntaxed correctly, though.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Nov 22, 2015 10:55:20 GMT -8
You could use Brian's code above with a bit of modification. However, I would strongly recommend that you create a new Member Group (no need to give it any powers) that will be used to prevent them from using the shoutbox. Then simply add / remove Members from that Group to disallow / allow them to use it. The problem with that method is they have to be displaying as that group for the template's if statement to affect them. It can't go through all of the groups since the only variable available for groups is $[user.group] which checks against the group they're displaying as.
|
|