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

Contents of /contributions/modules/ad_flash/ad_flash.install

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


Revision 1.1 - (show annotations) (download) (as text)
Thu Dec 4 11:03:23 2008 UTC (11 months, 3 weeks ago) by chriscohen
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/x-php
Initial commit of ad_flash module from ad_flash code originally written by mixman and developed by the Drupal community.
1 <?php
2 // $Id: $
3
4 /**
5 * Ad_image module database schema.
6 *
7 *
8 * Based on the ad_image.module by Jeremy Andrews
9 *
10 * Copyright (c) 2007
11 * Fabio Varesano <fvaresano at yahoo dot it> All rights reserved.
12 *
13 * Copyright (c) 2005-2007.
14 * Jeremy Andrews <jeremy@kerneltrap.org>. All rights reserved.
15 */
16
17 function ad_flash_install() {
18 switch ($GLOBALS['db_type']) {
19 case 'mysql':
20 case 'mysqli':
21 default:
22
23 /**
24 * The ad_flash_format table provides format guidelines for a given group
25 * of image ads.
26 */
27 db_query("CREATE TABLE {ad_flash_format} (
28 gid INT(10) UNSIGNED NOT NULL UNIQUE,
29
30 min_width INT(5) UNSIGNED NOT NULL DEFAULT '0',
31 max_width INT(5) UNSIGNED NOT NULL DEFAULT '0',
32 min_height INT(5) UNSIGNED NOT NULL DEFAULT '0',
33 max_height INT(5) UNSIGNED NOT NULL DEFAULT '0',
34
35 PRIMARY KEY (gid)) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
36
37 /**
38 * The ad_flash table stores information about each image ad.
39 */
40 db_query("CREATE TABLE {ad_flash} (
41 aid INT(10) UNSIGNED NOT NULL DEFAULT '0',
42 fid INT(10) UNSIGNED NOT NULL DEFAULT '0',
43
44 url VARCHAR(255) NOT NULL DEFAULT '',
45 width INT UNSIGNED NOT NULL DEFAULT '0',
46 height INT UNSIGNED NOT NULL DEFAULT '0',
47
48 UNIQUE KEY (aid)) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
49
50 }
51
52 drupal_set_message(t('The necessary ad_flash module tables have been created.'));
53 }
54
55 ?>

  ViewVC Help
Powered by ViewVC 1.1.2