From: Chuck Scott Date: Fri, 17 Feb 2017 16:47:19 +0000 (-0500) Subject: Updated database to use SMALLINT instead of TINYINT for bitmapped fields X-Git-Tag: v1.0.0^2~500 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=3f9ed955cc827cd86dd40782ac84531928147bb3;p=WP-Plugins%2Fglm-member-db-registrations.git Updated database to use SMALLINT instead of TINYINT for bitmapped fields Cleaned up Registrations management "General" and "Terms" pages Added registrations management settings and terms to the array when registering the add-on to get the data into config. --- diff --git a/index.php b/index.php index fb1ddb8..25e2ffe 100644 --- a/index.php +++ b/index.php @@ -38,7 +38,7 @@ * version from this plugin. */ define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '0.0.1'); -define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '0.0.1'); +define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '0.0.2'); // This is the minimum version of the GLM Members DB plugin require for this plugin. define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.8.0'); @@ -143,10 +143,11 @@ if (is_file(GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_SCRIPTS.'/dbVersions.php')) { } // Load Add-On Management Settings data -/* None - Need to figure out a smooth way to do this. $glmMembersRegistrationsManagementSettings = $wpdb->get_row( "SELECT * FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."management WHERE id = 1", ARRAY_A ); unset($glmMembersRegistrationsManagementSettings['id']); -*/ +$glmMembersRegistrationsManagementTerms = $wpdb->get_row( "SELECT * FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."settings_terms WHERE id = 1", ARRAY_A ); +unset($glmMembersRegistrationsManagementTerms['id']); + function glmMembersRegistrationsRegisterAddOn($addOns) { @@ -158,6 +159,8 @@ function glmMembersRegistrationsRegisterAddOn($addOns) { 'slug' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, 'actions' => $GLOBALS['glmMembersRegistrationsAddOnValidActions'], 'config' => array( + 'settings' => $GLOBALS['glmMembersRegistrationsManagementSettings'], + 'terms' => $GLOBALS['glmMembersRegistrationsManagementTerms'] ), 'shortcodes' => $GLOBALS['glmMembersRegistrationsShortcodes'], 'shortcodesDescription' => $GLOBALS['glmMembersRegistrationsShortcodesDescription'] diff --git a/misc/documentation/DevelopmentOutline.txt b/misc/documentation/DevelopmentOutline.txt index 41a7fef..7390476 100644 --- a/misc/documentation/DevelopmentOutline.txt +++ b/misc/documentation/DevelopmentOutline.txt @@ -9,7 +9,7 @@ ADMIN * Management Chuck - - Recall and update of management data + DONE - Recall and update of management data - Access by Managers only * Misc diff --git a/setup/databaseScripts/create_database_V0.0.1.sql b/setup/databaseScripts/create_database_V0.0.1.sql index 83308b8..ff21806 100644 --- a/setup/databaseScripts/create_database_V0.0.1.sql +++ b/setup/databaseScripts/create_database_V0.0.1.sql @@ -84,8 +84,8 @@ CREATE TABLE {prefix}management ( reg_org_toll_free TINYTEXT NULL, reg_org_internal_email TINYTEXT NULL, reg_org_from_email TINYTEXT NULL, - reg_payment_methods TINYINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini - reg_proc_methods TINYINT NULL, -- Payment processing methods available - Bitmap - see proc_method in plugin.ini + reg_payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini + reg_proc_methods SMALLINT NULL, -- Payment processing methods available - Bitmap - see proc_method in plugin.ini reg_cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini -- Authorize.net Credentials reg_authorize_net_login TINYTEXT NULL, @@ -99,12 +99,12 @@ CREATE TABLE {prefix}management ( reg_merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini -- Billing settings reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings - reg_bill_info_req_no_charge TINYINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf - reg_bill_info_req_comp_code TINYINT NULL, - reg_bill_info_req_cash TINYINT NULL, - reg_bill_info_req_check TINYINT NULL, - reg_bill_info_req_credit_card TINYINT NULL, - reg_bill_info_req_merchant_call TINYINT NULL, + reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf + reg_bill_info_req_comp_code SMALLINT NULL, + reg_bill_info_req_cash SMALLINT NULL, + reg_bill_info_req_check SMALLINT NULL, + reg_bill_info_req_credit_card SMALLINT NULL, + reg_bill_info_req_merchant_call SMALLINT NULL, -- Misc Options reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event PRIMARY KEY (id) @@ -309,9 +309,9 @@ CREATE TABLE {prefix}reg_event ( attendee_max MEDIUMINT NULL, -- Attendee limit - 0 = unlimited attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited attendee_count MEDIUMINT NULL, -- Last calculated attendee count - registration_account_options TINYINT NULL, -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini - payment_methods TINYINT NULL, -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini - restricted_payment_methods TINYINT NULL, -- Bitmap of restricted (admin use only) payment methods for this event - see payment_method + registration_account_options SMALLINT NULL, -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini + payment_methods SMALLINT NULL, -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini + restricted_payment_methods SMALLINT NULL, -- Bitmap of restricted (admin use only) payment methods for this event - see payment_method terms TEXT NULL, -- Terms and Conditions for registration reg_file TINYTEXT NULL, -- Name of a downloadable file reg_file_title TINYTEXT NULL, -- Title for downloadable file diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index 2633011..aa7f7a2 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -14,7 +14,8 @@ */ $glmMembersRegistrationsDbVersions = array( - '0.0.1' => array('version' => '0.0.1', 'tables' => 18, 'date' => '02/6/2017') + '0.0.1' => array('version' => '0.0.1', 'tables' => 18, 'date' => '02/6/2017'), + '0.0.2' => array('version' => '0.0.2', 'tables' => 18, 'date' => '02/17/2017') ); diff --git a/setup/databaseScripts/update_database_V0.0.2.sql b/setup/databaseScripts/update_database_V0.0.2.sql new file mode 100644 index 0000000..acd8025 --- /dev/null +++ b/setup/databaseScripts/update_database_V0.0.2.sql @@ -0,0 +1,67 @@ +-- Gaslight Media Members Database - Events Add-On +-- File Created: 12/09/14 15:27:15 +-- Database Version: 0.0.9 +-- Database Update From Previous Version Script +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashses + + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_payment_methods SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_proc_methods SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_cc_accepts SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_bill_info_req_no_charge SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_bill_info_req_comp_code SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_bill_info_req_cash SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_bill_info_req_check SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_bill_info_req_credit_card SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}management MODIFY reg_bill_info_req_merchant_call SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}reg_event MODIFY registration_account_options SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}reg_event MODIFY payment_methods SMALLINT; + +---- + +-- Change size of integer for bitmapped field. +ALTER TABLE {prefix}reg_event MODIFY restricted_payment_methods SMALLINT; + diff --git a/views/admin/management/registrations.html b/views/admin/management/registrations.html index 5ae6b5c..82f38b7 100644 --- a/views/admin/management/registrations.html +++ b/views/admin/management/registrations.html @@ -19,7 +19,7 @@ {if $settingsUpdated}

