hook_insert - Anyone know what this code is doing?

The handbook for the sample module has the following code to insert a node from a module:

function node_example_insert($node) {
  db_query("INSERT INTO {node_example} (nid, color, quantity) VALUES (%d, '%s', %d)", $node->nid, $node->color, $node->quantity);
} 

What are the % signs doing and how are the values from the node form passed to this query?
Any help much appreciated!

CSS only themes for 4..7

I'm trying to find a base theme to work with on for 4.7 , that does not use tables for layout. Can anyone suggest one?

node varchar not long enough - > patched to text

I got annoyed by this error message from the node table
warning: pg_query(): Query failed: ERROR: value too long for type character varying(128)

so i wrote a postgresql sql patch to change them varchars to text..

maybe it's useful to someone else?

Drupal newbie gripes - help me out here!

Hi, I'm a first time user of Drupal, but no stranger to PHP CMS (Mambo, SiteX), My interest in Drupal is largely due to what seem to be a solid set of useful modules and good multilanguage support, without the complexity of Mambo.

I have to say though that my first experience (like most other people it seems) is painful.

Here's why:
The installation instructions, and most of the responses to similar newbie threads seem to assume the following:

  • I have my very own server which I am able perfrom command line instructions on
  • My MySQL database either doesn't exist, or is exists but is empty
  • That i would happily install Drupal to the root directory of my domain or subdomain, using up a precious MySQL database, when all i want to do is see if I can make Drupal do what I need it to do.

In reality and in my experience, the largest potential benificiaries of a system like Drupal actually have the following:

  • Some webspace hosted remotely
  • FTP access
  • No command line access
  • PHPMyadmin - THE most popular MySQL database tool available
  • An existing My SQL database
  • Existing tables in that database which they do not want to screw up by running a script which creates tables without any prefixes

Password verification problem on initial account

Ok,

So I got version 4.7 to avoid the template problems I was having. That worked.

In creating my initial account I got an error since I don't have a mail server.
(I suppose this isn't too important if all I want to do is play around with the program a bit)

But it won't validate my password. It gives me this error

Plz help: Custom-theming flexinode in node.tpl.php -- examples?

In "Theme flexinode" (http://drupal.org/node/38920) the following is suggested:

Every custom field is set as a property of the node. To create a custom
presentation for your new content type, add logic in your theme's node
function to switch on the node type and print out the fields in the
way you choose. The fields are all named flexinode_n where n is the
field ID.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x