....
$form['annotate']['note'] = array(
'#type' => 'textarea',
'#title' => t('Notes'),
'#default_value' => isset($node->annotation) ? $node->annotation : '',
'#description' => t('Make your personal annotations about this content here.
Only you (and the site administrator) will be able to see them.')
);
$form['annotate']['nid'] = array(
Custom annotation module 2 years 8 weeks agohi
Has anyone read the book: 'Pro Drupal Development'? Well, anyways, I'm trying to get a custom module to work, only I'm having difficulty.
The module is supposed to let users make an annotation (a type of note that only the user can see) to a web page.
My files:
<?php
/var/www/drupal-6.16/sites/all/modules/custom/annotate/annotate.module
// $Id$
Annotation form added to content type not displaying 2 years 9 weeks agoI tried to add the annotation module from the book "pro drupal development".
But it is not displaying when I try to view the content type.
The module adds a form to the node type(page or story).
The table annotation is created and the admin/settings form is working as well.
If anyone has any solutions let me know.
Thanks!.
How come this doesn't work? (form_submit) 1 year 25 weeks agoHello everyone!
I am studying on Pro Drupal Development book making progresses but there is this one thing that is driving me crazy! I can't really figure it out. I must say i am quite a newcomer either for php and drupal but, you know, i am enjoying it :)
I was working on this custom module that let you take annotations for a node. i bet this is a common one, many of you passed through this in early stages :D
Anyways. i'll show what part of my code doesn't work right now even if the code seems pretty correct to me.
Attach notes to nodes, looking for a module 2 years 11 weeks agoFor a website I'm creating, it's needed that users can add notes to a node from a particular nodetype. The note needs to contain multiple fields from different types. So not only a textfield, but also radiobuttons, checkboxes and select fields. Which fields are needed depends on how the note is configured.
Other requirements:
- It's important that for each node only one note can exists for each user.
- The notes need to be only visible for the user who created the note.
- The user need to be able to get an overview of all notes he created.
db_fetch_array isn't working? 2 years 4 days agoSo, I'm playing around with my first module (annotate), and trying to figure out how to use db_fetch_array properly.
Code snippet below:
<?php
Annotate example for Drupal 7 1 year 36 weeks agoHi everyone,
I started playing around with module development and I went directly for Drupal 7. I do have the D6 book and there is an example named 'annotate'. I am trying to convert this to Drupal 7 and despite documentation for some of the functions for D7 to contain wrong (or none at all) information I've managed to convert the code to the point where I am supposed to get the annotation form. Unfortunately, the form doent appear in the nodes and I cannot figure out why. Below is the code which I have:
Help with my first drupal module please 1 year 23 weeks agoAll
new to drupal and absolutely love it so far.
Im just starting to try and learn a simple module, im a bit poor at php at the moment as its not been my preferred language but im learning.
The code below will allow me to write to my database but only the uid and note not the timestamp and nid, also i cant display anything thats stored in my DB (Probably as i cant save the nid so its always the default 0 in my db)
Can anyone tell me where my code is going wrong please
thanks so much fgor your help
gibbo