'description'=>'Foreign key: The {filter_format}.format to which the handler settings belong. GLOBAL for the global settings.',
'description'=>'Foreign key: The format to which the handler settings belong. GLOBAL for the global settings.',
),
// Options
'module'=>array(
...
...
@@ -85,47 +85,3 @@ function xbbcode_schema() {
return$schema;
}
/**
* Implements hook_enable().
*/
functionxbbcode_enable(){
// Check if a format with a different internal name is already called BBCode.
$bbcode_exists=db_query_range('SELECT 1 FROM {filter_format} WHERE name = :name AND format != :format',0,1,array(':name'=>'BBCode',':format'=>'xbbcode'))->fetchField();
drupal_set_message(t('A <a href="@url">BBCode</a> text format has been created. All users have access to it.',array('@url'=>url('admin/config/content/formats/'.$format->format))));
}
/**
* Implements hook_disable().
*/
functionxbbcode_disable(){
$bbcode=filter_format_load('xbbcode');
if($bbcode){
filter_format_disable($bbcode);
drupal_set_message(t('The <a href="@url">BBCode</a> text format has been disabled.',array('@url'=>url('admin/config/content/formats/'.$bbcode->format))),'warning');