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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| default_node_text-6.x.zip | 7.46 KB |

#1
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
Worked good for my D6 site, thanks guys!