News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Post approval

Started by sirfpsycho, July 16, 2022, 01:05:46 AM

Previous topic - Next topic

sirfpsycho

Hello, I want to set post approval for members who have less than 5 posts. I have searched on forum and found the way but it is not working. I am explaining what I did:
I went to Manage Permissions>General Permissions> Newbie modify>
Post topics and replies to the board DISABLED ALL
Post replies to any topic - but require approval Enabled

Now I go to Edit Profiles>Profile Name>XYZ>Newbie>
Post topics and replies to the board DISABLED ALL
Post replies to any topic - but require approval Enabled

but still member who has zero post count is not going for approval.

Now I go to Add Membergroup and created a group "STARTER" with Post Based value zero and By type Restrictive
and did same settings which I did above for Newbie but still posts not going for approval.

Now I can see that all members who have zero posts are now on STARTER group. I deleted STARTER group but still all zero posts users are not assigned with Newbie so I again created STARTER group and users have zero posts is assigned with STARTER group. Newbie group has no users after deleting STARTER group too.

Now how can I set post approval?

Aleksi "Lex" Kilpinen

I am guessing your problem is with permissions. Unless using deny -permissions, if you want to deny a permission from a user you need to make sure they don't belong to any group allowing that permission, and every user always belongs to at least 2 groups. For a new member, those are the lowest post count group and the regular members group.

So don't allow posting without approval for either of those, and to make sure others don't need approval you would then allow posting without approval for all other post count groups, which would cover the rest of the userbase.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

sirfpsycho

Quote from: Aleksi "Lex" Kilpinen on July 16, 2022, 02:35:09 AMI am guessing your problem is with permissions. Unless using deny -permissions, if you want to deny a permission from a user you need to make sure they don't belong to any group allowing that permission, and every user always belongs to at least 2 groups. For a new member, those are the lowest post count group and the regular members group.

So don't allow posting without approval for either of those, and to make sure others don't need approval you would then allow posting without approval for all other post count groups, which would cover the rest of the userbase.

I have set for regular members too. but still issue.

EDIT: I have reset the settings in Regular member and seems post is waiting for moderation. I will let you know if it happens again.
Thank you

sirfpsycho

Now is it possible to remove Starter group and all the users under it should be assigned in Newbie?

Aleksi "Lex" Kilpinen

You can have as many or as few post count groups that you need, the answer really depends on how you set them up - One post count group must have 0 post limit, others should have higher limits.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

sirfpsycho

Quote from: Aleksi "Lex" Kilpinen on July 16, 2022, 03:36:08 AMYou can have as many or as few post count groups that you need, the answer really depends on how you set them up - One post count group must have 0 post limit, others should have higher limits.
Currently I have two groups with zero posts. Newbie which is by default and I created "STARTER" groups with zero posts. And all the old Newbie users automatically assigned to STARTER. Now new registered users are being distributed in newbie and starter groups automatically. I want to remove Starter groups and all these users should be assigned in newbie as previous being added. I created Starter group because post moderation was not working.

Aleksi "Lex" Kilpinen

You should not have multiple groups with the same post count limit, so do remove the one you added unless you need it for something else.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

sirfpsycho

Quote from: Aleksi "Lex" Kilpinen on July 16, 2022, 04:27:47 AMYou should not have multiple groups with the same post count limit, so do remove the one you added unless you need it for something else.
I deleted Starter group now newbie group has zero members. How to fix it?

Aleksi "Lex" Kilpinen

#8
Try editing the newbie group, make sure the post count limit is actually 0 and save.
I'm actually unsure how you were able to create two 0 post count groups to begin with, I don't think that should be possible.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Illori

Quote from: Aleksi "Lex" Kilpinen on July 16, 2022, 04:35:56 AMTry editing the newbie group, make sure the post count limit is actually 0 and save.
I'm actually unsure how you were able to create two 0 post count groups to begin with, I don't think that should be possible.

