Drupal 6 version

prof1337 - May 3, 2009 - 07:17
Project:DefaultTextForNode
Version:5.x-1.1
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review
Description

First of all, great module! This functionality ought to be in core...

I've updated DefaultTextForNode for Drupal 6. I've made quite a few changes to better take advantage of the Drupal API and adhere to Drupal's coding standards.

Here are the most important changes, which you may want to consider backporting to the Drupal 5.x branch:

  • I changed the module's internal name to "default_node_text" since camel-case is generally discouraged in module names for readability's sake.
  • The form submit function is unnecessary: any non-Drupal values on the content-types form are automatically saved as persistent variables. (See the documentation for node_type_form_submit.)
  • Any PHP code in the default text is now evaluated with drupal_eval(). This is the same function used by Drupal's own PHP filter.
  • The module now updates the body and teaser properties of the node form's associated node object ($form['#node']). This allows compatibility with the Excerpt module, among others.
AttachmentSize
default_node_text-6.x.zip7.46 KB

#1

MarcElbichon - May 4, 2009 - 07:51

Hi

Many thanks for your contribution. Do you want CVS access to maintain this module ?

Try to report changes to 5.x version and publish new version as soon as possible.

#2

Apollo610 - July 30, 2009 - 19:54

Worked good for my D6 site, thanks guys!

 
 

Drupal is a registered trademark of Dries Buytaert.