<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [development] starting...</title></head><body>
<div>Hello, Willians. Welcome to Drupal. The code for the annotation
module can be downloaded here</div>
<div><br></div>
<div
>http://www.drupalbook.com/files/7559ch02%20-%20Your%20First%20Module<span
></span>.zip</div>
<div><br></div>
<div>in case you want to compare it to the code you are using. The
code works by retrieving a note from the database and assigning the
value to the node object. The node is then passed to the form
function. It looks like you are passing only the annotation property
and not the entire node. Your code:</div>
<div><br></div>
<div>...'#value' =&gt; drupal_get_form('annotate_entry_form',
$node-&gt;annotation),</div>
<div><br></div>
<div>what it should be:</div>
<div><br></div>
<div>...'#value' =&gt; drupal_get_form('annotate_entry_form',
$node),</div>
<div><br></div>
<div>This kind of question is best asked in the drupal.org support
forums rather than on the development list.</div>
<div><br></div>
<div>http://drupal.org/forum/18</div>
<div><br></div>
<div>John</div>
<div><br></div>
<blockquote type="cite" cite>&nbsp;Hello, I'm Willians, living in
Brazil and do not know English law, then not repair the errors. :D<br>
&nbsp;I starting the develop for drupal, know a little of PHP, mysql.
I am reading the book Pro Drupal Development, and the example of the
book &quot;chapter 2&quot;, I am not understanding the code right.<br>
&nbsp;More specifically, the function where return the datas. that is&nbsp;
annotate_nodeapi(&amp;$node, $op, $teaser, $page), when return the
result of the database, this
code:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $node-&gt;annotation
= db_result($result);<br>
&nbsp;No is showing, the result in screnn, should be :<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $node-&gt;content['annotation_form'] =
array(</blockquote>
<blockquote type="cite" cite>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'#value' =&gt; drupal_get_form('annotate_entry_form',
$node-&gt;annotation),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '#weight' =&gt; 10<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>
<br>
&nbsp;Someone knows where my erros ??<br>
<br>
&nbsp;Thank you, all... :D<br>
<br>
willians<br>
<br>
--<br>
<a
href="http://www.ecommunita.com/">http://www.ecommunita.com/</a></blockquote>
<div><br></div>
</body>
</html>