| 1 |
<?php |
<?php |
| 2 |
// $Id: paging.module,v 1.39 2009/01/25 08:48:40 Gurpartap Exp $ |
// $Id: paging.module,v 1.41 2009/01/25 17:13:56 Gurpartap Exp $ |
| 3 |
// Original module written by Marco Scutari. |
// Original module written by Marco Scutari. |
| 4 |
// Rewritten and considerably shortened and made more Drupal-friendly by Earl Miles. |
// Rewritten and considerably shortened and made more Drupal-friendly by Earl Miles. |
| 5 |
// Yet again rewritten, extended and currently maintained by Gurpartap Singh. |
// Yet again rewritten, extended and currently maintained by Gurpartap Singh. |
| 463 |
$breaks = (int)($total_chars / $max_chars); |
$breaks = (int)($total_chars / $max_chars); |
| 464 |
$bodypart = array(); |
$bodypart = array(); |
| 465 |
for ($i = 0; $i <= $breaks; $i++) { |
for ($i = 0; $i <= $breaks; $i++) { |
| 466 |
$bodypart[$i] = node_teaser(trim($body), NULL, $max_chars); |
$bodypart[$i] = node_teaser($body, NULL, $max_chars); |
| 467 |
$bodycount = strlen($bodypart[$i]); |
$bodycount = strlen($bodypart[$i]); |
| 468 |
$body = substr($body, $bodycount); |
$body = substr($body, $bodycount); |
| 469 |
} |
} |