This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Maximum 1 Comment Per Page
#1

Hi,
Is it possible to limit the comments that a user can make to a maximum of 1 comment per page?

I've seen in the FAQ that you can prevent users who are not logged in with 
PHP Code:
<?php 
$cmtx_logged_in
= false;

but that disables the entire form. I'd still like users to be able to reply to other people's comments, but not start multiple comment threads.

I've poked through the settings and haven't found anything. Hopefully, someone might have an idea.

Thanks  Big Grin
Reply
#2

Hi Mark,

This isn't possible using the settings, so would require custom code. Do you have a licence?

And are you passing your site's login details to Commentics through the integration code? If not, it would need to based on the user's IP address.

Have you completed the interview?
Reply
#3

(25-Mar-2023, 11:41 AM)Steven Wrote:  Hi Mark,

This isn't possible using the settings, so would require custom code. Do you have a licence?

And are you passing your site's login details to Commentics through the integration code? If not, it would need to based on the user's IP address.

Hi Steven,
Yep, I purchased a licence a few months back, I think. I am passing the login details to Commentics, and users can only comment if they're logged in. 

So far, I'm using a workaround where I do a quick row count of the comments table where the user = the logged-in user. If the count equals 1, I use javascript to remove the form. It's not perfect, because it removed the ability to reply to someone else's comment, but it does the job.

I did look at some of the PHP code, but it's beyond my level of understanding to know where to begin to start customising.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
06-Nov-2020, 07:26 PM
Last Post by WhatSay
20-Aug-2020, 12:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)