inherit
267816
0
Jun 5, 2023 14:16:46 GMT -8
alexandra1
3
April 2023
alexandra1
|
Post by alexandra1 on May 31, 2023 22:42:48 GMT -8
Forum URL: christiangirls.freeforums.netI would like to make the shoutbox visible to only members in certain member groups. Is this possible? I found the code to prevent guests from viewing the shout box but Iโm not clever enough with coding to do what I want with the member groups. Thanks for the help. Alex
|
|
#eb7100
1480
0
1
Apr 23, 2024 4:10:18 GMT -8
Craig
208,867
September 2001
cmdynasty
|
Post by Craig on Jun 1, 2023 3:16:21 GMT -8
Hi This is possible, yes. If you open up your Forum Wrapper template and look for the $[shoutbox] tag. If you put an if statement around that tag, checking for which group the member is in, it will only show to those groups: {if $[current_user.group.id] == 1 || $[current_user.group.id] == 2} $[shoutbox]{/if} Change the 1 and 2 to the ID of groups you want to view the shoutbox. Let me know if you want it to include more or less groups, or if you don't know how to obtain the group's ID. Craig
|
|
inherit
267816
0
Jun 5, 2023 14:16:46 GMT -8
alexandra1
3
April 2023
alexandra1
|
Post by alexandra1 on Jun 1, 2023 18:22:56 GMT -8
Hi This is possible, yes. If you open up your Forum Wrapper template and look for the $[shoutbox] tag. If you put an if statement around that tag, checking for which group the member is in, it will only show to those groups: {if $[current_user.group.id] == 1 || $[current_user.group.id] == 2} $[shoutbox]{/if} Change the 1 and 2 to the ID of groups you want to view the shoutbox. Let me know if you want it to include more or less groups, or if you don't know how to obtain the group's ID. Craig Thank you for the prompt reply Craig. Do you mean the code in the link that says โforum wrapperโ (because I canโt find the shout box tag in there, or do you mean what I get when I click the link on the template page for the shout box? Apologies if Iโm being really dense here. I would like 3 member groups to be able to view the shoutbox. I am assuming that as long as members are in one of those groups they will be able to see it, even if they are also in other groups. Is that correct? The groups I would like to have access are: Member Parent Adult Where do I find there group numbers? Thanks Alex
|
|
inherit
140147
0
Apr 20, 2024 22:11:25 GMT -8
Nscalerr ๐บ
Throw me to the wolves and I'll return leading the pack!
3,003
May 2009
nscalerr
|
Post by Nscalerr ๐บ on Jun 1, 2023 23:51:16 GMT -8
Hi alexandra1Go to Admin Home > Themes > Layout Templates > Forum Wrapper template and look for $[shoutbox] to do the change that Craig is talking about. To find the groups go to your profile on the forum and click on the Groups tab, when you hover over each one you will see the id for that group. For example Administrator is 1 - group/1
|
|
inherit
267816
0
Jun 5, 2023 14:16:46 GMT -8
alexandra1
3
April 2023
alexandra1
|
Post by alexandra1 on Jun 2, 2023 2:56:21 GMT -8
Hi alexandra1Go to Admin Home > Themes > Layout Templates > Forum Wrapper template and look for $[shoutbox] to do the change Thanks for that. When I look at the forum wrapper template I donโt see the $[shoutbox] tag anywhere.
|
|
#eb7100
1480
0
1
Apr 23, 2024 4:10:18 GMT -8
Craig
208,867
September 2001
cmdynasty
|
Post by Craig on Jun 2, 2023 3:07:48 GMT -8
Hi alexandra1 Go to Admin Home > Themes > Layout Templates > Forum Wrapper template and look for $[shoutbox] to do the change Thanks for that. When I look at the forum wrapper template I donโt see the $[shoutbox] tag anywhere. Check the Home template instead. If you still can't find it, let us know
|
|
#e61919
Support Staff
224482
0
Member is Online
1
Apr 23, 2024 8:09:02 GMT -8
Scott
23,268
August 2015
socalso
|
Post by Scott on Jun 2, 2023 6:24:43 GMT -8
Hi alexandra1Go to Admin Home > Themes > Layout Templates > Forum Wrapper template and look for $[shoutbox] to do the change Thanks for that. When I look at the forum wrapper template I donโt see the $[shoutbox] tag anywhere. You will find it on line 72 of the Forum Wrapper layout template. I will note that because this is a template modification it will only apply to the theme where you make this change. If you have more than one theme for members to use, you will need to make the same modification to those themes as well.
|
|