Adding tables and initial data for the plugin.
* version from this plugin.
*/
define('GLM_MEMBERS_CONDITIONS_PLUGIN_VERSION', '0.0.7');
-// define('GLM_MEMBERS_CONDITIONS_PLUGIN_DB_VERSION', '0.0.1');
+define('GLM_MEMBERS_CONDITIONS_PLUGIN_DB_VERSION', '0.0.1');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
define('GLM_MEMBERS_CONDITIONS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.57');
*/
// Add a main menu item
+/*
add_menu_page(
'GLM Conditions', // Page Title
'GLM Conditions', // Menu Title
false, // Icon URL
'4' // Menu Position
);
+ */
add_submenu_page(
- 'glm-members-admin-menu-conditions', // Parent slug
+ 'glm-members-admin-menu-members', // Parent slug
'Conditions', // Page title
'Conditions', // Menu Title
'glm_members_members', // Capability required
function() {$this->controller('conditions');}
);
-add_submenu_page(
- 'glm-members-admin-menu-conditions', // Parent slug
- 'Info', // Page title
- 'Info', // Menu Title
- 'glm_members_members', // Capability required
- 'glm-members-admin-menu-conditions-info', // Menu slug
- function() {$this->controller('info');}
-);
* }
* );
*
- */
add_filter('glm-member-db-add-tab-for-members',
function($addOnTabs) {
return $addOnTabs;
}
);
+ */
--- /dev/null
+-- Gaslight Media Members Database - Conditions
+-- File Created: 12/02/15 15:27:15
+-- Database Version: 0.0.1
+-- Database Creation Script
+--
+-- This file is called to create a new set of tables for this
+-- add-on for the most receint database version for this add-on.
+--
+-- There should only be one such file in this directory
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+
+-- Conditions Table
+CREATE TABLE {prefix}conditions (
+ id INT NOT NULL AUTO_INCREMENT,
+ name TEXT NOT NULL,
+ descr_short TEXT NULL,
+ descr TEXT NULL,
+ last_update DATE NULL,
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Current Conditions Table
+CREATE TABLE {prefix}current_condition (
+ id INT NOT NULL AUTO_INCREMENT,
+ cond_id INT NOT NULL,
+ special TEXT NULL,
+ last_update DATE NULL,
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Conditions default entries in table
+INSERT INTO {prefix}conditions ( id, name, last_update ) VALUES
+( 1, 'All Clear, Have a Pleasant Trip!', NOW() ),
+( 2, 'High Wind Warning', NOW() ),
+( 3, 'Wind Escort', NOW() ),
+( 4, 'Partial Bridge Closure', NOW() ),
+( 5, 'Bridge Closed - High Winds', NOW() ),
+( 6, 'Bridge Closed - General', NOW() ),
+( 7, 'Bridge Closed - Weather', NOW() ),
+( 8, 'Falling Ice Warning', NOW() ),
+( 9, 'Bridge Closed - Falling Ice', NOW() ),
+( 10, 'Fog Warning', NOW() ),
+( 11, 'Blowing Snow Warning', NOW() ),
+( 12, 'Special Condition', NOW() )
+;
+
+----
+
+INSERT INTO {prefix}current_condition ( id, cond_id, last_update ) VALUES ( 1, 1, NOW() );
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * GLM Members Conditions DB Versions
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release dbVersions.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+
+/**********************************************************************
+ * NOTE: THIS IS A CONDITIONS FILE - DO NOT USE UNMODIFIED
+ *
+ * Please change all references to conditions, Conditions, or CONDITIONS to a name
+ * appropriate for your new Add-On.
+ *
+ * This file lists all versions of the database tables for this add-on.
+ * The last entry in the array below should be for the most recent
+ * version and should match the "create_database_V..." file in this
+ * directory.
+ *
+ * NOTE: When first creating a new add-on with database tables, there
+ * should only be one line in the array below and there should be no
+ * "update_database..." files in this directory.
+ *
+ * Remove this message before using this file in production!
+ **********************************************************************/
+
+
+$glmMembersConditionsDbVersions = array(
+ '0.0.1' => array('version' => '0.0.1', 'tables' => 2, 'date' => '10/10/2016'),
+);
+
+++ /dev/null
--- Gaslight Media Members Database - Conditions
--- File Created: 12/02/15 15:27:15
--- Database Version: 0.0.1
--- Database Creation Script
---
--- This file is called to create a new set of tables for this
--- add-on for the most receint database version for this add-on.
---
--- There should only be one such file in this directory
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashes
-
-
--- **********************************************************************
--- NOTE: THIS IS A CONDITIONS FILE - DO NOT USE UNMODIFIED
---
--- Please change all references to conditions, Conditions, or CONDITIONS to a name
--- appropriate for your new Add-On.
---
--- Tables and queries in this file are conditions only.
---
--- Remove this message before using this file in production!
--- **********************************************************************/
-
-
--- Conditions Table
-CREATE TABLE {prefix}sometablename (
- id INT NOT NULL AUTO_INCREMENT,
- somefield TINYTEXT NULL,
- PRIMARY KEY (id)
-);
-
-----
-
--- Conditions default entry in table
-INSERT INTO {prefix}sometablename
- ( id, somefield )
- VALUES
- ( 1, 'conditions data' )
-;
-
+++ /dev/null
-<?php
-/**
- * Gaslight Media Members Database
- * GLM Members Conditions DB Versions
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package glmMembersDatabase
- * @author Chuck Scott <cscott@gaslightmedia.com>
- * @license http://www.gaslightmedia.com Gaslightmedia
- * @release dbVersions.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
- * @link http://dev.gaslightmedia.com/
- */
-
-
-/**********************************************************************
- * NOTE: THIS IS A CONDITIONS FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to conditions, Conditions, or CONDITIONS to a name
- * appropriate for your new Add-On.
- *
- * This file lists all versions of the database tables for this add-on.
- * The last entry in the array below should be for the most recent
- * version and should match the "create_database_V..." file in this
- * directory.
- *
- * NOTE: When first creating a new add-on with database tables, there
- * should only be one line in the array below and there should be no
- * "update_database..." files in this directory.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
-
-$glmMembersConditionsDbVersions = array(
- '0.0.1' => array('version' => '0.0.1', 'tables' => 1, 'date' => '1/1/2016'),
- '0.0.2' => array('version' => '0.0.2', 'tables' => 2)
-);
-