Resource icon

[InfisJSC] Topic (thread) starter's permissions 1.2.12

No permission to download
I am using xf 1.2

I am trying to give a topic starter the right to approve the post made by other users. So i give in the node the topic starter the right for Approve / unapprove posts.

I made two test users (registerd users) test1 and test2. Test1 started a topic in the node with the rights to approve. TEst2 posted a reaction.

I expected that he gets the alert that the post has to be aproved by the moderator. That doesnt happen. Everybody can see the post. Am i doing something wrong??? or is this a bug.

Then an other question. If a real moderator post in that node, can the user delete his post? i hope not...
 
I expected that he gets the alert that the post has to be aproved by the moderator. That doesnt happen. Everybody can see the post. Am i doing something wrong??? or is this a bug.
You forgot to enable for a node option "Moderate all messages posted in this forum" in Forum Options. It's not a bug.
Then an other question. If a real moderator post in that node, can the user delete his post? i hope not...
Yes. The user is allocated with the permission of moderating of all messages in the subject. Messages of moderators in this case don't differ from the remaining. My addon just also gives topic starters of the permission of the moderator thus if the user was the normal moderator in this node, with one exception - such user moderates only in the own thread, instead of in all node.
On the other hand, any moderator can moderate with the same success as the, and someone else's messages. Here approximately so it turns out.
 
Thanks works now. Just one question more:

I made a new group. In that group i gave the topic starter the right to mod his thread by approve unapprove posts. I set the permission by node on moderate posts..

The result is that every one in that node, must moderate the posts. Is it possible to let only the users with the right to moderate their post do that (the new group with that rights) ? And al other users can normally post?
 
Last edited:
Is it possible to let only the users with the right to moderate their post do that (the new group with that rights) ? And al other users can normally post?
By design of XenForo in node with enabled option "Moderate all messages posted in this forum" all users with enabled permission "Follow message moderation rules" are create threads and post messages with moderate. But with my addon topic starter bypass this permission and can moderate thus post (and first post also for approve thread). Other users (not moderators for example) can't post messages without moderate. Only topic starter can bypass this.
 
Ok clear.

I'm struggling to get it good.

I have set the permission "Moderate all messages posted in this forum" Then i give rights at the topi starter:

Edit own posts
Approve / unapprove posts

L ogged in with my test user. Make a post and then i have to approve myself? Did i forget something to set? because i dont think thats its good to approve my own posts :-)
 
because i dont think thats its good to approve my own posts :)
Unfortunately, and it turns out. If it is so important, it will be possible to try to approve such post directly. I don't promise that I implement it quickly.
 
Unfortunately, and it turns out. If it is so important, it will be possible to try to approve such post directly. I don't promise that I implement it quickly.

i dont understand.. Here you write that the topic starter can bypass the moderation...

"Follow message moderation rules" are create threads and post messages with moderate. But with my addon topic starter bypass this permission and can moderate thus post (and first post also for approve thread). Other users (not moderators for example) can't post messages without moderate. Only topic starter can bypass this.
 
but that doenst work :) He has to approve his own posts
Yes. Not directly. Manual bypass only :) Otherwise in any way.

I can try to change such behavior in my plug-in. But not now. Much later, as I am now strongly occupied on the main operation.
 
Another Question,

is it possible that the topicstarter gets an alert when a new post is made in his topic?
 
Im getting the same problem... How and where can i fix this??


I think there's a bug with this plugin that will let registered users see moderated messages on all forums, regardless of whether they started the thread or not.

As you can see here, the current user is not the thread starter.

I have ensured that "view moderated threads/posts" was set to no on all groups and nodes. When I disabled the plugin, the problem went away.

(see post 16)
Oh I finally figured out how to fix it. This is my mod. I moved the defaults from the original function into the inherited function.

I think the issue is that the original function has a side effect so you can't call it 2 times.

Anyway great plugin. I just have a few suggestions.
  • Change "Any" to "Others", this way you can let someone edit/delete other posts, and if you want the "Any" feature, you can select "Self" and "Others". Otherwise it is impossible to only allow editing/deleting of other users' posts.
  • If a user cannot delete his own thread, make it so the first post cannot be deleted, because that will delete the thread.

PHP:
    public function getPermissionBasedPostFetchOptions(array $thread, array $forum, array $nodePermissions = null, array $viewingUser = null)
    {
        //$response = parent::getPermissionBasedPostFetchOptions($thread, $forum, $nodePermissions, $viewingUser);
        $this->standardizeViewingUserReferenceForNode($thread['node_id'], $viewingUser, $nodePermissions);

        $default_moderated = XenForo_Permission::hasContentPermission($nodePermissions, 'viewModerated');
        $default_deleted = XenForo_Permission::hasContentPermission($nodePermissions, 'viewDeleted');

        if (XenForo_Permission::hasContentPermission($nodePermissions, 'tsRighTviewModerated'))
        {
            $viewModerated = true;
        }
        else if ($viewingUser['user_id'])
        {
            $viewModerated = $viewingUser['user_id'];
        }
        else
        {
            $viewModerated = false;
        }

        return array(
            'deleted' => $default_deleted || XenForo_Permission::hasContentPermission($nodePermissions, 'tsRighTviewDeleted'),
            'moderated' => $default_moderated || $viewModerated
        );
    }
 
Last edited:
Unable to install a fresh installation of this because I get this bug.

Error
Please enter a valid callback method (InfisJSC_TopicStarter_Listener::extend).
 
Was only able to install 1.2.3 after that's installed I'll try to update to the latest version.

But yeah fix that please!
 
all registered users can incorrectly see all posts in moderation whenever this addon is enabled, regardless of all other factors...
 
Top Bottom