Settings Updated

{/if} {if $settingsUpdateError}Settings Update Error{/if} -

Registrations General Settings

+

{$terms.reg_term_registrations_name} General Settings

@@ -31,7 +31,7 @@ - +
Event Registration Page Permalink Name:{$terms.reg_term_registrations_name} Page Permalink Name:
Use only the page name at the end of the permalink for the member detail page. diff --git a/views/admin/management/regterms.html b/views/admin/management/regterms.html index 46ac7cb..76cea48 100644 --- a/views/admin/management/regterms.html +++ b/views/admin/management/regterms.html @@ -15,7 +15,7 @@ -

Registrations Terms

+

{$terms.reg_term_registrations_name} Terms and Phrases

@@ -23,10 +23,13 @@ - - - - + + + + - - - - - - - - -

Admin Menu and Tab Names

Application Title: + + {if $termSettings.fieldFail.reg_term_registrations_name}

{$termSettings.fieldFail.reg_term_registrations_name}

{/if} +
Registration: @@ -37,15 +40,6 @@ {if $termSettings.fieldFail.reg_term_registration}

{$termSettings.fieldFail.reg_term_registration}

{/if}
Registrations Name: - - {if $termSettings.fieldFail.reg_term_registrations_name}

{$termSettings.fieldFail.reg_term_registrations_name}