i dont believe there is any check on the post count groups to make sure there are no duplicate for a certain post count or that they are not overlapping.

Aleksi "Lex" Kilpinen

They can overlap, but somehow I thought 0 was a special case. Haven't checked, but it shouldn't normally be possible to remove 0 for example.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

sirfpsycho

https://prnt.sc/GizW6CmuGu9e

please check this. New users are automatically being assigned to both Newbie or Starter because both are Zero post required.

Illori

as was said above, you should only have 1 post count group per count of posts. you need to delete one or change the count of posts for that group.

Aleksi "Lex" Kilpinen

I thought you said you had removed Starter already?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

sirfpsycho

Quote from: Aleksi "Lex" Kilpinen on July 16, 2022, 08:16:21 AMI thought you said you had removed Starter already?
I have recreated to show screenshot. I have deleted Starter now newbie has only 22 users. I have clicked on modify newbie and saved it but still shows 22 users.

Aleksi "Lex" Kilpinen

If there are no other oddities with post count groups, I would expect that to be a cached number.
If you empty your forums file cache and your browsers cache, it should correct itself.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Illori

the post count group is not calculated/recalculated until a post by that user is made.

sirfpsycho

Quote from: Illori on July 16, 2022, 12:35:07 PMthe post count group is not calculated/recalculated until a post by that user is made.
so in this situation I have to keep both Groups which have zero post limit?

Arantor

OK, so there's some misunderstandings here.

There should never be two *post count groups* that start at the same count. That includes the 0-post count group. But there must always *be* a zero post count group because if you don't, the next time they post, they'll get promoted to full admins because 'post count' has to have a group id in it, and if it can't find a post count group that matches the user's current post count situation (and 0+ matches everyone) it'll go for the next group it *can* match, which is group 1 aka admin.

I think the other part of the problem is the fact that SMF's permissions model means every user is always in at least two groups, their post count group plus at least one other group, which is whatever they're assigned (or if not assigned, 'Regular Members' which isn't a real group as such)


I also wrote a guide on doing this, some years ago, this is part of a much longer post on the subject. I've included the footnotes where relevant.

QuoteToday's challenge: configure it so that regular users don't have moderation but new users with up to and including 5 posts are moderated.

There are, in fact, two ways to do this, both of which are convoluted.

1. Turn on post moderation in Core Features.
2. Making sure that the 0-post count group is left alone, create a new post count group that requires 5 posts, so that once a user has successfully posted 5 posts (and until they're approved, it won't affect their post count), they can have different permissions attached.
3. Admin > Members > Permissions > Settings > Enable permissions for post count based groups (tick) > save

Here's where the paths diverge. Here's path A:
A4: On the same page as above (Admin > Members > Permissions > Settings) also enable Enable the option to deny permissions
A5: Go to Admin > Members > Permissions > Board Permissions and for each profile (that allows posting) set the permissions up as follows: Regular members should have "Post new topics, without requiring approval" and "Post replies to topics, without requiring approval" enabled, while the 0-post count group should have those permissions *denied* and "Post new topics, but hide until approved" and "Post replies to topics, but hide until approved" in their place. Once the user leaves the 0-post count group for the 5-post count group, the other permissions are no longer denied.[3]

Or, path B. It doesn't require deny permissions but it does things another way.
B4: Go to Admin > Members > Permissions > Board Permissions. For Regular Members, set all the posting permissions to disallow. Then in the 0-post count group, give them "Post new topics, but hide until approved" and "Post replies to topics, but hide until approved" and for every other post count group, give them "Post new topics, without requiring approval" and "Post replies to topics, without requiring approval".[4]


And the footnotes:
 3.    But now we have an extra membergroup that does absolutely nothing other than allow another group's permissions to expire.
 4.    This means you still have the extra group, but at least the extra group is now doing something. This is also very fractionally faster, but harder to maintain as you have to set the new permission up on any new post count group you create.

sirfpsycho

If I keep two groups with zero posts then any issue will come?

Advertisement: