function token_custom_install in Custom Tokens 5
Same name and namespace in other branches
- 6 token_custom.install \token_custom_install()
- 7.2 token_custom.install \token_custom_install()
- 7 token_custom.install \token_custom_install()
Implementation of hook_install().
File
- ./
token_custom.install, line 6
Code
function token_custom_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {token_custom} (\n tkid INTEGER NOT NULL,\n id VARCHAR(100) NOT NULL,\n description VARCHAR(255) NOT NULL,\n type VARCHAR(32) NOT NULL,\n php LONGTEXT NOT NULL,\n PRIMARY KEY (tkid)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
}
drupal_set_message(t('The Custom Tokens module was installed.'));
}