Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting for disabling Gravatar? #320

Open
sabyasachi opened this issue Jul 10, 2021 · 3 comments
Open

Setting for disabling Gravatar? #320

sabyasachi opened this issue Jul 10, 2021 · 3 comments
Assignees
Labels

Comments

@sabyasachi
Copy link

sabyasachi commented Jul 10, 2021

Thanks for the great project! 🙂

I'm trying to find a way to disable the Gravatar image. Is there a way to do it? I could not find any setting option. It will be nice to have.

@sabyasachi sabyasachi changed the title Is there a way to disable Gravatar? Setting for disabling Gravatar? Jul 10, 2021
@danirus
Copy link
Owner

danirus commented Jul 13, 2021

Hi @sabyasachi, there is a setting called COMMENTS_XTD_API_GET_USER_AVATAR that allows you to customize how to obtain the avatar. But there is no setting to disable the avatar. In v3 the app works as you want it by default, no avatar. But v3 is still under development. Slow development...

If you want to disable the avatar in v2, in the JavaScript plugin, go to line 412 of the file comment.jsx, in static/django_comments_xtd/js/src and follow the instructions here to rebuild the plugin. Let me know if you find any problem.

@danirus danirus self-assigned this Jul 13, 2021
@sabyasachi
Copy link
Author

Thank you @danirus for your reply!

I tried removing line 412 from static/django_comments_xtd/js/src/comment.jsx. It removes the Gravatar, but it also loses the indentation of inner comments.

After removing line#412:

after-removing-gravatar

Before removing line#412:

before-removing-gravatar

@sabyasachi
Copy link
Author

sabyasachi commented Aug 7, 2021

Here is what I did:

To fix the indentation, add one ml-5 class in this line. But, this class should be added only for replies (should not be added for the first level comments.).

<div class="media {% if nested_reply %}ml-5{% endif %}">

Then I made the following change in the recursion call.

{% with nested_reply=True %}
    {% render_xtdcomment_tree with comments=item.children %}
{% endwith %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants