/[drupal]/contributions/modules/active_template/template_api.install
ViewVC logotype

Contents of /contributions/modules/active_template/template_api.install

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


Revision 1.1 - (show annotations) (download) (as text)
Mon Jul 14 02:10:24 2008 UTC (16 months, 2 weeks ago) by collectivecolors
Branch: MAIN
CVS Tags: DRUPAL-5--1-1, DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5--2
File MIME type: text/x-php
*** empty log message ***
1 <?php
2 // $Id$
3
4 function template_api_install() {
5 switch ($GLOBALS['db_type']) {
6 case 'mysql':
7 case 'mysqli':
8 db_query("CREATE TABLE {template} (
9 `tpid` int(10) unsigned NOT NULL auto_increment,
10 `name` varchar(255) character set utf8 collate utf8_unicode_ci default NULL,
11 `description` longtext character set utf8 collate utf8_unicode_ci default NULL,
12 `type` varchar(45) character set utf8 collate utf8_unicode_ci NOT NULL default '',
13 `xid` int(32) unsigned NOT NULL default '0',
14 `css` longtext character set utf8 collate utf8_unicode_ci NOT NULL default '',
15 `js` longtext character set utf8 collate utf8_unicode_ci NOT NULL default '',
16 `php` longtext character set utf8 collate utf8_unicode_ci NOT NULL default '',
17 `active` int(1) NOT NULL default '0',
18 `weight` int(1) NOT NULL default '0',
19 PRIMARY KEY (`tpid`),
20 KEY `type` (`type`,`xid`)
21 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;");
22 break;
23 case 'pgsql':
24 // TODO!!
25 break;
26 }
27 $path = drupal_get_path('module', 'template_api');
28 require_once("$path/template_api.module");
29 require_once("$path/template_file.inc");
30
31 template_api_create_template_directories();
32 }

  ViewVC Help
Powered by ViewVC 1.1.2