On the secondary node, try implementing node_build_content(), which should provide to you the secondary $node->content array, or I think you might get this by calling node_invoke_nodeapi($node, 'view', $teaser, $page) directly. See the internals of node_build_content() <a href="http://api.drupal.org/api/drupal/modules--node--node.module/function/node_build_content/6">http://api.drupal.org/api/drupal/modules--node--node.module/function/node_build_content/6</a><div>
<br><div>Keep in mind this *will* invoke hook_nodeapi($op = 'view') for the secondary node, which will call your hook_nodeapi() *again,* so make sure you aren't doing anything redundant or getting stuck with infinite recursion somehow.</div>
<div><br></div><div><div class="gmail_quote">On Mon, Jan 31, 2011 at 10:50 PM, <span dir="ltr"><<a href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">
<div style="direction:ltr" 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>
<p style="margin-bottom:0in"><img src="?ui=2&ik=6d3bfeff2c&view=att&th=12ddfc9515b1549f&attid=0.1.1&disp=emb&zw" 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" target="_blank">ayendesigns.com</a><br>
Blog: <a href="http://theaccidentalcoder.com" target="_blank">theAccidentalCoder.com</a><br>
Drupal: <a href="http://drupal.org/user/367108" target="_blank">j. ayen
green</a><br>
IRQ: j_ayen_green<br>
IM (Yahoo) baalwww (MSN) <a href="mailto:baalwww@yahoo.com" target="_blank">baalwww@yahoo.com</a><br>
Skype: ayendesigns <br>
<br>
Ayen Designs is a tradename of the computer services
division of <img src="?ui=2&ik=6d3bfeff2c&view=att&th=12ddfc9515b1549f&attid=0.1.2&disp=emb&zw" name="acmelogo" align="absmiddle"></font></font></p>
</div>
</div>
</div></div></blockquote></div><br></div></div>