Hi there. I am developing my personal module based on the "annotation module" proposed by "Pro Drupal Development" book.
I am making my own modifications and i am trying to do the following step:
I have this code:
AND uid = %d', $node->nid, $user->uid);
while($row = db_fetch_array($query)){
echo "Annotation =>> " . $row[note] . " <br>");
}
This just show me all the annotation previously added to a specific node and by a specific user (the one that added the node ofc). As a matter of fact the list of annotations are just showed on the top of the web page...above the header because no content items are speficied to show them in a specific area of the page.
To fix this, i created 2 forms as "boxes" for my query result.
'#type'=>'fieldset',
'#title' =>t('Show Annotations'),
);
$form['annotateshow']['content']=array(
'#type'=>'item',
'#value' => isset($node->annotations) ? $node->annotations : ' ',
);
return $form;
}
All i have to do now is writing the result of the query inside $node->annotations
I ranged from silly tries to more "tought" ones.
1)
$query = db_query('SELECT note FROM {annotations} WHERE nid = %d
AND uid = %d', $node->nid, $user->uid);









