YAFLogo

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
Do we have the functionality to allow a user to read/post in a forum after they've exceeded X amount of posts? I have a poor understanding of Roles and Access Masks and I've only briefly looked.

Sponsor
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
is it possible to have a forum available only to users with more than X amount of posts?
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago
No this is currently not possible. But such feature would be a great addition.
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
I'm trying to restrict access to a page predicated on user post count. I was hoping it would be something simple like this...

sPostCount = YAF.Core.YafContext.Current.User.*****.ToString();

Do we have a method for getting the post count or would I have to do a SQL query using the UserID?

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
Couldn't figure it out, so I just used this instead.

SELECT COUNT(MessageID) FROM yaf_Message WHERE UserID = @UserId
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
I'm creating a subforum that I want to restrict access to those who do not have 100 or more posts to be able to view.

I hate having to manually add people one by one, so I'm trying to think of another method.

Theory....

Forum1

- Subforum1

Forum1 will have a topic stickied with a link to an ASPX page that when clicked, checks the members post count, if it meets or exceeds 100, it will display a Button that if clicked will update their user role to be allowed to view Subforum1.

I can't access my SQL Server from at work because of a proxy block, but was curious, should I just insert a row in the access roles table or is there a stored procedure that I should instead?

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
11 years ago

No this is currently not possible. But such feature would be a great addition.

Originally Posted by: tha_watcha 

I fully agree. It would also eliminate some spam crap too. I'd like to have members with zero post count only allowed to post in the Welcome section. Post once, then you can post elsewhere. 🙂