Code Monkey home page Code Monkey logo

Comments (6)

vdboor avatar vdboor commented on June 20, 2024

Hi,

I'm also stuck with this issue, and looking forward to an improvement here as well. Any help here is appreciated. The FluentCommentsModerator could be improved, e.g.:

  • scan for the number of URLs in the message for example
  • block certain words.
  • disable anonymous posting.

That being said, the setting:

FLUENT_COMMENTS_AKISMET_ACTION = 'moderate'

will not delete the comments, but rather keep them flagged as "moderated", which should hide them from your website frontend, but still keep them in the admin backend.

Also, the spam comments aren't deleted or moderated after the 7 day period set in the settings.py.

That's strange. Jugding from your setup, that should just work. Do you also have an enable_commends field on your blog model? and does that work?

from django-fluent-comments.

nickbewley avatar nickbewley commented on June 20, 2024

Hi @vdboor. Thanks for responding.

Yes I have enable_comments in my models.py as such:

enable_comments = models.BooleanField("Enable comments", default=True)

It does function to enable or disable comments, but does not function to delete the spam comments after "x" days. What could I be missing?

Thanks for any input!

from django-fluent-comments.

vdboor avatar vdboor commented on June 20, 2024

but does not function to delete the spam comments after "x" days. What could I be missing?

You have FLUENT_COMMENTS_AKISMET_ACTION = "moderate" instead of "delete" so comments won't be deleted, they are only flagged as moderated (and therefore not visible for users)/

Secondly, the feature works to auto-close the commenting ability, The moderator will block any additional comments, and you can expose a "Comments are closed" message in the template. Use the comments_are_open() and comments_are_moderated() functions for that. For example:

  {% render_comment_list for object %}

  {% if not object.comments_are_open %}
    <p class="comments-closed">{% trans "Comments are closed." %}</p>
  {% else %}
    <div id="comments-form-wrapper">
      {% render_comment_form for object %}
    </div>
  {% endif %}

from django-fluent-comments.

nickbewley avatar nickbewley commented on June 20, 2024

Hi @vdboor thanks for your input. Yes I guess I misunderstood the FLUENT_COMMENTS_AKISMET_ACTION setting, thinking that if it was set to moderate that the comments would be moderated by Akismet, not the moderator. Thanks for clarifying.

In general, though, it would be nice if this module could be a little more proactive in fighting spam. I am more of a designer than a developer, unfortunately, otherwise I would try to contribute to the development of this great project. I am good at piecing together django modules into a functional project, not writing python code from scratch..

I like the idea of checking to see how many urls have been included in a post. Other ideas that would help fight the kind of spam I often see:

• How many times a user posts within a 24 hour period (I often see the same user name and exact same content posted 5-10 times within an hour)
• IP address (although I realize more sophisticated spammers can fake this)
• Flag username / ip as spammer and disallow further posting

On another note, what does Akismet even do anyway?

Thanks for the insights!

—Nick

from django-fluent-comments.

vdboor avatar vdboor commented on June 20, 2024

Thanks for the comments and help!

In general, though, it would be nice if this module could be a little more proactive in fighting spam.

Agreed! That's something on my mind as well, though I don't have the time for it right now. It will have to wait a little longer unfortunately.

I am more of a designer than a developer, unfortunately, otherwise I would try to contribute to the development of this great project.

I understand!

On another note, what does Akismet even do anyway?

The module submits the comment, IP address and other related information to the Akismet service, which then checks for spam. I don't know what kind of rules it applies, but it will definitely help you reduce the spam. You can decide whether to moderate or delete the messages which are tagged by Akismet.

from django-fluent-comments.

vdboor avatar vdboor commented on June 20, 2024

I've added FLUENT_COMMENTS_AKISMET_ACTION=auto and FLUENT_COMMENTS_AKISMET_ACTION=delete to remove spam.

from django-fluent-comments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.