Moving CCK description field into the node body
Back in Drupal 4.7 if you were using CCK for nodes the node body was left empty. In Drupal 5 CCK nodes now can have a body. I wanted to move data from a field named description into the node body so I came up with the following snippet fit for running in the devel module's execute PHP block.
<?php
$result = db_query("SELECT nid FROM {node} WHERE type = 'content_problem'");
while ($o = db_fetch_object($result)) {
$node = node_load($o->nid);
if ($node) {
$node->body = $node->field_description[0]['value'];
$node->format = $node->field_description[0]['format'];
node_save($node);
}
print "$node->title<br>";
}
?>







sa?l?k
That is the solutionsa?l?keverybody want
sa?l?k
That is the solutionsa?l?keverybody want
The content of fixing
Fixing automatically i all wantevden eve nakliyatevden eve nakliyat
evden eve nakliyatkeep it up
I wanted to move data from a
I wanted to move data from a Mirc field named description into the node body so Chat I came up with the following snippet fit for running in the Sohbet devel module's execute PHP block
Sooo helpful
I can't tell you how much time this saved me. I really appreciate you posting this.
-bryan kennedy
Woops, noticed one addition that would help
I actually added this one line.
$node->teaser = node_teaser($node->field_burst_body[0]['value']);So that the teasers would get saved along with the input to the body. Otherwise by teaser views were showing up blank.
evden eve nakliyat
en güzel evden eve nakliyat firmalar? evden eve nakliyat ev nakli
oyun en iyi oyun
I love this site as it
I love this site as it contains good materials.
Regards
------------
Sohbet
lovely site
lovely site evden eve nakliyat
evden eve nakliyat because lots of info teher are evden eve nakliyat