drupal

  • user warning: Table './johnandcailincmsdb/node_counter' is marked as crashed and should be repaired query: SELECT totalcount, daycount, timestamp FROM node_counter WHERE nid = 66 in /var/www/drupal/includes/database.mysql.inc on line 172.
  • user warning: Table './johnandcailincmsdb/node_counter' is marked as crashed and should be repaired query: SELECT totalcount, daycount, timestamp FROM node_counter WHERE nid = 67 in /var/www/drupal/includes/database.mysql.inc on line 172.
  • user warning: Table './johnandcailincmsdb/node_counter' is marked as crashed and should be repaired query: SELECT totalcount, daycount, timestamp FROM node_counter WHERE nid = 65 in /var/www/drupal/includes/database.mysql.inc on line 172.
  • user warning: Table './johnandcailincmsdb/node_counter' is marked as crashed and should be repaired query: SELECT totalcount, daycount, timestamp FROM node_counter WHERE nid = 32 in /var/www/drupal/includes/database.mysql.inc on line 172.
  • user warning: Table './johnandcailincmsdb/node_counter' is marked as crashed and should be repaired query: SELECT totalcount, daycount, timestamp FROM node_counter WHERE nid = 68 in /var/www/drupal/includes/database.mysql.inc on line 172.
  • user warning: Table './johnandcailincmsdb/node_counter' is marked as crashed and should be repaired query: SELECT totalcount, daycount, timestamp FROM node_counter WHERE nid = 62 in /var/www/drupal/includes/database.mysql.inc on line 172.
  • user warning: Table './johnandcailincmsdb/node_counter' is marked as crashed and should be repaired query: SELECT totalcount, daycount, timestamp FROM node_counter WHERE nid = 61 in /var/www/drupal/includes/database.mysql.inc on line 172.
  • user warning: Table './johnandcailincmsdb/node_counter' is marked as crashed and should be repaired query: SELECT totalcount, daycount, timestamp FROM node_counter WHERE nid = 60 in /var/www/drupal/includes/database.mysql.inc on line 172.

adding a javascript counter to your drupal forms

if you want to add a javascript counter (n characters remaining) to your drupal forms, you can do the following (jquery code based very heavily on the jquery tricks on reindel.com)

adding external javascript content to your drupal nodes or views

sometimes you want to include jquery / javascript code in content areas in your nodes, views etc. it's arguable that this code is better in managed in the filesystem (under source code control) than in your database-stored-node. here's how you might do it using a php include.

using jquery for in-place prompt text in your exposed drupal filters

when using exposed filters in drupal, it's sometimes nice to place the prompt text for a form field inside the form field itself e.g. for a very compact form. here's a way to do this using jquery.

drupal actions module

the drupal actions module is one of those useful and under-documented drupal modules out there. this blog is not meant to serve as complete documentation for this module, but will provide some helpful hints to get you started.

protecting your drupal site under development

while you are developing your user site, you probably want to protect it from prying eyes. you can do this using a drupal module or an apache configuration.

configuring vim for drupal php files

generally speaking, vim is a pretty smart text editor. if you put the following in your .vimrc file

syntax on

then it will color highlight your file appropriately. it chooses the appropriate color highlighting by looking at the file suffix (e.g. .java, .c).

unfortunately, the drupal .module and .inc files fool vim, because these are not standard php extensions.

drupal google analytics and event tracking

google analytics provides for arbitrary javascript event tracking. anywhere in your page that you can put an onClick or an onMouseOver or any other event you please, you can also name that event and track it in google analytics. this is particularly handy for tracking hits to downloadable content (for example pdf files).

drupal cck vs taxonomy

Drupal provides two methods for adding structured data to a node.

The first is the out-of-the-box Taxonomy module. Taxonomy allows you to associate a vocabulary with a content type. When creating or editing the node, you are invited to choose a value for the vocabulary from its associated list of terms. In essence, you are associating a structured field with your node. The name of the field is the name of the vocabulary and the value is the selected term.

syndicate content