YAFLogo

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
13 years ago
We have a forum category entitled 'sandbox' where troublemakers end up.

They can still post in the shoutbox though; any way to control this?


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

Sponsor
tommy382
13 years ago
I'm afraid you need to modify the code to do what you specified. It will just be a simple modification but you need to mod the code for that.
logan
  • logan
  • 100% (Exalted)
  • YAF Leader
13 years ago

If you are using a specific role to restrict the "TroubleMakers" access.

Add another condition to the Shoutbox visible property.

Replace "TroubleMaker" with the role name you use for restricted access.

Pages/Forum.ascx.cs line 108 Page_Load

 this.ShoutBox1.Visible = this.PageContext.BoardSettings.ShowShoutbox && (!RoleMembershipHelper.IsUserInRole (this.PageContext.PageUserName,"TroubleMaker")) ;

Pages/Forum.ascx

Remove the visible property from the shoutbox control

Visible='<%# PageContext.BoardSettings.ShowShoutbox %>' runat="server" />

Controls/Shoutbox.ascx.cs line 134 Page_Load

if (this.PageContext.User != null && (!RoleMembershipHelper.IsUserInRole(this.PageContext.PageUserName, "TroubleMaker")))

HTH


test
RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
13 years ago
That worked fine; many thanks!
Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com