I modified the excerpt module to add an admin section where you can set the weight of the excerpt field and where you can also make the excerpt field required. This is my first patch, so please let me know what to change.

Comments

hayesr’s picture

Status: Needs work » Active

Thanks for the patch, the code looks good, but part of this functionality already exists under the settings for content types. I think the 'require' feature should go there as well. I am working on adding permissions as well.

moshe weitzman’s picture

In D6 would recommend doing weight with hook_content_extra_fields(). Thats a hook offerred by CCK for ordering the node form. See patch at #272335: Excerpt for Drupal 6

alfaguru’s picture

StatusFileSize
new4.61 KB

Here's an improved version of the patch which provides default values for all content types (useful if as in the site I am working on, there's only one type that actually needs a teaser). I did some clean up of the code as well.

alfaguru’s picture

StatusFileSize
new9.51 KB

After testing, I noticed the description of the teaser should vary depending on whether it's required or not. Patch amended.

hayesr’s picture

Status: Active » Needs review

Could this patch be reviewed by someone still running D5?