Basically this allows the <!--break--> to work even when the teaser length to is set to unlimited. I find this a much more logical solution esp. and intranet sites where they are more manuals and documentation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gordon’s picture

FileSize
987 bytes

original submited patch had my node_submit() changes included it it.

Dries’s picture

The code comments need to be updated as well ...

gordon’s picture

FileSize
1.04 KB

updated the patch, to include more comments, and also made the code fit the patch in the case where there is a size limit and it has a <!--break--> the is more than a factor of 2 away from the start.

Steven’s picture

I'm not sure if the "outside of a factor of 2" bit is a good idea. Shouldn't 'break' override the size settings? At least this should be a togglable option IMO. You should also keep in mine that strpos uses bytes, not characters, so you don't have much guarantees anyhow as far as length goes.

TDobes’s picture

I agree with Steven that the whole "factor of two" business will be confusing to users. This comment seems to exist in the unpatched node.module merely as a relic from the past. The code that actually enforced this condition was removed about a year ago (note that the help text presented to users was updated, but the comment was not). Unless there's a really good reason for it, I suggest we just remove the comment.

As for the rest of the patch, the ability to selectively use teasers would be useful for admins that dislike teaser auto-generation. Simply disabling the break tag (as we do now) could be confusing. +1 as long as the "factor of two" code is removed.

gordon’s picture

FileSize
1003 bytes

This is fine, I have removed this from my patch as well as the comment that caused me to implement this.

Dries’s picture

Committed to HEAD.

Anonymous’s picture

sly_ece’s picture

Gordon can you please send a message about your web site, I cannot seem to get to it and get the image upload plugin for htmlarea? Please help as I would really like to try this.