Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#6 | node_size_zero_2.patch | 1003 bytes | gordon |
#3 | node_size_zero_1.patch | 1.04 KB | gordon |
#1 | node_size_zero_0.patch | 987 bytes | gordon |
node_size_zero.patch | 1.99 KB | gordon | |
Comments
Comment #1
gordon CreditAttribution: gordon commentedoriginal submited patch had my node_submit() changes included it it.
Comment #2
Dries CreditAttribution: Dries commentedThe code comments need to be updated as well ...
Comment #3
gordon CreditAttribution: gordon commentedupdated 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.
Comment #4
Steven CreditAttribution: Steven commentedI'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.
Comment #5
TDobes CreditAttribution: TDobes commentedI 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.
Comment #6
gordon CreditAttribution: gordon commentedThis is fine, I have removed this from my patch as well as the comment that caused me to implement this.
Comment #7
Dries CreditAttribution: Dries commentedCommitted to HEAD.
Comment #8
(not verified) CreditAttribution: commentedComment #9
sly_ece CreditAttribution: sly_ece commentedGordon 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.