Rebuild teasers

$contentType = 'node_type';
$nodeList = db_query("SELECT node.nid AS nid FROM node node  WHERE node.type in ('$contentType')");
while ($node = db_fetch_object($nodeList) ) {
  $nodeId =$node->nid;

  $nodeRevList = db_query("SELECT `nid`, `body`, `teaser` FROM `node_revisions` WHERE `nid`=$nodeId");
  while ($nodeRev = db_fetch_object($nodeRevList)) {
    //echo $nodeRev->teaser . "<BR><BR>";
    $teaser = node_teaser($nodeRev->body,NULL, 200);
    //echo $teaser;
    db_query("UPDATE node_revisions SET teaser = '%s' WHERE nid = %d", $teaser, $node->nid);
    $i++;
    echo $i . "-";
  }

}

Recent Updates

  • 8 months 3 weeks ago
    1.27.2 update
  • 9 months 4 days ago
    Drupal 10/11 config
  • 9 months 5 days ago
  • PHP
    9 months 5 days ago
    PHP 8.3.11 and AlmaLinux
  • 9 months 6 days ago
    New version of Pound