Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough
Mar 12 2012
Mar 12

When you're building a social site, one basic question always comes up: are users allowed to edit content and comments after they're posted? If they aren't, typos and simple errors quickly turn into huge annoyances. But if they can edit their posts after they're seen by other users, hijinks are inevitable. Write an incendiary comment, wait until angry people respond, then alter the original content to something innocuous. Voila! Instant flame war.

Ideally, you'd be able to give them a window of time in which edits can be performed (to fix typos or correct errors), then lock the content once other people are likely to have read it. Fortunately, that's exactly what the Edit Limit module adds to Drupal.

Screenshot of administration screen

Setting up Edit Limit is straightforward: install it, turn it on, and hit its settings page to determine which content types it applies to. Then choose how long users have to make edits after posting a piece of content. That's it! You can also choose to limit them to a specific number of edits rather than a specific timeframe, useful to allowing a single edit to fix typos, rather than lots of small revisions. The same rules can also be applied to comments, although the setting is global: you can't set up rules for comments on Articles while leaving comments on Events unrestricted, for example.

Screenshot of Edit Limit in action

Edit Limit has a few rough edges, including odd verbiage in its messages to the user. The amount of time they have left before a node is locked? It gets displayed in seconds rather than hours or minutes. Many of its options would also make sense on the content type editing form, rather than a single central configuration screen. Even with those issues, Edit Limit is a simple, useful tool that gives site builders a bit more flexibility when planning a site's interaction model. If you're a developer with a bit of time on your hands, submitting a patch to fix the issues would take the module to the next level!


About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web