SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
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 . "-";
}
}
- Log in to post comments