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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | admin_options.patch | 9.51 KB | alfaguru |
| #3 | admin_options.patch | 4.61 KB | alfaguru |
| juliakm-2007-10-18.excerpt.module.patch | 3.21 KB | JuliaKM |
Comments
Comment #1
hayesr commentedThanks 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.
Comment #2
moshe weitzman commentedIn 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
Comment #3
alfaguru commentedHere'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.
Comment #4
alfaguru commentedAfter testing, I noticed the description of the teaser should vary depending on whether it's required or not. Patch amended.
Comment #5
hayesr commentedCould this patch be reviewed by someone still running D5?