Support » Plugin: Bainternet Posts Creation Limits » Post Creation Limit does not remove after Time Span ended

  • Resolved Surenderk

    (@surenderk)


    Hi, I’ve been using your plugin for a long time on my multi-author website. I’ve set the Post Creation Limit to 5 posts for every 24 hours for custom WP role.
    I am observing some strange behavior with the plugin that some users are able to add posts after 24 hours (as per limit set) but some users still getting the message “Limit reached” even when they have published their last post 2 days ago.
    Website: http://pressrelease.mydemo1.com/
    Please help me

    • This topic was modified 3 years, 8 months ago by Surenderk.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Please ignore this. I managed to fix this issue.

    how have you fix this?

    Open your bapl.php file which is main file of plugin.

    Find the following code:

    $time = (isset($arr['time_span']) && $arr['time_span'] != "FOREVER" ) ? " AND TIMEDIFF(NOW(), post_date) < '".$arr['time_span']."'" : "";

    Replace it with following code:

    $time = (isset($arr['time_span']) && $arr['time_span'] != "FOREVER" ) ? " AND HOUR(TIMEDIFF(NOW(), post_date)) < '".$arr['time_span']."'" : "";

    P.S. : There should be 2 occurrences of this code. You have to replace the code in two place or else it will not work. Tell me how it works for you?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post Creation Limit does not remove after Time Span ended’ is closed to new replies.