Adding weight and required field options

JuliaKM - November 16, 2007 - 21:51
Project:Excerpt
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

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.

AttachmentSize
juliakm-2007-10-18.excerpt.module.patch3.21 KB

#1

hayesr - January 2, 2008 - 05:37
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.

#2

moshe weitzman - November 11, 2008 - 04:16

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

#3

alfaguru - January 15, 2009 - 15:08

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.

AttachmentSize
admin_options.patch 4.61 KB

#4

alfaguru - January 15, 2009 - 15:49

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

AttachmentSize
admin_options.patch 9.51 KB

#5

hayesr - April 3, 2009 - 17:14
Status:active» needs review

Could this patch be reviewed by someone still running D5?

 
 

Drupal is a registered trademark of Dries Buytaert.