Hello,
I am going through the examples in the new Pro Drupal Dev. book and can get the example Annotate module to show up, but I cannot get the annotate.install function to run. No table is being built. I have installed other modules and they worked fine, just not this one.
I also checked a few other small modules for reference and they seem to all follow the same flow and all haev the same permissions.
Any even tried this?
I am not even getting the error/status messages.
Here is the code I am using:
----------------------------------
<?php
// $Id$
function annotate_install() {
drupal_set_message(t('Beginning installation of annotate module.'));
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {annotations} (
uid int(21) NOT NULL default 0,
nid int(21) NOT NULL default 0,
note longtext NOT NULL,
timestamp int(11) NOT NULL default 0,
PRIMARY KEY (uid, nid)
) /*!40100 DEFAULT CHARACTER SET utf8 */;");
$success = TRUE;
break;
default:
drupal_set_message(t('Unsupported database.'));
}
if ($success) {
drupal_set_message(t('The module installed tables successfully.'));
}
else {
drupal_set_message(t('The installation of the annotate module was unsuccessful.'),'error');