inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 22, 2017 7:50:25 GMT -8
Hi, I was just wondering if there was away to make the shoutbox only view able by certain groups. I know that {if $[current_user.is_member]} $[shoutbox] {/if} makes it only viewable to members is there away to make it certain groups. Kind regards, flyburn
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Oct 22, 2017 17:25:17 GMT -8
Yes.
{if $[current_user.group_name] == "Group Name Here"} $[shoutbox] {/if}
If you want to add more than one group, add this before the closing } in the opening if statement:
|| $[current_user.group_name] == "Group Name Here"
Be sure to add a space between the closing " of the first name and the || of the next.
Lastly, group names are case sensitive. "admin" and "Admin" are considered two different groups (as an example).
Hope this helps!
|
|
inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 24, 2017 2:39:36 GMT -8
Sorry little confused could you give an example of 2-3 groups being used
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Oct 24, 2017 8:08:09 GMT -8
Sure:
{if $[current_user.group_name] == "Group Name Here" || $[current_user.group_name] == "Group Name Here 2" || $[current_user.group_name] == "Group Name Here 3"} $[shoutbox] {/if}
|
|
inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 24, 2017 9:02:39 GMT -8
{/if} $[content] {if $[current_user.group_name] == "Admin" || $[current_user.group_name] == "King" || $[current_user.group_name] == "Arch Duke" || $[current_user.group_name] == "Duke" || $[current_user.group_name] == "Count" || $[current_user.group_name] == "Baron" || $[current_user.group_name] == "Marshal" || $[current_user.group_name] == "Castellan" || $[current_user.group_name] == "Royal Guard" || $[current_user.group_name] == "Knight" || $[current_user.group_name] == "Squire" || $[current_user.group_name] == "Footman" || $[current_user.group_name] == "Archer" || $[current_user.group_name] == "Doctor" || $[current_user.group_name] == "Smith" || $[current_user.group_name] == "Levy"} $[shoutbox] {/if}
|
|
inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 24, 2017 9:02:52 GMT -8
Does not seem to work for me
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Oct 24, 2017 10:24:48 GMT -8
I will need a link to your forum. Can you elaborate on what you're doing to test whether or not the template is working?
|
|
inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 24, 2017 11:07:54 GMT -8
So I am running a forum for a clan on a game and I would like it so everyone who has a rank from levy to king can access the shoutbox. But I don't want it so anyone can access it who has made an account. This is the link to my forum houseofburgundy.boards.net/
|
|
inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 24, 2017 11:24:54 GMT -8
The image is not very good of what I typed in I think its got something to do with the lines I typed it in. I link to the image on migru:Image
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Oct 24, 2017 12:06:10 GMT -8
I created a test account on your forum (kamitest) and do not see the shoutbox; it is also not visible as a guest. What are you experiencing on your end? How are you determining the above template modification is not functioning as it should?
|
|
inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 24, 2017 12:17:04 GMT -8
cause someone who is a levy and somoen who is a baron cant see I cant see as admin caount and a doctor cant see it
|
|
inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 24, 2017 12:19:09 GMT -8
Made you an admin
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Oct 24, 2017 12:31:24 GMT -8
flyburn11 - While I appreciate it, please do not make me, or any stranger, an admin on your forum. This is a major security risk. Please demote my account as soon as possible. My apologies, I made a syntax error. Please change $[current_user.group_name] to $[current_user.group.name]Also, "Admin" is not the name of your administrator group which is why it's not working for you. Admin is your account display name. You need to change this to "Administrator" instead. Let me know how that works.
|
|
inherit
250020
0
May 5, 2024 3:32:16 GMT -8
flyburn11
12
October 2017
flyburn11
|
Post by flyburn11 on Oct 24, 2017 12:38:10 GMT -8
Thank you very much this has resolved the issue.
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Oct 24, 2017 14:12:30 GMT -8
Good to hear! You're welcome (:
|
|