<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body style="direction: ltr;" bidimailui-charset-is-forced="true"
bidimailui-detected-decoding-type="latin-charset" text="#000000"
bgcolor="#ffffff">
<p style="margin-bottom: 0cm; margin-top: 0pt;">I'm hooking nodeapi
op=view and I have the node I hook and another in the db. The one
I hook has field_image which, when hooked, is [0]=>NULL</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">I load a node from
the db, which also has an image field (both are CCK imagefields).
I want to add its image to the original node, however, I need at
this point not to add it to field_image, but to
$node->content->field_image. The problem is that the
structure of ->content is pretty convoluted, ending ultimately
in data that is the same as what I've copied (when I look at a
node with an image), but I can't seem to cause that to happen. I
tried adding the image structure from the source node directly:</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">
$node->content->{$field_name}['field']['items'][$key]['#item']
= $image_structure;</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">but that seems to
cause more convolution rather than ending up like the
$node->content structure from the source node when I display
it. <br>
</p>
<br>
-- <br>
<div class="moz-signature">
<p style="margin-bottom: 0in;"><img
src="cid:part1.02060008.01040304@ayendesigns.com"
name="ayenlogo" valign="top" vspace="30" align="LEFT"
border="0"> <font style="font-size: 8pt;" size="1">Ayen
Designs </font><font face="Times New Roman, serif"><font
style="font-size: 8pt;" size="1"> <br>
388 Bullsboro Drive #105 · Newnan, Georgia 30263</font></font>
<br>
<font face="Times New Roman, serif"><font style="font-size:
8pt;" size="1"> 404-271-9734<br>
Web:<a href="http://ayendesigns.com">ayendesigns.com</a><br>
Blog: <a href="http://theaccidentalcoder.com">theAccidentalCoder.com</a><br>
Drupal: <a href="http://drupal.org/user/367108">j. ayen
green</a><br>
IRQ: j_ayen_green<br>
IM (Yahoo) baalwww (MSN) <a
class="moz-txt-link-abbreviated"
href="mailto:baalwww@yahoo.com">baalwww@yahoo.com</a><br>
Skype: ayendesigns <br>
<br>
Ayen Designs is a tradename of the computer services
division of <img
src="cid:part2.02050700.00070402@ayendesigns.com"
name="acmelogo" align="absmiddle"></font></font></p>
</div>
</body>
</html>