News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Need aproval for all users

Started by arsse, August 11, 2020, 02:41:35 AM

Previous topic - Next topic

arsse

Hello.
Thanks for this good forum software.
Please help.
I want my forum has these abilities before showing tosite visitors for my forum all users:

1) All new topics must approve by admin or moderators.
2)  All new Posts (answer to topics) must approve by admin or moderators.
3) All new attachments must approve by admin or moderators.
4) All EDITED posts must approve by admin or moderators.

Please say me is these abilities are in SMF?
If there are please say where is setting options? (i downloaded and installed in localhost but could not find)

shadav

for 1, 2, and 3 just set the membergroup permissions

in your admin under members go to permissions, edit the permissions for which groups you want

make sure that
Post new topics, without requiring approval is not checked
Post new topics, but hide until approved is checked
Post replies to topics, but hide until approved is checked
Post replies to topics, without requiring approval is not checked
Post attachments, but hide until approved is checked
Post attachments, without requiring approval is not checked

as for edited posts....that would probably require a mod

arsse

Quote from: shadav on August 11, 2020, 10:41:45 AM
for 1, 2, and 3 just set the membergroup permissions

in your admin under members go to permissions, edit the permissions for which groups you want

make sure that
Post new topics, without requiring approval is not checked
Post new topics, but hide until approved is checked
Post replies to topics, but hide until approved is checked
Post replies to topics, without requiring approval is not checked
Post attachments, but hide until approved is checked
Post attachments, without requiring approval is not checked

as for edited posts....that would probably require a mod

Thanks for answering my question.
But i could not find these options that you said.
can you please insert a screenshot ?

Arantor

You have to turn post moderation on in Admin > Core Features. When you get there, press the power button then press save.

efk

Quote4) All EDITED posts must approve by admin or moderators.
Never saw similar mod so not sure if exist.
But you have mod Post History so it can show you if someone had done some edits, and there are mods to turn off post editing. SMF forum users have 2 hours to edit posts, after that is not possible without moderators help, I think its 2 hours here.

Arantor

Or you can just tweak it so editing a post if you can't approve it always resets it back to unapproved.

Sources/Post.php

Code (find) Select

// Can they approve it?
$can_approve = allowedTo('approve_posts');
$becomesApproved = $modSettings['postmod_active'] ? ($can_approve && !$row['approved'] ? (!empty($_REQUEST['approve']) ? 1 : 0) : $row['approved']) : 1;
$approve_has_changed = $row['approved'] != $becomesApproved;


Code (replace) Select

// Can they approve it?
$can_approve = allowedTo('approve_posts');
$becomesApproved = $modSettings['postmod_active'] ? ($can_approve && !empty($_REQUEST['approve']) ? 1 : 0) : 1;
$approve_has_changed = $row['approved'] != $becomesApproved;


Original logic, the post will be approved:
* if the user can approve the post, it is not currently approved, and they have ticked the box to approve it
* or if the post was already approved
* or if post moderation is off

New logic, the post will be approved:
* if the user can approve the post and they have ticked the box to approve it
* or if post moderation is off

If it's already approved it should stay approved if the moderator is the one editing the already-approved post - but if they can approve they can also unapprove it the same way. If the person making the edit can't approve it, it should become unapproved in any situation.

You also need to patch quick edit. Same file.

Code (find) Select

$msgOptions = array(
'id' => $row['id_msg'],
'subject' => isset($_POST['subject']) ? $_POST['subject'] : null,
'body' => isset($_POST['message']) ? $_POST['message'] : null,
'icon' => isset($_REQUEST['icon']) ? preg_replace('~[\./\\\\*\':"<>]~', '', $_REQUEST['icon']) : null,
);


Code (replace) Select

$msgOptions = array(
'id' => $row['id_msg'],
'subject' => isset($_POST['subject']) ? $_POST['subject'] : null,
'body' => isset($_POST['message']) ? $_POST['message'] : null,
'icon' => isset($_REQUEST['icon']) ? preg_replace('~[\./\\\\*\':"<>]~', '', $_REQUEST['icon']) : null,
'approved' => allowedTo('approve_posts') ? 1 : 0,
);


Old logic assumes if you're editing it's always fine; this changes it so if you quick edit and aren't someone who can approve posts, force it to unapproved.

Advertisement: