XF 2.2 Funny problems while coding an add-on

Robert9

Well-known member
A user is allowed to change a post from someone else.
Do we trust this user? Trust is good, control is better.
So, we moderate the post.
If the post is a first post, the thread is moderated?
But if the thread and post is moderated, this user can't read or edit this post again?
What do we do? Give this use the permission to see moderated posts/threads?
No! He should see only this post/thread.
How do we do that? New table, new field?
Or maybe the field last_edit_user_id?
Yes, if we want to save him.
If we don't want to save him, we have to rewrite this field to the old value after approval?
Perhaps, we can do, from the history?

Conclusion: Let's trust this user, don't moderate the post, and go to bed now instead of tomorrow morning. :)
 
Your posts are confusing (at least to me) :)

A normal user can't edit other user's posts, only moderators can do that.
Why you would want to send a post to moderation because it was edited by a moderator is somewhat beyond my understanding, but there might be a usecase where this does make sense.

If a first post is moderated, the whole thread goes into moderation and can only be viewed by moderators with permission to approve threads.
So if you want a moderatator to be able to edit the first post of a thread, send that post into moderation and still want that moderarator (which does not have permission to approve threads) to continue editing that post - that's a bit tricky but might be doable without modifying the database schema by using post edit history.
(Though I somewhat doubt there would be an efficient way to do that).
 
Please excuse my English; the rest should not confuse you!
Just imagine a wiki post!
There, allowed users can edit the first post of threads.
And then we have the problems shown above.
 
Well ... a wiki is not a forum, it's a different concept and needs different workflows.
That's pretty much the reason why dedicated software exists for wikis ;)

For a wiki type thread you would most likely want smth. like this:
When editing a post, the modified version does not become live immediately - but the post (or thread) also does not go into moderation (eg. disappears from public view).
Instead the modified post content goes into moderation, once this is approved the live post is updated.

Is this what you want to achive?
 
Last edited:
Top Bottom