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

Contents of /contributions/modules/simpleviews/simpleviews.install

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


Revision 1.3 - (show annotations) (download) (as text)
Thu Sep 25 22:08:09 2008 UTC (14 months ago) by eaton
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.2: +32 -27 lines
File MIME type: text/x-php
A real, honest-to-goodness, working version of Simpleviews.
1 <?php
2 // $Id: simpleviews.install,v 1.2 2008/06/02 17:15:36 eaton Exp $
3
4 /**
5 * @file
6 * SimpleViews module's install and uninstall code.
7 */
8
9
10 /**
11 * Implementation of hook_install().
12 */
13 function simpleviews_install() {
14 drupal_install_schema('simpleviews');
15 }
16
17 /**
18 * Implementation of hook_schema().
19 */
20 function simpleviews_schema() {
21 $schema['simpleviews'] = array(
22 'description' => t('Stores custom links to be added to nodes.'),
23 'fields' => array(
24 'svid' => array(
25 'type' => 'serial',
26 'unsigned' => TRUE,
27 'not null' => TRUE,
28 'description' => t('Unique identifier for the {simpleviews} item.'),
29 ),
30 'module' => array(
31 'type' => 'varchar',
32 'length' => 255,
33 'not null' => TRUE,
34 'default' => 'simpleviews',
35 'description' => t("The name of the module that generated the {simpleviews} item.")
36 ),
37 'path' => array(
38 'type' => 'varchar',
39 'length' => 255,
40 'not null' => TRUE,
41 'default' => '',
42 'description' => t("The URL of the {simpleviews} item.")
43 ),
44 'title' => array(
45 'type' => 'varchar',
46 'length' => 255,
47 'not null' => TRUE,
48 'default' => '',
49 'description' => t("The human-readable description of the {simpleviews} item.")
50 ),
51 'header' => array(
52 'type' => 'varchar',
53 'length' => 255,
54 'not null' => TRUE,
55 'default' => '',
56 'description' => t("The text to display at the top of the {simpleviews} item.")
57 ),
58 'filter' => array(
59 'type' => 'varchar',
60 'length' => 128,
61 'not null' => TRUE,
62 'default' => 'all-posts',
63 'description' => t('The type of dynamic listing to be displayed on the {simpleviews} item.'),
64 ),
65 'style' => array(
66 'type' => 'varchar',
67 'length' => 128,
68 'not null' => TRUE,
69 'default' => '',
70 'description' => t("The output style of the listing {simpleviews} item."),
71 ),
72 'sort' => array(
73 'type' => 'varchar',
74 'length' => 128,
75 'not null' => TRUE,
76 'default' => 'newest',
77 'description' => t("The sort style of the listing {simpleviews} item."),
78 ),
79 'argument' => array(
80 'type' => 'varchar',
81 'length' => 128,
82 'not null' => FALSE,
83 'default' => '',
84 'description' => t("The optional type of argument to generate beneath this {simpleviews} item."),
85 ),
86 'rss' => array(
87 'type' => 'int',
88 'not null' => TRUE,
89 'default' => 0,
90 'description' => t('A boolean indicating whether this {simpleviews} item should expose an RSS feed.'),
91 ),
92 'block' => array(
93 'type' => 'int',
94 'not null' => TRUE,
95 'default' => 0,
96 'description' => t('A boolean indicating whether this {simpleviews} item should expose a sidebar block.'),
97 ),
98 ),
99 'primary key' => array('svid'),
100 );
101 return $schema;
102 }
103
104 /**
105 * Implementation of hook_uninstall().
106 */
107 function simpleviews_uninstall() {
108 drupal_uninstall_schema('simpleviews');
109 }

  ViewVC Help
Powered by ViewVC 1.1.2