I’m using the Lyra theme on Ghost Pro - and I’m thinking about integrating with Disqus to add a comments section to my posts. I’d like to know if its possible to restrict comments to paying subscribers.
I think this would be useful for a couple of reasons: it may cut down on abusive comments, which I guess are more likely to come from people who don’t wish to pay! And it offers added value to subscribers too.
You can restrict who can see comments on your site pretty easily, but Disqus also publishes all comments to its own site - so they won’t be private. This is a Disqus thing, rather than a Ghost thing, and can’t be changed as far as I’m aware.
A better solution for full private members-only comments for Ghost would be https://cove.chat - which is what I use for this exact usecase.
I’ve now set up Cove - but it shows and allows comments for any subscribed member, not paid members only. Is there any way of tweaking it so that only paying subscribers can post comments?
Thanks for sharing this! A related Cove question - is there a way to make comments visible to all but restrict the commenting function to paid members only?
Thanks, Dan! Unfortunately what is happening when I add that code is paid and free members can see their login info but the comments and commenting field don’t show up for either.
Of course, there is a high likelihood I have made an error. Below is what I have in comments.hbs (without your additional lines) - note I’ve removed the login form. This shows comments and the commenting field/button to all members. When I add the two lines, they disappear. (Screenshots below as well.)
For reference, there are a couple of goals here: one, offer another incentive for readers to pay for membership; and two, limit spam/abuse (and the need for moderation).
If I use John’s code above, only paid members can even see the existence of comments, which is great except that it doesn’t offer much of an incentive to join as people don’t even know they’re there. If I change line 3 below to {{#if@member.paid}}, only paid members see the comments/can comment and free members and those not logged in see the upsell, which is the best option I can see so far but again, isn’t a huge incentive.
The code below is a stripped down version of the default install code from Cove, plus the two new lines that only let paid members leave comments. It displays comments to everyone, even signed-out users.
{{#if @labs.members}}
<h2><span id="cove-count"></span> Comments</h2>
{{^if @member}}
<p>Sign in or become a {{@site.title}} member to join the conversation.</p>
{{!-- The default install code has a sign up form here too --}}
{{/if}}
<div id="cove"></div>
{{#if @member}}
<p>Signed in as {{@member.email}} · <a href="javascript:" data-members-signout>Sign out</a></p>
{{/if}}
<script>
const Cove = {
publication: "5a18db3e75ef5bbfcaa5e6f4ed61f740",
contentId: "{{id}}",
memberId: "{{@member.uuid}}",
memberEmail: "{{@member.email}}",
requirePaid: true,
isPaid: {{@member.paid}}
}
</script>
{{/if}}
Thanks, Dan! I’ve tested that and it is working for unpaid members - they get the comments and the copy “Leaving comments is currently only enabled for paying members.” with no form - but when not logged in, all I see is the copy in line 4. Let me know if you want to get on email and I can give you more details or site access. Or if this is completely unimportant to your business, don’t worry about it - I can live with this solution!
@xune you should be fine as long as you leave the DIV-tag for displaying the comments outside the handlebar for access and keep the script inside the handlebar.
I don’t use Commento and I don’t know what theme you’re using, so I don’t know what your comment.hbs template looks like.