| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Converts @usernames to themed usernames and #hashtags to themed taxonomy terms on Facebook-style Statuses.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Implementation of hook_schema().
|
| 11 |
*/
|
| 12 |
function facebook_status_tags_schema() {
|
| 13 |
$schema = array();
|
| 14 |
$schema['facebook_status_tags'] = array(
|
| 15 |
'description' => 'Stores term-to-status relationships.',
|
| 16 |
'fields' => array(
|
| 17 |
'sid' => array(
|
| 18 |
'type' => 'int',
|
| 19 |
'unsigned' => TRUE,
|
| 20 |
'not null' => TRUE,
|
| 21 |
'default' => 0,
|
| 22 |
'description' => 'Status ID',
|
| 23 |
),
|
| 24 |
'rid' => array(
|
| 25 |
'type' => 'int',
|
| 26 |
'not null' => TRUE,
|
| 27 |
'unsigned' => TRUE,
|
| 28 |
'default' => 0,
|
| 29 |
'description' => 'Reference ID (Term ID or User ID)',
|
| 30 |
),
|
| 31 |
'type' => array(
|
| 32 |
'type' => 'varchar',
|
| 33 |
'length' => 40,
|
| 34 |
'not null' => TRUE,
|
| 35 |
'default' => '',
|
| 36 |
'description' => 'Reference type',
|
| 37 |
),
|
| 38 |
),
|
| 39 |
'indexes' => array(
|
| 40 |
'sid' => array('sid'),
|
| 41 |
'rid' => array('rid'),
|
| 42 |
),
|
| 43 |
'primary key' => array('sid', 'rid'),
|
| 44 |
);
|
| 45 |
return $schema;
|
| 46 |
}
|
| 47 |
|
| 48 |
/**
|
| 49 |
* Implementation of hook_install().
|
| 50 |
*/
|
| 51 |
function facebook_status_tags_install() {
|
| 52 |
drupal_install_schema('facebook_status_tags');
|
| 53 |
}
|
| 54 |
|
| 55 |
/**
|
| 56 |
* Implementation of hook_uninstall().
|
| 57 |
*/
|
| 58 |
function facebook_status_tags_uninstall() {
|
| 59 |
drupal_uninstall_schema('facebook_status_tags');
|
| 60 |
variable_del('facebook_status_tags_vid');
|
| 61 |
variable_del('facebook_status_tags_url');
|
| 62 |
}
|