The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How limit Comments ...
 
Share:
Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Solved] How limit Comments number per user in specific period time

4 Posts
2 Users
0 Reactions
1,382 Views
Posts: 2
Topic starter
(@abdoo22)
New Member
Joined: 3 years ago

i need to limit numbers of comments user can post per time

as example: user can post only one comment / 24Hours

i try following function code

"function dam_the_flood( $dam_it, $time_last, $time_new ) {
if ( ($time_new - $time_last) < 86001 ) // time interval is 86001
return true; // seconds
return false;
}
add_filter('comment_flood_filter', 'dam_the_flood', 10, 3);"

Β 

it works with other website not use wp-discuz

but not with wp-discus

i hope can fix that issue

thanks

3 Replies
Asti
Posts: 8075
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

Hi @abdoo22,

Please check out the wpDiscuz "Limit Comments per User" option. It's located in the Dashboard > wpDiscuz > Settings > Comment Moderation admin page.Β 

More info here: https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#limit-comments-per-user

Posts: 2
Topic starter
(@abdoo22)
New Member
Joined: 3 years ago

Hello,

thank you for replay

i know this option but it limit comments for user lifetime

i need to limit for some times

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

@abdoo22,Β 

You can use the wpdiscuz_form_render hook. More info here: https://wpdiscuz.com/docs/codex/filters/wpdiscuz_form_render/ Β 

Share: