bai
Junior Member
I coughed. Then I went into labor.
Posts: 209
inherit
tbsofficial@outlook.com
241711
0
Sept 23, 2018 14:23:39 GMT -8
bai
I coughed. Then I went into labor.
209
February 2017
bai
|
Post by bai on Mar 15, 2018 17:56:29 GMT -8
Hello!
I was wondering if there is any way to restrict replying to the shoutbox unless you are in a certain group, a staff member, and/or have a certain rank? I want regular, non-qualifying members to be able to see the shoutbox, but the reply box is inaccessible and says "You must be a VIP to use the shoutbox." or whatever.
Is this even possible on PB?
thanks
|
|
#eb7100
1480
0
1
Jun 13, 2024 4:46:26 GMT -8
Craig
208,931
September 2001
cmdynasty
|
Post by Craig on Mar 16, 2018 3:01:27 GMT -8
Hi You can do that with a modification of the shoutbox template admin > themes > layout templates > shoutbox Find this section: {if $[can.post]} <div class="shoutbox_form_container"> $[shoutbox_form.header] <div class="shoutbox_name"> {if $[shoutbox_form.guest_name.input]} Shout as: $[shoutbox_form.guest_name.input] {else} Shouting as: $[current_user] {/if} </div> <div class="shoutbox_form content-box"> $[shoutbox_error] $[refresh_button] $[reply_box_buttons] $[shoutbox_form.message.input] $[message_character_count] $[post_button] $[cancel_button] </div> $[shoutbox_form.footer] </div> {/if} And put it in an if statement checking for the user's group: {if $[current_user.group.id] == 1}
Put code above here
{else}
You must be a VIP to use the shoutbox
{/if} Replace the 1 with the ID of the group you want to be able to use the shoutbox. Any problems, let us know
|
|
#e61919
Support Staff
224482
0
Member is Online
1
Jun 13, 2024 16:35:45 GMT -8
Scott
23,522
August 2015
socalso
|
Post by Scott on Mar 16, 2018 6:17:26 GMT -8
Hello! I was wondering if there is any way to restrict replying to the shoutbox unless you are in a certain group, a staff member, and/or have a certain rank? I want regular, non-qualifying members to be able to see the shoutbox, but the reply box is inaccessible and says "You must be a VIP to use the shoutbox." or whatever. Is this even possible on PB? thanks Actually if you want to satisfy either one of the three conditions you mentioned then change the first line of code Craig gave you to this: {if $[current_user.group.id] == 1 || $[current_user.is_staff] || $[current_user.rank.id] >= 3} For the last variable current user rank, change the '3' to the minimum rank you will allow to use the shoutbox. Additionally, if you have more than one theme on the forum, you would need to make these modifications to all the themes.
|
|
bai
Junior Member
I coughed. Then I went into labor.
Posts: 209
inherit
tbsofficial@outlook.com
241711
0
Sept 23, 2018 14:23:39 GMT -8
bai
I coughed. Then I went into labor.
209
February 2017
bai
|
Post by bai on Mar 22, 2018 16:50:30 GMT -8
Thanks!
|
|