| 1 |
<?php |
<?php |
| 2 |
// $Id: excerpt.module,v 1.5 2005/04/23 03:37:00 unconed Exp $ |
// $Id: excerpt.module,v 1.5.2.1 2005/04/23 03:37:45 unconed Exp $ |
| 3 |
|
|
| 4 |
function excerpt_help($section) { |
function excerpt_help($section) { |
| 5 |
switch ($section) { |
switch ($section) { |
| 16 |
return form_radios(t('Teasers'), "excerpt_$node->type", variable_get("excerpt_$node->type", 1), array(t('Auto-generated'), t('Manual excerpt')), t('Choose whether teasers are generated automatically or can be entered manually by the author.')); |
return form_radios(t('Teasers'), "excerpt_$node->type", variable_get("excerpt_$node->type", 1), array(t('Auto-generated'), t('Manual excerpt')), t('Choose whether teasers are generated automatically or can be entered manually by the author.')); |
| 17 |
case 'form post': |
case 'form post': |
| 18 |
if (variable_get("excerpt_$node->type", 1)) { |
if (variable_get("excerpt_$node->type", 1)) { |
| 19 |
$output = form_textarea(t('Excerpt'), 'teaser', $node->teaser, 60, 10, t('Enter an excerpt for this item. It will be shown on listing pages along with a <em>read more</em> link which leads to the full view. Leave empty to auto-generate one from the body.')); |
$teaser = ($node->teaser != node_teaser($node->body) ? $node->teaser : ''); |
| 20 |
|
$output = form_textarea(t('Excerpt'), 'teaser', $teaser, 60, 10, t('Enter an excerpt for this item. It will be shown on listing pages along with a <em>read more</em> link which leads to the full view. Leave empty to automatically generate an excerpt from the body, or enter a space character to have no excerpt.')); |
| 21 |
} |
} |
| 22 |
break; |
break; |
| 23 |
case 'validate': |
case 'validate': |
| 26 |
} |
} |
| 27 |
break; |
break; |
| 28 |
case 'view': |
case 'view': |
| 29 |
$node->readmore = $node->teaser !== $node->body; |
if ($main) { |
| 30 |
|
$node->readmore = check_output($node->teaser, $node->format) !== $node->body; |
| 31 |
|
} |
| 32 |
|
else { |
| 33 |
|
$node->readmore = $node->teaser !== check_output($node->body, $node->format); |
| 34 |
|
} |
| 35 |
break; |
break; |
| 36 |
} |
} |
| 37 |
|
|