So, not content to work around problems, I took the most annoying problem out of the Drupal/ecto post and fixed it. Item #2, the bit about not being able to use the extended entry field, was due to a curious coding in the blogapi.module file. On or about line 595 we have this mess:
if ($struct['mt_excerpt']) {
$node->body = $struct['mt_excerpt'] .''
. $node->body;
}
if ($struct['mt_text_more']) {
$node->body = $node->body . ''
. $struct['mt_text_more'];
}
What the hell was this person thinking? Without a line break, the "break" keyword won't get parsed! Topping that, "Extended" isn't even a parsed keyword in Drupal 4.5 and there's no such thing as an excerpt in 4.5, either. So, time to re-think what we want to do with these three fields.
The way I see it, if you have an excerpt written then you want to "tease" with it, so we'll just concatenate the body and mt_text_more data. If you don't, then you want to tease with the body and follow with the mt_text_more data, so we do that. All good.
if ($struct['mt_excerpt'] && $struct['mt_text_more']) {
$node->body = $struct['mt_excerpt'] . "\n\n"
. $node->body . "\n\n" . $struct['mt_text_more'];
} elseif ($struct['mt_text_more']) {
$node->body = $node->body . "\n".''."\n"
. $struct['mt_text_more'];
} elseif ($struct['mt_excerpt']) {
$node->body = $struct['mt_excerpt'] ."\n".''
. "\n".$node->body;
}
There. Now I get the behavior that other systems give me, more or less.
New problem: When you open it in ecto again it will all be in the body area with the <--break--> text in there, rather than in both areas. Off to go fix that...
Bookmark/Search this post with:
Welcome to the world of trying to shoehorn MT’s system on top of Drupal’s. As the person responsible for blogapi, allow me to try and explain:
First off, you’re not quite right – the ‘‘ is correctly parsed see node_teaser:
// find where the delimiter is in the body $delimiter = strpos($body, ‘‘);However, you’re correct in that the rest of the usage is a bit arbitrary – the “keyword” was placed in as a placeholder that could be (but isn’t) utilized.
Otherwise, I’m not sure what your approach really solves…. as you won’t ever get a “teaser” in a way you expect.
As for the settings not being honoured on edit – I have received a “verbal” (via IRC or IM … can’t recall now) bug report that never made it to Drupal’s project system…
I recommend filing some bug reports on drupal.org – I’d be happy to alter the behaviour, as very few people have expressed interest in trying to get Drupal to behave just like MT, it’s been a bit neglected.