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

Contents of /contributions/modules/adlib/adlib.install

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


Revision 1.1 - (show annotations) (download) (as text)
Thu Apr 16 20:27:52 2009 UTC (7 months, 1 week ago) by nedjo
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
Initial version of a module for in-place, fill in the blanks style editing of forms. In Drupal 5.
1 <?php
2 // $Id: $
3
4 /**
5 * Implementation of hook_install().
6 */
7 function adlib_install() {
8 // Give adlib a high weight to ensure its nodeapi 'view' op receives
9 // content set by other modules, e.g., content module.
10 db_query("UPDATE {system} SET weight = 15 WHERE name = 'adlib'");
11
12 // Create an adlib node type.
13 if (!node_get_types('type', 'adlib')) {
14 $type = array(
15 'type' => 'adlib',
16 'name' => t('Adlib'),
17 'module' => 'node',
18 'description' => t('An adlib is used to construct a fill-in-the-blanks version of a form.'),
19 'custom' => TRUE,
20 'modified' => TRUE,
21 'locked' => FALSE,
22 );
23
24 $type = (object) _node_type_set_defaults($type);
25 node_type_save($type);
26
27 cache_clear_all();
28 system_modules();
29 menu_rebuild();
30 node_types_rebuild();
31
32 variable_set('node_options_adlib', array('status'));
33 variable_set('adlib_type', 'adlib');
34 }
35 }
36

  ViewVC Help
Powered by ViewVC 1.1.2