Patch improves Drupal 5 compatibility and makes these ten (10) changes:

  1. The teaser is now set on the 'load' operation of hook_nodeapi invocations. It was being set on 'alter'. In Drupal 5, node_invoke_nodeapi with 'alter' is the last thing called by node_view before returning the themed node content. At this point, the contents of $node->body have been unset if $teaser was TRUE. This was preventing the full content display option from working. It also meant that the appearance of the "Read More" link could not be influenced at that point.
  2. There was logic in the hook_form_alter implementation that would display the teaser form on vocabulary and term forms. I removed this for a couple of reasons: 1) It never appeared on terms or vocabularies aside from the editing form and was redundant given their description fields and 2) it could present a referential integrity problem. Nodes, terms, and vocabularies all use separate sequences to generate their unique IDs, and there are IDs in each sequence that may be present in the other.
  3. A new option for display full content has been added. This option displays the full content of the node in the teaser if the following conditions are met: 1) there is no node teaser entry and 2) there is no <!--break--> element in the body. If there's no node teaser, but there is a <!--break-->, the content before the <!--break--> is displayed as the teaser.
  4. On the node form, the teaser is placed between the body and input filter areas if there is a 'body_filter' area in the form. Otherwise, it's just added to the form.
  5. The description beneath the teaser text area is now aware of the module's current settings and displays the appropriate message.
  6. Removed nodeteaser_perm() since it wasn't being used.
  7. Created a base localization template for the module ( po/noteteaser.pot )
  8. Modified hook_install to give the module a heavier weight (99) so it's invoked later in the node_invoke_nodeapi process.
  9. Added nodeteaser_update_2 to add the weighting to existing installs.
  10. Added an uninstall hook.
CommentFileSizeAuthor
nodeteaser.patch26.74 KBAnonymous (not verified)

Comments

Anonymous’s picture

I tried out your patch and it seems to cancel my custom "contemplate" output. Prior to this patch the contemplate templates would give me the formate I wanted for my nodes which are custom CCK nodes. With this patch I get the regular nasty output of the CCK nodes.

I haven't dug into this yet but with unpatched version the contemplate templates worked unless the node teaser wasn't set so perhaps that is a useful clue.

Anonymous’s picture

Version: 5.x-1.1 » 5.x-1.2
Status: Needs review » Fixed

This patch was committed in version 5.x-1.2

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.