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

Contents of /contributions/modules/multiblock/multiblock.install

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


Revision 1.1 - (show annotations) (download) (as text)
Fri Feb 29 20:26:31 2008 UTC (20 months, 4 weeks ago) by andrewlevine
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/x-php
multiblock module allows you to create multiple instances of blocks so you can put them at different regions, weights, etc. Contributed by PageSix.com.
1 <?php
2 // $Id$
3
4 function multiblock_install() {
5 switch($GLOBALS['db_type']) {
6 case 'pgsql':
7 db_query("CREATE TABLE {multiblock} (
8 delta int_unsigned NOT NULL default '1',
9 title varchar(64) NOT NULL default '',
10 module varchar(64) NOT NULL default '',
11 orig_delta varchar(32) NOT NULL default '',
12 multi_settings int_unsigned NOT NULL default '0',
13 PRIMARY KEY (delta)
14 )");
15 db_query("CREATE SEQUENCE {multiblock}_delta_seq INCREMENT 1 START 1;");
16 break;
17 case 'mysql':
18 case 'mysqli':
19 db_query(" CREATE TABLE {multiblock} (
20 `delta` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1',
21 `title` VARCHAR( 64 ) NOT NULL ,
22 `module` VARCHAR( 64 ) NOT NULL ,
23 `orig_delta` VARCHAR( 32 ) NOT NULL ,
24 `multi_settings` INT( 10 ) NOT NULL DEFAULT '0',
25 PRIMARY KEY ( `delta` )
26 )");
27 break;
28 }
29 }

  ViewVC Help
Powered by ViewVC 1.1.2