Restrict User to 1 Post per day

Events happening in the community are now at Drupal community events on www.drupal.org.
wjaspers's picture

Is there any way to accomplish this?
I'm building out a "jobs" site that needs to restrict applicants from applying for more than one position (per job) per day.

Comments

A really quick way to do this

Amy_M's picture

A really quick way to do this would be to use webforms http://drupal.org/project/webform as your resume submission instead of a standard CT, the webform module has tons of useful restrictions built in...

I thought about using webform

wjaspers's picture

I thought about using webform but I needed to really leverage the flexibility of CCK and node references. As such, I decided to create a specific content type.

Maybe if there was a Webform

wjaspers's picture

Maybe if there was a Webform NodeReference component module, this would suffice.

A somewhat complicated way...

itangalo's picture

One way of accomplishing the one-node-per-day thing is to use a special role that is allowed to post job applications, take away the role from the user when a application is posted, and add it back one day later.

Something like this:

  • A user role "allowed to apply" (which is applied on top on any other roles for site members).
  • A rule set "re-allow to apply" taking one user object as argument. It gives the role above to the user.
  • A rule triggering on account creation, giving all new users the "allowed to apply" role.
  • A rule triggering on application node creation, doing the following:
    • The "allowed to apply" role is removed from the user.
    • The rule set "re-allow to apply" is scheduled (using Rules Scheduler) in +24 hours.
    • A message is displayed to the user, saying that he/she is welcome to apply for another job in 24 hours.

You could also have the re-allow rule set send out an e-mail to the user, letting him/her know that 24 hours has passed.

The drawback of this solution is that with many users you would have a tonne of scheduled rule tasks at the same time – one for each user that has applied for a job in the last 24 hours. If this is a few hundered users it probably wouldn't be a problem, but if you approach thousands of users I would recommend some other (yet unknown) solution.

Good luck!
//Johan Falk, NodeOne, Sweden
Want to learn more Rules? Check out my latest screen cast series!

A little late, but I rewrote

jdwfly's picture

A little late reply, but I rewrote Node Limit Number for this very problem. It allows for users to be restricted on the amount of nodes they create in a day. It integrates with rules so it shouldn't be too difficult to figure out. Let me know if you have any problems. Make sure you get the 2.x version!

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week