1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Extends topic starter's permissions, adds some functions of management for threads and posts

  1. infis

    infis Well-Known Member

    ge66, rafass, Digital Doctor and 2 others like this.
  2. Kintaro

    Kintaro Well-Known Member

    can it be activated only in selected forums?
  3. infis

    infis Well-Known Member

    Yes. For each node it is possible.
    Fuhrmann likes this.
  4. infis

    infis Well-Known Member

    gldtn likes this.
  5. yavuz

    yavuz Well-Known Member

    Hi infis, to troubleshoot a problem addon related I had to removed this addon. Now members which I set permissions for, are having permission problems. For instance, one user who had topic starter rights set, now belongs to a group which has moderator rights, also the user was given moderator permissons. Unfortunately the moderation tools don't show up anymore. I double checked but couldn't find a a problem on my side.
  6. infis

    infis Well-Known Member

    Strange... At plug-in removal any rights cannot be mentioned. Expansions only will cease to operate. Also there are no editings in templates or somewhere else. Original files XenForo Engine also do not change.
    Therefore the situation which is described by you, is impossible as a result of work or plug-in removal.
    I tend to that somewhere you have changed the rights by default for groups or for the user.
  7. duderuud

    duderuud Active Member

    First of all, thanks for the plugin! Much appreciated!

    I have a little problem though: When I enable your plugin my test forum gives me the following error:

    Any ideas how to solve this?
  8. ragtek

    ragtek Guest

    search inInfisJSC_TopicStarter_Model_Post for

    $response = parent::canEditPost($post, $thread, $forum, &$errorPhraseKey, $nodePermissions, $viewingUser);

    and replace it with

    $response = parent::canEditPost($post, $thread, $forum, $errorPhraseKey, $nodePermissions, $viewingUser);

  9. duderuud

    duderuud Active Member

    Thanks ragtek, changed the code but get the same error.

    And removing it in all parent calls, can you tell me what that means? I'm no developer...(guess that's why your solution doesn't work now, I only changed that one line)

    Edit: Weird...now it all seems to work fine ?
  10. infis

    infis Well-Known Member

    It's generated if use & before variable.
    You may change this by remove symbol '&' from &$errorPhraseKey in all lines such as
    $response = parent::canEditPost($post, $thread, $forum, &$errorPhraseKey, $nodePermissions, $viewingUser);
    It in library/InfisJSC/TopicStarter/Model/Post.php and library/InfisJSC/TopicStarter/Model/Thread.php

    Also you can add to php.ini:
    allow_call_time_pass_reference = on
  11. infis

    infis Well-Known Member

    ragtek likes this.
  12. Alteran Ancient

    Alteran Ancient Well-Known Member

    Question: Is there a way to permit a thread starter to reply to their OWN thread, but not another person's thread?
  13. infis

    infis Well-Known Member

    Hm... Permissions of "canReply" and "canQuickReply" don't change. Only listed in screenshot permissions, can be changed.
  14. Digital Doctor

    Digital Doctor Well-Known Member

    Q: will this allow people to edit the title to a thread they started ?
  15. infis

    infis Well-Known Member

    This allow people to edit the title and prefix. Not separated.
    Digital Doctor likes this.
  16. bottiger

    bottiger Active Member

    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.

  17. infis

    infis Well-Known Member

    Hm. I test this situation with user test1 and test2. If user test1 post message and message is awaiting moderator approval, then user test2 is not view this message. Users test1 and test2 are in group Registered only.
    If your user TestingTree is moderator, then it can view this message.
    Check rights for user TestingTree. I can't confirm this bug.
  18. bottiger

    bottiger Active Member

    I already checked, he is not a moderator. I tested it by using an admin to make a post unapproved.

    The only permission checked is Edit own thread, but the same problem happens if it is not set.

    It must be a plugin problem because the problem disappears when I disable Topic Starters' Rights. If he was a moderator this problem wouldn't disappear if I disabled the plugin.



  19. bottiger

    bottiger Active Member

    I think getPermissionBasedPostFetchOptions is broken.

    It will always say $response['moderated'] is true. When I set it to false, then regular users can't see everyone's moderated posts.

    I don't know how to fix this.
  20. bottiger

    bottiger Active Member

    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.

        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 (
    $viewModerated true;
            else if (
    $viewModerated $viewingUser['user_id'];
    $viewModerated false;
            return array(
    'deleted' => $default_deleted || XenForo_Permission::hasContentPermission($nodePermissions'tsRighTviewDeleted'),
    'moderated' => $default_moderated || $viewModerated

Share This Page