Hi,

Is it possible to reset the nodelimit counter for a role on a specific date?
I need a rule where users that reached their limit of allowed posts, will be able to post again after a certain date has passed.
So basically I want users to be able to post 4 articles every quarter of a year, is that possible?

thanks.

Comments

erik’s picture

Still couldn't figure it out by myself.
Anyone willing to give a hint?

jdwfly’s picture

Quarterly isn't an option. It can only do daily, weekly, monthly, and annually.

erik’s picture

StatusFileSize
new27.59 KB

Hi Joe,

Thanks for your clear response.
I decided to try and implement this functionality myself in the 1.0 version (which basically fits my needs) because I really need it for a project.
That worked out quite well, although being totally new in Drupal module development, since the original module is clearly documented and I have some php/mysql experience.

For now this addition fits my personal needs, but if I make the from-and-to dates optional and by default disabled, maybe it could be usefull for other people using the module as well? I would really like to contribute to Drupal, and maybe this is a way to start..

What do you think of the idea?

jdwfly’s picture

Title: reset node limit by date » Create a limit only between certain dates
Version: 6.x-2.0-alpha3 » 6.x-2.x-dev
Component: Miscellaneous » Code
Category: support » feature

I think this would be a good feature to add before I make the 1.0 release. If the module allowed for a custom time period by choosing the start and end date that would make it a lot more flexible.

erik’s picture

Thank you, when it is ready I'll submit it for review.

erik’s picture

StatusFileSize
new11.98 KB

Hi Joe,

Attached is the working version.

I still have one cosmetic issue though which troubles me fixing it; The rows with stored limits should only render date fields if they where actually set at creation, any idea on how that could be accomplished?

Please let me know if I did things the right way. I'm still learning, so it's probably not perfect..

erik’s picture

Just discovered I made a typo on line 184 of node_limitnumber.module, stating:

      if($limit->startdate > 0 && $limit->endate > 0) {

it should read:

      if($limit->startdate > 0 && $limit->enddate > 0) {
jdwfly’s picture

Status: Active » Needs review