How to remove users avatar?
Closed this issue · 10 comments
Hello.
I want to completely remove user's avatar. How can i do that?
Hello.
You can either make the avatar proc in the config return nil or a blank string, or use some CSS that hides the .comment_avatar
class.
Thanks.
One more: how can I add wysihtml5 for comments?
Unfortunately, you will most likely have to copy https://github.com/lml/commontator/blob/master/app/views/commontator/comments/_form.html.erb into your app as app/views/commontator/comments/_form.html.erb and edit the :body textarea manually to add the editor in there.
I added class: 'wysihtml5' to :body textarea and little script like here: https://github.com/Nerian/bootstrap-wysihtml5-rails
It works.
Thanks.
How can I add pagination?
Only change config.comments_per_page ?
And how can I count comment?
To add pagination, you need to add the will_paginate
gem to your gemfile and then set comments_per_page
.
Not sure what you mean by counting comments. The output of commontator_thread
should include how many comments there are in the thread (and if they are subscribed, it will also count the unread comments).
I was talking about adding to "Comment" button the number of unread messages.
I used @invoice.thread.comments.count to show number of comments.
But there is a problem.
When I delete comments, number of comments doesn't change.
How can I fix this?
I would try @invoice.thread.comments.where(deleted_at: nil).count