If you write a plugin, let me know how it goes!

Link to PR

  • Die4Ever@programming.dev
    link
    fedilink
    English
    arrow-up
    14
    ·
    edit-2
    8 months ago

    a pretty simple plugin idea would be a regex to validate post titles, deny the post if the title is invalid

    I might try it unless someone else beats me to it

    I guess to start with it could be a config file with a dictionary of community name: regex

    and later it could be made to use the database with an api to set the regexes, could even allow community moderators to set their own regexes (might need a maximum regex length, maximum number of parenthesis/groups in the regex pattern, and disable lookbehind/lookahead, for performance reasons)

    • mryessir@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      8 months ago

      Why a regex? What do you actually want to filter out? Could it be descriminating?

      Do you want to prohibit specific phrases? What abt dfrnt spllngs?

      The original comment I replied to did not include considerations about future extensions.

      So my - downvoted - comment is even more relevant. There are more important things to put valuable manpower on it. centsdroppedandleave

      What U C is What U Get, huh?

      • jjagaimo@lemmy.ca
        link
        fedilink
        English
        arrow-up
        9
        ·
        8 months ago

        One example I could think of is title-tagged posts given the lack of a tag implementation

      • Die4Ever@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        8 months ago

        Just saying it’s an easy one to start with to get familiar with the system

        And yeah it could be used to verify “tags” in the title, or require you put the year for something like a movie title or game, like (1993)

        also my comment kicked off a little discussion in here, so that’s nice too