{/if} -
Capitalized: @@ -58,8 +52,6 @@ {if $termSettings.fieldFail.reg_term_registration_plur}

{$termSettings.fieldFail.reg_term_registration_plur}

{/if}
Plural Capitalized @@ -70,7 +62,6 @@
Register: @@ -80,8 +71,6 @@ {if $termSettings.fieldFail.reg_term_register}

{$termSettings.fieldFail.reg_term_register}

{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
Capitalized: @@ -94,8 +83,6 @@ {if $termSettings.fieldFail.reg_term_registers}

{$termSettings.fieldFail.reg_term_registers}

{/if}
Registering: @@ -108,8 +95,6 @@ {if $termSettings.fieldFail.reg_term_registering_cap}

{$termSettings.fieldFail.reg_term_registering_cap}

{/if}
Registered: @@ -137,8 +122,6 @@ {if $termSettings.fieldFail.reg_term_attendee}

{$termSettings.fieldFail.reg_term_attendee}

{/if}
Capitalized: @@ -151,8 +134,6 @@ {if $termSettings.fieldFail.reg_term_attendee_plur}

{$termSettings.fieldFail.reg_term_attendee_plur}

{/if}
Plural Capitalized: @@ -165,8 +146,6 @@ {if $termSettings.fieldFail.reg_term_attending}

{$termSettings.fieldFail.reg_term_attending}

{/if}
Attended: @@ -186,8 +165,6 @@ {if $termSettings.fieldFail.reg_term_registered_user}

{$termSettings.fieldFail.reg_term_registered_user}

{/if}
Capitalized: @@ -200,8 +177,6 @@ {if $termSettings.fieldFail.reg_term_registered_user_plur}

{$termSettings.fieldFail.reg_term_registered_user_plur}

{/if}
Plural Capitalized: @@ -223,8 +198,6 @@ {if $termSettings.fieldFail.reg_term_id}

{$termSettings.fieldFail.reg_term_id}

{/if}
Capitalized: @@ -237,8 +210,6 @@ {if $termSettings.fieldFail.reg_term_id_plur}

{$termSettings.fieldFail.reg_term_id_plur}

{/if}
Plural Capitalized: @@ -258,8 +229,6 @@ {if $termSettings.fieldFail.reg_term_password}

{$termSettings.fieldFail.reg_term_password}

{/if}
Capitalized: @@ -272,8 +241,6 @@ {if $termSettings.fieldFail.reg_term_password_plur}

{$termSettings.fieldFail.reg_term_password_plur}

{/if}
Plural Capitalized: @@ -293,8 +260,6 @@ {if $termSettings.fieldFail.reg_term_instructor}

{$termSettings.fieldFail.reg_term_instructor}

{/if}
Capitalized: @@ -307,8 +272,6 @@ {if $termSettings.fieldFail.reg_term_instructor_plur}

{$termSettings.fieldFail.reg_term_instructor_plur}

{/if}
Plural Capitalized: @@ -328,8 +291,6 @@ {if $termSettings.fieldFail.reg_term_payment_code}

{$termSettings.fieldFail.reg_term_payment_code}

{/if}
Capitalized: @@ -342,8 +303,6 @@ {if $termSettings.fieldFail.reg_term_payment_code_plur}

{$termSettings.fieldFail.reg_term_payment_code_plur}

{/if}
Plural Capitalized: @@ -354,17 +313,10 @@
Contact: - - - - - -
Contact Information - - {if $termSettings.fieldFail.reg_term_contact_information}

{$termSettings.fieldFail.reg_term_contact_information}

{/if} -
+
Contact Information + + {if $termSettings.fieldFail.reg_term_contact_information}

{$termSettings.fieldFail.reg_term_contact_information}

{/if}