I'm using putting the break code outside of the php open close tags -- but it doesn't work. Should I put it inside the PHP tags and use and use an echo statement?

Any ideas?

Shai

Comments

pwolanin’s picture

The break marker is disabled with PHP format- allowing some use of it with PHP format is an open feature request in the queue (IIRC). You could also potentially use a contrib module to make a separate teaser.

---
Work: BioRAFT

Chill35’s picture

I have enabled it long ago for the php input by modifying 2 lines in core, i.e. by commenting out a small code section.

In node.module, lines 168-...

Comment out the following :

// We check for the presence of the PHP evaluator filter in the current
// format. If the body contains PHP code, we do not split it up to prevent
// parse errors.
// Modified by [PUT YOUR NAME HERE] : commented out the block because I want the split anyway
/*if (isset($format)) {
    $filters = filter_list_format($format);
    if (isset($filters['filter/1']) && strpos($body, '<?') !== FALSE) {
      return $body;
}
}*/

The same can be done in Drupal 5

My reasoning is that if one is knowledgable/responsible enough to use php (he must be an administrator), then he knows what he is doing when using the <!--break-->.

IMPORTANT : whenever you use php, always put the break yourself, if in the settings you let Drupal put the break for you. Because if Drupal breaks teasers after x words, and you use php, and you're not inserting the break, then you will have some trouble here with my solution, most probably.

Caroline

Shai’s picture

Thank you!

Shai