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

Contents of /contributions/modules/viewtheme/viewtheme.install

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Feb 28 04:27:35 2007 UTC (2 years, 8 months ago) by njivy
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5
File MIME type: text/x-php
Initial commit: Using views, change themes for node pages
1 <?php
2 // $Id$
3
4 function viewtheme_install() {
5 drupal_set_message(t('Installing viewtheme.module'));
6 switch ($GLOBALS['db_type']) {
7 case 'mysqli':
8 case 'mysql':
9 db_query("CREATE TABLE `view_theme` (
10 `vid` INT( 10 ) UNSIGNED NOT NULL ,
11 `theme` VARCHAR( 255 ) NOT NULL ,
12 `weight` INT( 40 ) NOT NULL ,
13 `enabled` INT( 2 ) NOT NULL
14 ) TYPE = MYISAM ;");
15 break;
16
17 }
18 }
19
20 function viewtheme_uninstall() {
21 switch ($GLOBALS['db_type']) {
22 case 'mysqli':
23 case 'mysql':
24 db_query('DROP TABLE `view_theme`');
25 break;
26 }
27 drupal_set_message(t('Uninstalled viewtheme.module'));
28 }

  ViewVC Help
Powered by ViewVC 1.1.2