/[drupal]/contributions/modules/markitup/markitup.install
ViewVC logotype

Contents of /contributions/modules/markitup/markitup.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Fri Aug 8 01:05:58 2008 UTC (15 months, 2 weeks ago) by mlsamuelson
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1, DRUPAL-6--2
Changes since 1.3: +0 -0 lines
File MIME type: text/x-php
#277476 - attempt 3, to update file permissions
1 <?php
2 // $Id:
3
4 /**
5 * @file
6 * markItUp module install file.
7 */
8 /**
9 * Implementation of hook_schema.
10 */
11 function markitup_schema() {
12 $schema['markitup_editors'] = array(
13 'fields' => array(
14 'meid' => array('type' => 'serial', 'not null' => TRUE, 'description' => t('Primary Key: A unique ID for a markItUp editor configuration.')),
15 'name' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '', 'description' => t('The name for this markItUp editor configuration.')),
16 'miu_set' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '', 'description' => t('The markItUp set defined for this markItUp editor configuration.')),
17 'skin' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '', 'description' => t('The markItUp skin defined for this markItUp editor configuration.')),
18 'description' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE),
19 ),
20 'primary key' => array('meid'),
21 );
22 $schema['markitup_editors_formats'] = array(
23 'fields' => array(
24 'meid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'description' => t('Composite Key from foreign key: The unique ID for a markItUp editor configuration.')),
25 'format' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'description' => t('Composite Key from foreign key: The {filter_formats}.format configuration of filters.')),
26 ),
27 'primary key' => array('meid', 'format'),
28 );
29 return $schema;
30 }
31
32 /**
33 * Implementation of hook_install().
34 */
35 function markitup_install() {
36 drupal_install_schema('markitup');
37 // Set up the default markItUp editor.
38 // Set variable values for paths and textarea ids.
39 variable_set('markitup_include', "node/add/*\r\nnode/*/edit\r\nadmin/settings/site-information\r\ncomment/edit/*\r\ncomment/reply/*");
40 variable_set('markitup_ids', "edit-body\r\nedit-site-footer\r\nedit-comment");
41 db_query("INSERT INTO {markitup_editors} (name, description, skin, miu_set) VALUES ('default', 'The default markItUp editor. Works well with the Filtered HTML input format.', 'simple', 'default')");
42 // We're not setting up any default editor-to-format associations, because we'll handle that fallback elsewhere
43 }
44
45 /**
46 * Implementation of hook_uninstall().
47 */
48 function markitup_uninstall() {
49 drupal_uninstall_schema('markitup');
50 }

  ViewVC Help
Powered by ViewVC 1.1.2