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 
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button