Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Post limit?

SrggamerSrggamer HardCore Gamer ✭✭✭

If I have set a post limit to the posts, is it possible to make the Admins,Mods not to have Post limit in words?

Comments

  • Options
    422422 Developer MVP

    perhaps explain further ...

    "Thou shallt not posteth you rotter"

    There was an error rendering this rich post.

  • Options
    SrggamerSrggamer HardCore Gamer ✭✭✭

    Ok User has a max limit of 500 words, I admin want unlimited.

  • Options
    peregrineperegrine MVP
    edited March 2013

    I don't think so without the usual (a new plugin or a mod to the core.).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    SrggamerSrggamer HardCore Gamer ✭✭✭

    @peregrine said:
    I don't think so without the usual (a new plugin or a mod to the core.).

    Thanks

  • Options
    peregrineperegrine MVP
    edited March 2013

    if you want to do it and you feel comfortable modifying core files. An easy change is

    first set in config.php
    
    $Configuration['Vanilla']['Comment']['MaxLength'] = '500';
    $Configuration['Vanilla']['AdminComment']['MaxLength'] = '8000';
    
    
    then make the following changes to
    
    applications/vanilla/models/class.commentmodel.php
    
    around line 520
    
    from 
       $MaxCommentLength = Gdn::Config('Vanilla.Comment.MaxLength');
    
    to
        $MaxCommentLength = Gdn::Config('Vanilla.Comment.MaxLength');
      if (Gdn::Session()->CheckPermission('Garden.Users.Edit'))  {
          $MaxCommentLength = Gdn::Config('Vanilla.AdminComment.MaxLength');
          }
    
    applications/vanilla/models/class.discussionmodel.php
    around line 788
    
    from 
       $MaxCommentLength = Gdn::Config('Vanilla.Comment.MaxLength');
    
    to
        $MaxCommentLength = Gdn::Config('Vanilla.Comment.MaxLength');
      if (Gdn::Session()->CheckPermission('Garden.Users.Edit'))  {
          $MaxCommentLength = Gdn::Config('Vanilla.AdminComment.MaxLength');
          }
    
    applications/vanilla/models/class.draftmodel.php
    around line 132
    
    from 
       $MaxCommentLength = Gdn::Config('Vanilla.Comment.MaxLength');
    
    to
        $MaxCommentLength = Gdn::Config('Vanilla.Comment.MaxLength');
      if (Gdn::Session()->CheckPermission('Garden.Users.Edit'))  {
          $MaxCommentLength = Gdn::Config('Vanilla.AdminComment.MaxLength');
          }
    

    anybody who has the ability to edit users (usually admins) will now have a max comment, draft and discussion length of 8000, while everyone else will have a max discussion length of 500.

    the key is "Garden.Users.Edit" , if you want mods to also have 8000 characters, select a permission that moderators have and members, guest, etc don't.

    e.g. look in your dashboard and see what the moderator has checked, and then use that permission instead of Garden.Users.Edit in the above example.

    By the way the post limit is characters, not words.!

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    SrggamerSrggamer HardCore Gamer ✭✭✭

    Thanks! Very much going to try this!

  • Options

    Is this only for comments or for discussion lenght too?

  • Options
    SrggamerSrggamer HardCore Gamer ✭✭✭

    @DogHam said:
    Is this only for comments or for discussion lenght too?

    Both!

  • Options

    @Srggamer said:
    Both!

    I changed the settings in dashboard to 10'000. For comments it's working but not for Discussion. i will try this. Thank you

Sign In or Register to comment.