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

Contents of /contributions/modules/skipcart/skipcart.install

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


Revision 1.4 - (show annotations) (download) (as text)
Mon Sep 24 20:39:59 2007 UTC (2 years, 2 months ago) by suydam
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
File MIME type: text/x-php
Port of Skipcart v1.7 to Drupal 4.7 by mariano.barcia
1 <?php
2 function skipcart_install() {
3 drupal_set_message( t('Installing skipcart.module...') );
4 watchdog("Skipcart","Intalling skipcart.module...");
5 switch ( $GLOBALS['db_type'] ) {
6 case 'mysql':
7 case 'mysqli':
8 watchdog("Skipcart","DB Type = Mysql(i?)");
9 db_query("
10 CREATE TABLE skipcart_nodes (
11 nid int(10) unsigned NOT NULL default '0',
12 skipcart_enabled tinyint(3) unsigned NOT NULL default '0',
13 skipcart_buytext varchar(255) default NULL
14 )"
15 ) or watchdog("Skipart","FAILURE");
16 watchdog("Skipcart","SUCCESS!");
17 $success = TRUE;
18 break;
19 default:
20 drupal_set_message( t('Unsupported database for skipcart.module during install routine'),'error');
21 }
22 if ( $success ) {
23 drupal_set_message( t('skipcart.module installed successfully...<OL><LI>Grant yourself access control for the modules functions at ' . l('admin/user/access','admin/user/access') . '<LI>Then visit ' . l('admin/ecsettings/skipcart','admin/ecsettings/skipcart') . ' to continue configuration.</ol>' ) );
24 }
25 else {
26 drupal_set_message( t('skipcart.module failed install'),'error' );
27 }
28 }
29 ?>

  ViewVC Help
Powered by ViewVC 1.1.2