Changed Live Cam to include the ability to use it as an off-site link to a Webcam...
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 20 Sep 2016 20:25:17 +0000 (16:25 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 20 Sep 2016 20:25:17 +0000 (16:25 -0400)
22 files changed:
classes/data/settings/dataSettingsTerms.php
config/plugin.ini
index.php
models/front/members/detail.php
setup/databaseScripts/create_database_V1.1.18.sql [deleted file]
setup/databaseScripts/create_database_V1.1.19.sql [new file with mode: 0644]
setup/databaseScripts/dbVersions.php
setup/databaseScripts/drop_database_V1.1.18.sql [deleted file]
setup/databaseScripts/drop_database_V1.1.19.sql [new file with mode: 0644]
setup/databaseScripts/update_database_V1.1.19.sql [new file with mode: 0644]
views/admin/management/terms.html
views/admin/member/memberInfo.html
views/admin/member/memberInfo/editCamera.html [new file with mode: 0644]
views/admin/member/memberInfo/editCategory.html [new file with mode: 0644]
views/admin/member/memberInfo/editContact.html [new file with mode: 0644]
views/admin/member/memberInfo/editCreditCards.html [new file with mode: 0644]
views/admin/member/memberInfo/editImages.html [new file with mode: 0644]
views/admin/member/memberInfo/editLocation.html [new file with mode: 0644]
views/admin/member/memberInfo/editStatus.html [new file with mode: 0644]
views/admin/member/memberInfo/editVideo.html [new file with mode: 0644]
views/front/members/detail.html
views/front/members/list.html

index d379f96..6445123 100644 (file)
@@ -433,6 +433,13 @@ class GlmDataSettingsTerms extends GlmDataAbstract
                         'field' => 'term_contact_plur_cap',
                         'type' => 'text',
                         'use' => 'a'
+                ),
+
+                // Live Camera Cap
+                'term_webcam_cap' => array(
+                        'field' => 'term_webcam_cap',
+                        'type' => 'text',
+                        'use' => 'a'
                 )
 
 
index 24dec22..df74ff4 100644 (file)
@@ -323,8 +323,10 @@ video_type_numb['Vimeo'] = 2
 ;video_type_numb['Ogg'] = 23
 
 ; Live Cam Types
-live_cam_type[1] = 'Image'
-;live_cam_type[2] = 'Stream'
+live_cam_type[1] = 'Web Page'
+live_cam_type[2] = 'Camera Image'
+;live_cam_type[3] = 'Video Stream'
 
-live_cam_type_numb['Image'] = 1
-;live_cam_type_numb['Stream'] = 2
+live_cam_type_numb['Web Page'] = 1
+live_cam_type_numb['Camera Image'] = 2
+;live_cam_type_numb['Video Stream'] = 3
index 37a7877..0b1c626 100644 (file)
--- a/index.php
+++ b/index.php
@@ -39,7 +39,7 @@
  */
 
 define('GLM_MEMBERS_PLUGIN_VERSION', '2.5.6');
-define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.18');
+define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.19');
 
 // Check if plugin version is not current in WordPress option and if needed updated it
 if (GLM_MEMBERS_PLUGIN_VERSION != get_option('glmMembersDatabasePluginVersion')) {
index 1cd7eb0..a1624dd 100644 (file)
@@ -315,22 +315,7 @@ class GlmMembersFront_members_detail extends GlmDataMemberInfo
             } else {
                 $memberData['video_embed'] = "Could not find video";
             }
-            
-            // Create embed code for the live cam feed. Image or video based on selected type
-            $liveCamType = $memberData['live_cam_type']['name'];
-            $liveCamUrl = $memberData['live_cam_url'];
-            if (!preg_match("~^(?:f|ht)tps?://~i", $liveCamUrl)) {
-                $liveCamUrl = "http://" . $liveCamUrl;
-            }
-            if ($liveCamType == 'Image') {
-                $liveCamEmbed = '<img width="auto" max-height="315" src="'.$liveCamUrl.'">';
-            } else if ($liveCamType == 'Stream') {
-                $liveCamEmbed = '<img width="auto" height="315" src="'.$liveCamUrl.'">';
-            } else {
-                $liveCamEmbed = "Nope";
-            }
-            $memberData['live_cam_embed'] = $liveCamEmbed;
-            
+
 
         }
 
diff --git a/setup/databaseScripts/create_database_V1.1.18.sql b/setup/databaseScripts/create_database_V1.1.18.sql
deleted file mode 100644 (file)
index cc17b94..0000000
+++ /dev/null
@@ -1,554 +0,0 @@
--- Gaslight Media Members Database
--- File Created: 12/09/14 15:27:15
--- Database Version: 1.1.18
--- Database Creation Script
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashes
---
--- **** BE SURE TO ALSO UPDATE drop_database_Vxxx.sql FILE WHEN CHANGING TABLES ****
---
-
--- Amenities
-CREATE TABLE {prefix}amenities (
-  id INT NOT NULL AUTO_INCREMENT,
-  active TINYINT(1) NULL,                   -- Amenity is active flag
-  name TINYTEXT NULL,                       -- Name of amenity
-  descr TEXT NULL,                          -- Description of amenity
-  short_descr TINYTEXT NULL,                -- Short description of amenity
-  ref_type INT NULL,                        -- Type of entity these amenities are associated with - see plugin.ini ref_type tables
-  uses_value BOOLEAN NULL,                  -- Flag indicating whether the amenity requires a quantity number
-  PRIMARY KEY (id),
-  INDEX(name(20))
-);
-
-----
-
--- Amenity Reference - Links a specific amenity to a specific entity of type ref_type
-CREATE TABLE {prefix}amenity_ref (
-  id INT NOT NULL AUTO_INCREMENT,
-  amenity INT NULL,                         -- Pointer to amenity in amenities table
-  ref_type INT NULL,                        -- Copy of ref_type from matching amenities table entry - to simplify searches
-  ref_dest INT NULL,                        -- Pointer to the specific entity of type ref_type
-  amenity_value TINYTEXT NULL,              -- Quantity if amenity uses values
-  PRIMARY KEY (id),
-  INDEX(ref_type),
-  INDEX(ref_dest)
-);
-
-----
-
--- groups
-CREATE TABLE {prefix}amenity_groups (
-    id INT NOT NULL AUTO_INCREMENT,
-    name TINYTEXT NULL,                     -- Name of the Group
-    PRIMARY KEY (id),
-    INDEX(name(20))
-);
-
-----
-
--- Amenity Group - Links a specific amenity to groups
-CREATE TABLE {prefix}grouped_amenities (
-    id INT NOT NULL AUTO_INCREMENT,
-    group_id INT,                              -- Pointer to the group
-    amenity_id INT,                            -- Pointer to the Amenity
-    searchable BOOLEAN DEFAULT '0',         -- Flag indicating whether the amenity group will show in the search form
-    PRIMARY KEY (id)
-);
-
-----
-
--- Member Cateogries - used with member information records
-CREATE TABLE {prefix}categories (
-  id INT NOT NULL AUTO_INCREMENT,
-  name TINYTEXT NULL,                       -- Name of this category
-  descr TEXT NULL,                          -- Description of this category
-  short_descr TINYTEXT NULL,                -- Short description of this category
-  parent INT NULL,                          -- Pointer to parent category in this table - if there is one
-  PRIMARY KEY (id)
-);
-
-----
-
--- Mapping of categories to specific member information records
-CREATE TABLE {prefix}category_member_info (
-  id INT NOT NULL AUTO_INCREMENT,
-  category INT NULL,                        -- Pointer to category in categories table
-  member_info INT NULL,                     -- Pointer to member information record
-  PRIMARY KEY (id),
-  CONSTRAINT {prefix}categories_fk_1
-    FOREIGN KEY (category)
-    REFERENCES {prefix}categories (id)
-    ON DELETE CASCADE,
-  INDEX(category),
-  INDEX(member_info)
-);
-
-----
-
--- Cities
-CREATE TABLE {prefix}cities (
-  id INT NOT NULL AUTO_INCREMENT,
-  name TINYTEXT NULL,                       -- Name of city
-  PRIMARY KEY (id)
-);
-
-----
-
--- Member Click Through Stats Data - Totals of URL click-throughs - Preserved for 2 years
-CREATE TABLE {prefix}clickthrough_stats (
-  member INT NULL,                          -- ID of member
-  stat_type INT NULL,                       -- Type of stat 1 = day, 2 = week, 3 = month
-  stat_date DATE NULL,                      -- Date for which these stats are accumulated (date or first date of week or month)
-  clicks INT NULL,                          -- Number of Clicks
-  PRIMARY KEY (member, stat_type, stat_date),
-  INDEX (member),
-  INDEX (stat_type),
-  INDEX (stat_date)
-);
-
-----
-
--- Files - Files are stored under /wp-content/uploads/glm-member-db/files/
-CREATE TABLE {prefix}files (
-  id INT NOT NULL AUTO_INCREMENT,
-  name TINYTEXT NULL,                       -- Original name of the file - might be URL if copied via HTTP
-  status TINYINT(1) NULL,                   -- Display/Use status - See plugin.ini status table
-  file_name TINYTEXT NULL,                  -- Stored file name for the file
-  descr TEXT NULL,                          -- Description
-  position INT NULL,                        -- Numeric position for sequence of display
-  ref_type INT NULL,                        -- Type of entity this image is associated with
-  ref_dest INT NULL,                        -- Pointer to the specific entity of ref_type this image is associated with
-  PRIMARY KEY (id),
-  INDEX(name(20)),
-  INDEX(file_name(20)),
-  INDEX(ref_type),
-  INDEX(ref_dest)
-);
-
-----
-
--- Images - Images are stored under /wp-content/uploads/glm-member-db/images/{size}/
-CREATE TABLE {prefix}images (
-  id INT NOT NULL AUTO_INCREMENT,
-  name TINYTEXT NULL,                       -- Original name of the image - might be URL if copied via HTTP
-  status TINYINT(1) NULL,                   -- Display/Use status - See plugin.ini status table
-  selected BOOLEAN NULL,                    -- A single special image in the current gallery for this entity
-  featured BOOLEAN null,                    -- Image is a member of a group of featured images
-  file_name TINYTEXT NULL,                  -- Stored file name for the image
-  descr TEXT NULL,                          -- Description
-  caption TINYTEXT NULL,                    -- Caption for the image
-  position INT NULL,                        -- Numeric position for sequence of display
-  ref_type INT NULL,                        -- Type of entity this image is associated with
-  ref_dest INT NULL,                        -- Pointer to the specific entity of ref_type this image is associated with
-  PRIMARY KEY (id),
-  INDEX(name(20)),
-  INDEX(file_name(20)),
-  INDEX(ref_type),
-  INDEX(ref_dest)
-);
-
-----
-
--- Primary member records - One for each member
-CREATE TABLE {prefix}members (
-  id INT NOT NULL AUTO_INCREMENT,
-  access INT NULL,                          -- Access type - See access table in plugin.ini
-  member_type INT NULL,                     -- Pointer to member type in member_type table
-  created DATE NULL,                        -- Date member record was created
-  name TINYTEXT NULL,                       -- Member name
-  member_slug TINYTEXT NULL,                -- Member name slug for canonical URLs (lowercase, "-" for spaces, no punctuation)
-  notes TEXT NULL,                          -- General notes - Not displayed in front-end
-  old_member_id INT NULL,                   -- Old member ID if imported from old database
-  featured BOOLEAN DEFAULT '0',             -- Whether the member is featured
-  PRIMARY KEY (id),
-  INDEX(name(20)),
-  INDEX(member_slug(20)),
-  INDEX(created)
-);
-
-----
-
--- Member Detail Display Stats Data - Totals of times detail page is displayed - Preserved for 2 years
-CREATE TABLE {prefix}member_detail_stats (
-  member INT NULL,                          -- ID of member
-  stat_type INT NULL,                       -- Type of stat 1 = day, 2 = week, 3 = month
-  stat_date DATE NULL,                      -- Date for which these stats are accumulated (date or first date of week or month)
-  clicks INT NULL,                          -- Number of Clicks
-  PRIMARY KEY (member, stat_type, stat_date),
-  INDEX (member),
-  INDEX (stat_type),
-  INDEX (stat_date)
-);
-
-----
-
--- Member information version record - May be multiples per member - Only one with status "Active" for a distinct date range
-CREATE TABLE {prefix}member_info (
-  id INT NOT NULL AUTO_INCREMENT,
-  member INT NULL,                          -- Pointer to member record in table members
-  member_name TINYTEXT NULL,                -- Copy of member name from members table entry for fast reference
-  status INT NULL,                          -- Status of this member information record - See plugin.ini status table
-  reference_name TINYTEXT NULL,             -- Reference name for this member information record - Not displayed on front-end
-  descr TEXT NULL,                          -- Description
-  short_descr TEXT NULL,                    -- Short description
-  addr1 TINYTEXT NULL,                      -- Main member location address line 1
-  addr2 TINYTEXT NULL,                      -- Address line 2
-  city INT NULL,                            -- Pointer to City in cities table
-  state TINYTEXT NULL,                      -- Two character state code - matches states.ini entries
-  country TINYTEXT NULL,                    -- Two character country code - matches countries.ini entries
-  zip TINYTEXT NULL,                        -- ZIP/Postal code
-  lat FLOAT NULL,                           -- Latitude of member's location
-  lon FLOAT NULL,                           -- Longitude of member's location
-  region INT NULL,                          -- Pointer to entry in regions table
-  phone TINYTEXT NULL,                      -- Primary phone number
-  toll_free TINYTEXT NULL,                  -- Toll Free phone number
-  url TINYTEXT NULL,                        -- URL with information about this member
-  email TINYTEXT NULL,                      -- Main E-Mail address for this member
-  logo TINYTEXT NULL,                       -- Member logo
-  cc_type INT NULL,                         -- Bitmap of credit card types accepted - See credit_card array in plugin.ini
-  video_url TINYTEXT NULL,                  -- Video URL
-  video_file TINYTEXT NULL,                 -- Video File Name
-  video_title TINYTEXT NULL,                -- Video Title
-  video_descr TEXT NULL,                    -- Video Description
-  video_type INT NULL,                      -- Video Type - See plugin.ini video type table.
-  live_cam_url TINYTEXT NULL,               -- Live Cam URL
-  live_cam_title TINYTEXT NULL,             -- Live Cam Title
-  live_cam_descr TEXT NULL,                 -- Live Cam Description
-  live_cam_type INT NULL,                   -- Live Cam Type - See plugin.ini video type table.
-  notes TEXT NULL,                          -- General notes - Not displayed in front-end
-  create_time TIMESTAMP NULL,               -- Create date/time
-  modify_time TIMESTAMP NULL,               -- Last update date/time
-  PRIMARY KEY (id),
-  INDEX(status),
-  INDEX(city),
-  INDEX(zip(10)),
-  INDEX(lat),
-  INDEX(lon),
-  INDEX(region)
-);
-
-----
-
--- Member type - Can be used to assign members to different "classes" of membership (i.e. Full, Associate, Premium)
--- Mostly for internal use by the member organization, but could be displayed - Consider a short_description if they are.
-CREATE TABLE {prefix}member_type (
-  id INT NOT NULL AUTO_INCREMENT,
-  name TINYTEXT NULL,                       -- Name of member type
-  descr TINYTEXT NULL,                      -- Description of member type
-  PRIMARY KEY (id)
-);
-
-----
-
--- Regions - Used to segment members into various geographical regions - can be cities, counties, or other logical regions
-CREATE TABLE {prefix}regions (
-  id INT NOT NULL AUTO_INCREMENT,
-  name TINYTEXT NULL,                       -- Name of region
-  descr TEXT NULL,                          -- Description of region
-  short_descr TINYTEXT NULL,                -- Short description of region
-  PRIMARY KEY (id)
-);
-
-----
-
--- General settings available on Management page in admin - Only 1 entry in this table
--- Items in this table should be all self-explanatory
-CREATE TABLE {prefix}settings_general (
-  id INT NOT NULL AUTO_INCREMENT,
-  admin_debug BOOLEAN DEFAULT '0',
-  admin_debug_verbose BOOLEAN DEFAULT '0',
-  front_debug BOOLEAN DEFAULT '0',
-  front_debug_verbose BOOLEAN DEFAULT '0',
-  google_maps_api_key TINYTEXT DEFAULT '',
-  maps_default_lat FLOAT DEFAULT '45.3749',
-  maps_default_lon FLOAT DEFAULT '-84.9592',
-  maps_default_zoom INTEGER DEFAULT '10',
-  time_zone TINYTEXT DEFAULT NULL,
-  canonical_member_page TINYTEXT DEFAULT NULL,
-  phone_infix TINYTEXT DEFAULT NULL,
-  default_state TINYTEXT DEFAULT NULL,
-  list_show_map BOOLEAN DEFAULT '1',
-  list_show_list BOOLEAN DEFAULT '1',
-  list_show_search_filters_opened BOOLEAN DEFAULT '0',
-  list_show_search BOOLEAN DEFAULT '1',
-  list_show_search_text BOOLEAN DEFAULT '1',
-  list_show_search_category BOOLEAN DEFAULT '1',
-  list_show_search_amenities BOOLEAN DEFAULT '1',
-  list_show_search_alpha BOOLEAN DEFAULT '1',
-  list_floating_search BOOLEAN DEFAULT '0',
-  list_floating_search_distance_top INTEGER DEFAULT '0',    -- How far from the top the sticky Search/Filters box should hover
-  list_show_detail_link BOOLEAN DEFAULT '1',
-  list_show_logo BOOLEAN DEFAULT '1',
-  list_logo_size TINYTEXT NULL,
-  list_show_address BOOLEAN DEFAULT '1',
-  list_show_street BOOLEAN DEFAULT '1',
-  list_show_citystatezip BOOLEAN DEFAULT '1',
-  list_show_country BOOLEAN DEFAULT '1',
-  list_show_region BOOLEAN DEFAULT '1',
-  list_show_descr BOOLEAN DEFAULT '0',
-  list_show_short_descr BOOLEAN DEFAULT '1',
-  list_show_phone BOOLEAN DEFAULT '1',
-  list_show_tollfree BOOLEAN DEFAULT '1',
-  list_show_url BOOLEAN DEFAULT '1',
-  list_show_url_newtarget BOOLEAN DEFAULT '1',
-  list_show_email BOOLEAN DEFAULT '1',
-  list_show_categories BOOLEAN DEFAULT '0',
-  list_show_creditcards BOOLEAN DEFAULT '0',
-  list_show_amenities BOOLEAN DEFAULT '0',
-  list_show_logo_filler BOOLEAN DEFAULT '1',
-  list_map_show_opened BOOLEAN DEFAULT '0',
-  list_map_show_detaillink BOOLEAN DEFAULT '1',
-  list_map_show_logo BOOLEAN DEFAULT '0',
-  list_map_logo_size TINYTEXT NULL,
-  list_map_show_descr BOOLEAN DEFAULT '0',
-  list_map_show_short_descr BOOLEAN DEFAULT '1',
-  list_map_show_address BOOLEAN DEFAULT '1',
-  list_map_show_street BOOLEAN DEFAULT '1',
-  list_map_show_citystatezip BOOLEAN DEFAULT '1',
-  list_map_show_country BOOLEAN DEFAULT '1',
-  list_map_show_region BOOLEAN DEFAULT '1',
-  list_map_show_phone BOOLEAN DEFAULT '1',
-  list_map_show_tollfree BOOLEAN DEFAULT '1',
-  list_map_show_url BOOLEAN DEFAULT '1',
-  list_map_show_url_newtarget BOOLEAN DEFAULT '1',
-  list_map_show_email BOOLEAN DEFAULT '1',
-  list_map_show_categories BOOLEAN DEFAULT '0',
-  list_map_show_creditcards BOOLEAN DEFAULT '0',
-  list_map_show_amenities BOOLEAN DEFAULT '0',
-  list_show_packages BOOLEAN DEFAULT '0',
-  list_show_packages_link BOOLEAN DEFAULT '0',
-  list_header_text TINYTEXT DEFAULT NULL,
-  detail_show_map BOOLEAN DEFAULT '1',
-  detail_show_directions BOOLEAN DEFAULT '1',
-  detail_show_logo BOOLEAN DEFAULT '1',
-  detail_logo_size TINYTEXT NULL,
-  detail_show_descr BOOLEAN DEFAULT '1',
-  detail_show_short_descr BOOLEAN DEFAULT '0',
-  detail_show_address BOOLEAN DEFAULT '1',
-  detail_show_street BOOLEAN DEFAULT '1',
-  detail_show_citystatezip BOOLEAN DEFAULT '1',
-  detail_show_country BOOLEAN DEFAULT '1',
-  detail_show_region BOOLEAN DEFAULT '1',
-  detail_show_phone BOOLEAN DEFAULT '1',
-  detail_show_tollfree BOOLEAN DEFAULT '1',
-  detail_show_url BOOLEAN DEFAULT '1',
-  detail_show_url_newtarget BOOLEAN DEFAULT '1',
-  detail_show_email BOOLEAN DEFAULT '1',
-  detail_show_categories BOOLEAN DEFAULT '0',
-  detail_show_creditcards BOOLEAN DEFAULT '0',
-  detail_show_amenities BOOLEAN DEFAULT '1',
-  detail_show_imagegallery BOOLEAN DEFAULT '1',
-  detail_show_coupons BOOLEAN DEFAULT '0',
-  detail_show_packages BOOLEAN DEFAULT '0',
-  detail_show_events BOOLEAN DEFAULT '0',
-  detail_show_video BOOLEAN DEFAULT '0',
-  detail_show_live_cam BOOLEAN DEFAULT '0',
-  detail_top_offset_autoscroll INTEGER DEFAULT '0', -- Determines the distance from the top when autoscrolling to a section on member detail pages
-  detail_map_show_logo BOOLEAN DEFAULT '0',
-  detail_map_logo_size TINYTEXT NULL,
-  detail_map_show_descr BOOLEAN DEFAULT '0',
-  detail_map_show_short_descr BOOLEAN DEFAULT '1',
-  detail_map_show_address BOOLEAN DEFAULT '1',
-  detail_map_show_street BOOLEAN DEFAULT '1',
-  detail_map_show_citystatezip BOOLEAN DEFAULT '1',
-  detail_map_show_country BOOLEAN DEFAULT '1',
-  detail_map_show_region BOOLEAN DEFAULT '1',
-  detail_map_show_phone BOOLEAN DEFAULT '1',
-  detail_map_show_tollfree BOOLEAN DEFAULT '1',
-  detail_map_show_url BOOLEAN DEFAULT '1',
-  detail_map_show_url_newtarget BOOLEAN DEFAULT '1',
-  detail_map_show_email BOOLEAN DEFAULT '1',
-  detail_map_show_categories BOOLEAN DEFAULT '0',
-  detail_map_show_creditcards BOOLEAN DEFAULT '0',
-  detail_map_show_amenities BOOLEAN DEFAULT '0',
-  members_only_support_email TINYTEXT DEFAULT '',
-  members_only_support_phone TINYTEXT DEFAULT '',
-  PRIMARY KEY (id)
-);
-
-----
-
--- Set default entry
-INSERT INTO {prefix}settings_general
-    ( id, time_zone, canonical_member_page, list_logo_size, list_map_logo_size, detail_logo_size, detail_map_logo_size )
-   VALUES
-    ( 1, 'America/Detroit', 'member-detail', 'large', 'thumb', 'large', 'thumb' )
-;
-
-----
-
--- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
--- Terms in this table should be all self-explanatory
-CREATE TABLE {prefix}settings_terms (
-  id INT NOT NULL AUTO_INCREMENT,
-  term_admin_menu_members TINYTEXT NULL,
-  term_admin_menu_member_list TINYTEXT NULL,
-  term_admin_menu_member TINYTEXT NULL,
-  term_admin_menu_configure TINYTEXT NULL,
-  term_admin_menu_settings TINYTEXT NULL,
-  term_admin_menu_shortcodes TINYTEXT NULL,
-  term_admin_menu_members_dashboard TINYTEXT NULL,
-  term_admin_menu_members_list TINYTEXT NULL,
-  term_admin_menu_members_reports TINYTEXT NULL,
-  term_admin_menu_member_dashboard TINYTEXT NULL,
-  term_admin_menu_member_info TINYTEXT NULL,
-  term_admin_menu_member_locations TINYTEXT NULL,
-  term_admin_menu_member_facilities TINYTEXT NULL,
-  term_admin_menu_member_attractions TINYTEXT NULL,
-  term_admin_menu_member_contacts TINYTEXT NULL,
-  term_admin_menu_configure_member_types TINYTEXT NULL,
-  term_admin_menu_configure_member_cats TINYTEXT NULL,
-  term_admin_menu_configure_accom_types TINYTEXT NULL,
-  term_admin_menu_configure_amenities TINYTEXT NULL,
-  term_admin_menu_configure_cities TINYTEXT NULL,
-  term_admin_menu_configure_regions TINYTEXT NULL,
-  term_admin_menu_settings_general TINYTEXT NULL,
-  term_admin_menu_settings_terms TINYTEXT NULL,
-  term_admin_menu_settings_development TINYTEXT NULL,
-  term_member TINYTEXT NULL,
-  term_member_cap TINYTEXT NULL,
-  term_member_plur TINYTEXT NULL,
-  term_member_plur_cap TINYTEXT NULL,
-  term_location TINYTEXT NULL,
-  term_location_cap TINYTEXT NULL,
-  term_location_plur TINYTEXT NULL,
-  term_location_plur_cap TINYTEXT NULL,
-  term_facility TINYTEXT NULL,
-  term_facility_cap TINYTEXT NULL,
-  term_facility_plur TINYTEXT NULL,
-  term_facility_plur_cap TINYTEXT NULL,
-  term_attraction TINYTEXT NULL,
-  term_attraction_cap TINYTEXT NULL,
-  term_attraction_plur TINYTEXT NULL,
-  term_attraction_plur_cap TINYTEXT NULL,
-  term_contact TINYTEXT NULL,
-  term_contact_cap TINYTEXT NULL,
-  term_contact_plur TINYTEXT NULL,
-  term_contact_plur_cap TINYTEXT NULL,
-  PRIMARY KEY (id)
-);
-
-----
-
--- Default terms entry
-INSERT INTO {prefix}settings_terms
-    (
-    id,
-    term_admin_menu_members,
-    term_admin_menu_member_list,
-    term_admin_menu_member,
-    term_admin_menu_configure,
-    term_admin_menu_settings,
-    term_admin_menu_shortcodes,
-    term_admin_menu_members_dashboard,
-    term_admin_menu_members_list,
-    term_admin_menu_members_reports,
-    term_admin_menu_member_dashboard,
-    term_admin_menu_member_info,
-    term_admin_menu_member_locations,
-    term_admin_menu_member_facilities,
-    term_admin_menu_member_attractions,
-    term_admin_menu_member_contacts,
-    term_admin_menu_configure_member_types,
-    term_admin_menu_configure_member_cats,
-    term_admin_menu_configure_accom_types,
-    term_admin_menu_configure_amenities,
-    term_admin_menu_configure_cities,
-    term_admin_menu_configure_regions,
-    term_admin_menu_settings_general,
-    term_admin_menu_settings_terms,
-    term_admin_menu_settings_development,
-    term_member,
-    term_member_cap,
-    term_member_plur,
-    term_member_plur_cap,
-    term_location,
-    term_location_cap,
-    term_location_plur,
-    term_location_plur_cap,
-    term_facility,
-    term_facility_cap,
-    term_facility_plur,
-    term_facility_plur_cap,
-    term_attraction,
-    term_attraction_cap,
-    term_attraction_plur,
-    term_attraction_plur_cap,
-    term_contact,
-    term_contact_cap,
-    term_contact_plur,
-    term_contact_plur_cap
-    )
-   VALUES
-    (
-    1,
-    'Members',
-    'Member',
-    'Member',
-    'Configure',
-    'Management',
-    'Shortcodes',
-    'Dashboard',
-    'Member List',
-    'Reports',
-    'Member Dashboard',
-    'Member Info',
-    'Locations',
-    'Facilities',
-    'Attractions',
-    'Contacts',
-    'Member Types',
-    'Member Categories',
-    'Accommodation Types',
-    'Amenities',
-    'Cities',
-    'Regions',
-    'General Settings',
-    'Terms & Phrases',
-    'Development',
-    'member',
-    'Member',
-    'members',
-    'Members',
-    'location',
-    'Location',
-    'locations',
-    'Locations',
-    'facility',
-    'Facility',
-    'facilities',
-    'Facilities',
-    'attraction',
-    'Attraction',
-    'attractions',
-    'Attractions',
-    'contact',
-    'Contact',
-    'contacts',
-    'Contacts'
-    )
-;
-
-----
-
--- Theme Settings - Only 1 entry in this table
-CREATE TABLE {prefix}settings_theme (
-    id INT NOT NULL AUTO_INCREMENT,
-    PRIMARY KEY (id)
-);
-
-----
-
--- Default Theme Settings entry
-INSERT INTO {prefix}settings_theme
-    (
-    id
-    )
-   VALUES
-    (
-    1
-    )
-;
-
diff --git a/setup/databaseScripts/create_database_V1.1.19.sql b/setup/databaseScripts/create_database_V1.1.19.sql
new file mode 100644 (file)
index 0000000..86e7d14
--- /dev/null
@@ -0,0 +1,557 @@
+-- Gaslight Media Members Database
+-- File Created: 12/09/14 15:27:15
+-- Database Version: 1.1.18
+-- Database Creation Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+--
+-- **** BE SURE TO ALSO UPDATE drop_database_Vxxx.sql FILE WHEN CHANGING TABLES ****
+--
+
+-- Amenities
+CREATE TABLE {prefix}amenities (
+  id INT NOT NULL AUTO_INCREMENT,
+  active TINYINT(1) NULL,                   -- Amenity is active flag
+  name TINYTEXT NULL,                       -- Name of amenity
+  descr TEXT NULL,                          -- Description of amenity
+  short_descr TINYTEXT NULL,                -- Short description of amenity
+  ref_type INT NULL,                        -- Type of entity these amenities are associated with - see plugin.ini ref_type tables
+  uses_value BOOLEAN NULL,                  -- Flag indicating whether the amenity requires a quantity number
+  PRIMARY KEY (id),
+  INDEX(name(20))
+);
+
+----
+
+-- Amenity Reference - Links a specific amenity to a specific entity of type ref_type
+CREATE TABLE {prefix}amenity_ref (
+  id INT NOT NULL AUTO_INCREMENT,
+  amenity INT NULL,                         -- Pointer to amenity in amenities table
+  ref_type INT NULL,                        -- Copy of ref_type from matching amenities table entry - to simplify searches
+  ref_dest INT NULL,                        -- Pointer to the specific entity of type ref_type
+  amenity_value TINYTEXT NULL,              -- Quantity if amenity uses values
+  PRIMARY KEY (id),
+  INDEX(ref_type),
+  INDEX(ref_dest)
+);
+
+----
+
+-- groups
+CREATE TABLE {prefix}amenity_groups (
+    id INT NOT NULL AUTO_INCREMENT,
+    name TINYTEXT NULL,                     -- Name of the Group
+    PRIMARY KEY (id),
+    INDEX(name(20))
+);
+
+----
+
+-- Amenity Group - Links a specific amenity to groups
+CREATE TABLE {prefix}grouped_amenities (
+    id INT NOT NULL AUTO_INCREMENT,
+    group_id INT,                              -- Pointer to the group
+    amenity_id INT,                            -- Pointer to the Amenity
+    searchable BOOLEAN DEFAULT '0',         -- Flag indicating whether the amenity group will show in the search form
+    PRIMARY KEY (id)
+);
+
+----
+
+-- Member Cateogries - used with member information records
+CREATE TABLE {prefix}categories (
+  id INT NOT NULL AUTO_INCREMENT,
+  name TINYTEXT NULL,                       -- Name of this category
+  descr TEXT NULL,                          -- Description of this category
+  short_descr TINYTEXT NULL,                -- Short description of this category
+  parent INT NULL,                          -- Pointer to parent category in this table - if there is one
+  PRIMARY KEY (id)
+);
+
+----
+
+-- Mapping of categories to specific member information records
+CREATE TABLE {prefix}category_member_info (
+  id INT NOT NULL AUTO_INCREMENT,
+  category INT NULL,                        -- Pointer to category in categories table
+  member_info INT NULL,                     -- Pointer to member information record
+  PRIMARY KEY (id),
+  CONSTRAINT {prefix}categories_fk_1
+    FOREIGN KEY (category)
+    REFERENCES {prefix}categories (id)
+    ON DELETE CASCADE,
+  INDEX(category),
+  INDEX(member_info)
+);
+
+----
+
+-- Cities
+CREATE TABLE {prefix}cities (
+  id INT NOT NULL AUTO_INCREMENT,
+  name TINYTEXT NULL,                       -- Name of city
+  PRIMARY KEY (id)
+);
+
+----
+
+-- Member Click Through Stats Data - Totals of URL click-throughs - Preserved for 2 years
+CREATE TABLE {prefix}clickthrough_stats (
+  member INT NULL,                          -- ID of member
+  stat_type INT NULL,                       -- Type of stat 1 = day, 2 = week, 3 = month
+  stat_date DATE NULL,                      -- Date for which these stats are accumulated (date or first date of week or month)
+  clicks INT NULL,                          -- Number of Clicks
+  PRIMARY KEY (member, stat_type, stat_date),
+  INDEX (member),
+  INDEX (stat_type),
+  INDEX (stat_date)
+);
+
+----
+
+-- Files - Files are stored under /wp-content/uploads/glm-member-db/files/
+CREATE TABLE {prefix}files (
+  id INT NOT NULL AUTO_INCREMENT,
+  name TINYTEXT NULL,                       -- Original name of the file - might be URL if copied via HTTP
+  status TINYINT(1) NULL,                   -- Display/Use status - See plugin.ini status table
+  file_name TINYTEXT NULL,                  -- Stored file name for the file
+  descr TEXT NULL,                          -- Description
+  position INT NULL,                        -- Numeric position for sequence of display
+  ref_type INT NULL,                        -- Type of entity this image is associated with
+  ref_dest INT NULL,                        -- Pointer to the specific entity of ref_type this image is associated with
+  PRIMARY KEY (id),
+  INDEX(name(20)),
+  INDEX(file_name(20)),
+  INDEX(ref_type),
+  INDEX(ref_dest)
+);
+
+----
+
+-- Images - Images are stored under /wp-content/uploads/glm-member-db/images/{size}/
+CREATE TABLE {prefix}images (
+  id INT NOT NULL AUTO_INCREMENT,
+  name TINYTEXT NULL,                       -- Original name of the image - might be URL if copied via HTTP
+  status TINYINT(1) NULL,                   -- Display/Use status - See plugin.ini status table
+  selected BOOLEAN NULL,                    -- A single special image in the current gallery for this entity
+  featured BOOLEAN null,                    -- Image is a member of a group of featured images
+  file_name TINYTEXT NULL,                  -- Stored file name for the image
+  descr TEXT NULL,                          -- Description
+  caption TINYTEXT NULL,                    -- Caption for the image
+  position INT NULL,                        -- Numeric position for sequence of display
+  ref_type INT NULL,                        -- Type of entity this image is associated with
+  ref_dest INT NULL,                        -- Pointer to the specific entity of ref_type this image is associated with
+  PRIMARY KEY (id),
+  INDEX(name(20)),
+  INDEX(file_name(20)),
+  INDEX(ref_type),
+  INDEX(ref_dest)
+);
+
+----
+
+-- Primary member records - One for each member
+CREATE TABLE {prefix}members (
+  id INT NOT NULL AUTO_INCREMENT,
+  access INT NULL,                          -- Access type - See access table in plugin.ini
+  member_type INT NULL,                     -- Pointer to member type in member_type table
+  created DATE NULL,                        -- Date member record was created
+  name TINYTEXT NULL,                       -- Member name
+  member_slug TINYTEXT NULL,                -- Member name slug for canonical URLs (lowercase, "-" for spaces, no punctuation)
+  notes TEXT NULL,                          -- General notes - Not displayed in front-end
+  old_member_id INT NULL,                   -- Old member ID if imported from old database
+  featured BOOLEAN DEFAULT '0',             -- Whether the member is featured
+  PRIMARY KEY (id),
+  INDEX(name(20)),
+  INDEX(member_slug(20)),
+  INDEX(created)
+);
+
+----
+
+-- Member Detail Display Stats Data - Totals of times detail page is displayed - Preserved for 2 years
+CREATE TABLE {prefix}member_detail_stats (
+  member INT NULL,                          -- ID of member
+  stat_type INT NULL,                       -- Type of stat 1 = day, 2 = week, 3 = month
+  stat_date DATE NULL,                      -- Date for which these stats are accumulated (date or first date of week or month)
+  clicks INT NULL,                          -- Number of Clicks
+  PRIMARY KEY (member, stat_type, stat_date),
+  INDEX (member),
+  INDEX (stat_type),
+  INDEX (stat_date)
+);
+
+----
+
+-- Member information version record - May be multiples per member - Only one with status "Active" for a distinct date range
+CREATE TABLE {prefix}member_info (
+  id INT NOT NULL AUTO_INCREMENT,
+  member INT NULL,                          -- Pointer to member record in table members
+  member_name TINYTEXT NULL,                -- Copy of member name from members table entry for fast reference
+  status INT NULL,                          -- Status of this member information record - See plugin.ini status table
+  reference_name TINYTEXT NULL,             -- Reference name for this member information record - Not displayed on front-end
+  descr TEXT NULL,                          -- Description
+  short_descr TEXT NULL,                    -- Short description
+  addr1 TINYTEXT NULL,                      -- Main member location address line 1
+  addr2 TINYTEXT NULL,                      -- Address line 2
+  city INT NULL,                            -- Pointer to City in cities table
+  state TINYTEXT NULL,                      -- Two character state code - matches states.ini entries
+  country TINYTEXT NULL,                    -- Two character country code - matches countries.ini entries
+  zip TINYTEXT NULL,                        -- ZIP/Postal code
+  lat FLOAT NULL,                           -- Latitude of member's location
+  lon FLOAT NULL,                           -- Longitude of member's location
+  region INT NULL,                          -- Pointer to entry in regions table
+  phone TINYTEXT NULL,                      -- Primary phone number
+  toll_free TINYTEXT NULL,                  -- Toll Free phone number
+  url TINYTEXT NULL,                        -- URL with information about this member
+  email TINYTEXT NULL,                      -- Main E-Mail address for this member
+  logo TINYTEXT NULL,                       -- Member logo
+  cc_type INT NULL,                         -- Bitmap of credit card types accepted - See credit_card array in plugin.ini
+  video_url TINYTEXT NULL,                  -- Video URL
+  video_file TINYTEXT NULL,                 -- Video File Name
+  video_title TINYTEXT NULL,                -- Video Title
+  video_descr TEXT NULL,                    -- Video Description
+  video_type INT NULL,                      -- Video Type - See plugin.ini video type table.
+  live_cam_url TINYTEXT NULL,               -- Live Cam URL
+  live_cam_title TINYTEXT NULL,             -- Live Cam Title
+  live_cam_descr TEXT NULL,                 -- Live Cam Description
+  live_cam_type INT NULL,                   -- Live Cam Type - See plugin.ini video type table.
+  notes TEXT NULL,                          -- General notes - Not displayed in front-end
+  create_time TIMESTAMP NULL,               -- Create date/time
+  modify_time TIMESTAMP NULL,               -- Last update date/time
+  PRIMARY KEY (id),
+  INDEX(status),
+  INDEX(city),
+  INDEX(zip(10)),
+  INDEX(lat),
+  INDEX(lon),
+  INDEX(region)
+);
+
+----
+
+-- Member type - Can be used to assign members to different "classes" of membership (i.e. Full, Associate, Premium)
+-- Mostly for internal use by the member organization, but could be displayed - Consider a short_description if they are.
+CREATE TABLE {prefix}member_type (
+  id INT NOT NULL AUTO_INCREMENT,
+  name TINYTEXT NULL,                       -- Name of member type
+  descr TINYTEXT NULL,                      -- Description of member type
+  PRIMARY KEY (id)
+);
+
+----
+
+-- Regions - Used to segment members into various geographical regions - can be cities, counties, or other logical regions
+CREATE TABLE {prefix}regions (
+  id INT NOT NULL AUTO_INCREMENT,
+  name TINYTEXT NULL,                       -- Name of region
+  descr TEXT NULL,                          -- Description of region
+  short_descr TINYTEXT NULL,                -- Short description of region
+  PRIMARY KEY (id)
+);
+
+----
+
+-- General settings available on Management page in admin - Only 1 entry in this table
+-- Items in this table should be all self-explanatory
+CREATE TABLE {prefix}settings_general (
+  id INT NOT NULL AUTO_INCREMENT,
+  admin_debug BOOLEAN DEFAULT '0',
+  admin_debug_verbose BOOLEAN DEFAULT '0',
+  front_debug BOOLEAN DEFAULT '0',
+  front_debug_verbose BOOLEAN DEFAULT '0',
+  google_maps_api_key TINYTEXT DEFAULT '',
+  maps_default_lat FLOAT DEFAULT '45.3749',
+  maps_default_lon FLOAT DEFAULT '-84.9592',
+  maps_default_zoom INTEGER DEFAULT '10',
+  time_zone TINYTEXT DEFAULT NULL,
+  canonical_member_page TINYTEXT DEFAULT NULL,
+  phone_infix TINYTEXT DEFAULT NULL,
+  default_state TINYTEXT DEFAULT NULL,
+  list_show_map BOOLEAN DEFAULT '1',
+  list_show_list BOOLEAN DEFAULT '1',
+  list_show_search_filters_opened BOOLEAN DEFAULT '0',
+  list_show_search BOOLEAN DEFAULT '1',
+  list_show_search_text BOOLEAN DEFAULT '1',
+  list_show_search_category BOOLEAN DEFAULT '1',
+  list_show_search_amenities BOOLEAN DEFAULT '1',
+  list_show_search_alpha BOOLEAN DEFAULT '1',
+  list_floating_search BOOLEAN DEFAULT '0',
+  list_floating_search_distance_top INTEGER DEFAULT '0',    -- How far from the top the sticky Search/Filters box should hover
+  list_show_detail_link BOOLEAN DEFAULT '1',
+  list_show_logo BOOLEAN DEFAULT '1',
+  list_logo_size TINYTEXT NULL,
+  list_show_address BOOLEAN DEFAULT '1',
+  list_show_street BOOLEAN DEFAULT '1',
+  list_show_citystatezip BOOLEAN DEFAULT '1',
+  list_show_country BOOLEAN DEFAULT '1',
+  list_show_region BOOLEAN DEFAULT '1',
+  list_show_descr BOOLEAN DEFAULT '0',
+  list_show_short_descr BOOLEAN DEFAULT '1',
+  list_show_phone BOOLEAN DEFAULT '1',
+  list_show_tollfree BOOLEAN DEFAULT '1',
+  list_show_url BOOLEAN DEFAULT '1',
+  list_show_url_newtarget BOOLEAN DEFAULT '1',
+  list_show_email BOOLEAN DEFAULT '1',
+  list_show_categories BOOLEAN DEFAULT '0',
+  list_show_creditcards BOOLEAN DEFAULT '0',
+  list_show_amenities BOOLEAN DEFAULT '0',
+  list_show_logo_filler BOOLEAN DEFAULT '1',
+  list_map_show_opened BOOLEAN DEFAULT '0',
+  list_map_show_detaillink BOOLEAN DEFAULT '1',
+  list_map_show_logo BOOLEAN DEFAULT '0',
+  list_map_logo_size TINYTEXT NULL,
+  list_map_show_descr BOOLEAN DEFAULT '0',
+  list_map_show_short_descr BOOLEAN DEFAULT '1',
+  list_map_show_address BOOLEAN DEFAULT '1',
+  list_map_show_street BOOLEAN DEFAULT '1',
+  list_map_show_citystatezip BOOLEAN DEFAULT '1',
+  list_map_show_country BOOLEAN DEFAULT '1',
+  list_map_show_region BOOLEAN DEFAULT '1',
+  list_map_show_phone BOOLEAN DEFAULT '1',
+  list_map_show_tollfree BOOLEAN DEFAULT '1',
+  list_map_show_url BOOLEAN DEFAULT '1',
+  list_map_show_url_newtarget BOOLEAN DEFAULT '1',
+  list_map_show_email BOOLEAN DEFAULT '1',
+  list_map_show_categories BOOLEAN DEFAULT '0',
+  list_map_show_creditcards BOOLEAN DEFAULT '0',
+  list_map_show_amenities BOOLEAN DEFAULT '0',
+  list_show_packages BOOLEAN DEFAULT '0',
+  list_show_packages_link BOOLEAN DEFAULT '0',
+  list_header_text TINYTEXT DEFAULT NULL,
+  detail_show_map BOOLEAN DEFAULT '1',
+  detail_show_directions BOOLEAN DEFAULT '1',
+  detail_show_logo BOOLEAN DEFAULT '1',
+  detail_logo_size TINYTEXT NULL,
+  detail_show_descr BOOLEAN DEFAULT '1',
+  detail_show_short_descr BOOLEAN DEFAULT '0',
+  detail_show_address BOOLEAN DEFAULT '1',
+  detail_show_street BOOLEAN DEFAULT '1',
+  detail_show_citystatezip BOOLEAN DEFAULT '1',
+  detail_show_country BOOLEAN DEFAULT '1',
+  detail_show_region BOOLEAN DEFAULT '1',
+  detail_show_phone BOOLEAN DEFAULT '1',
+  detail_show_tollfree BOOLEAN DEFAULT '1',
+  detail_show_url BOOLEAN DEFAULT '1',
+  detail_show_url_newtarget BOOLEAN DEFAULT '1',
+  detail_show_email BOOLEAN DEFAULT '1',
+  detail_show_categories BOOLEAN DEFAULT '0',
+  detail_show_creditcards BOOLEAN DEFAULT '0',
+  detail_show_amenities BOOLEAN DEFAULT '1',
+  detail_show_imagegallery BOOLEAN DEFAULT '1',
+  detail_show_coupons BOOLEAN DEFAULT '0',
+  detail_show_packages BOOLEAN DEFAULT '0',
+  detail_show_events BOOLEAN DEFAULT '0',
+  detail_show_video BOOLEAN DEFAULT '0',
+  detail_show_live_cam BOOLEAN DEFAULT '0',
+  detail_top_offset_autoscroll INTEGER DEFAULT '0', -- Determines the distance from the top when autoscrolling to a section on member detail pages
+  detail_map_show_logo BOOLEAN DEFAULT '0',
+  detail_map_logo_size TINYTEXT NULL,
+  detail_map_show_descr BOOLEAN DEFAULT '0',
+  detail_map_show_short_descr BOOLEAN DEFAULT '1',
+  detail_map_show_address BOOLEAN DEFAULT '1',
+  detail_map_show_street BOOLEAN DEFAULT '1',
+  detail_map_show_citystatezip BOOLEAN DEFAULT '1',
+  detail_map_show_country BOOLEAN DEFAULT '1',
+  detail_map_show_region BOOLEAN DEFAULT '1',
+  detail_map_show_phone BOOLEAN DEFAULT '1',
+  detail_map_show_tollfree BOOLEAN DEFAULT '1',
+  detail_map_show_url BOOLEAN DEFAULT '1',
+  detail_map_show_url_newtarget BOOLEAN DEFAULT '1',
+  detail_map_show_email BOOLEAN DEFAULT '1',
+  detail_map_show_categories BOOLEAN DEFAULT '0',
+  detail_map_show_creditcards BOOLEAN DEFAULT '0',
+  detail_map_show_amenities BOOLEAN DEFAULT '0',
+  members_only_support_email TINYTEXT DEFAULT '',
+  members_only_support_phone TINYTEXT DEFAULT '',
+  PRIMARY KEY (id)
+);
+
+----
+
+-- Set default entry
+INSERT INTO {prefix}settings_general
+    ( id, time_zone, canonical_member_page, list_logo_size, list_map_logo_size, detail_logo_size, detail_map_logo_size )
+   VALUES
+    ( 1, 'America/Detroit', 'member-detail', 'large', 'thumb', 'large', 'thumb' )
+;
+
+----
+
+-- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
+-- Terms in this table should be all self-explanatory
+CREATE TABLE {prefix}settings_terms (
+  id INT NOT NULL AUTO_INCREMENT,
+  term_admin_menu_members TINYTEXT NULL,
+  term_admin_menu_member_list TINYTEXT NULL,
+  term_admin_menu_member TINYTEXT NULL,
+  term_admin_menu_configure TINYTEXT NULL,
+  term_admin_menu_settings TINYTEXT NULL,
+  term_admin_menu_shortcodes TINYTEXT NULL,
+  term_admin_menu_members_dashboard TINYTEXT NULL,
+  term_admin_menu_members_list TINYTEXT NULL,
+  term_admin_menu_members_reports TINYTEXT NULL,
+  term_admin_menu_member_dashboard TINYTEXT NULL,
+  term_admin_menu_member_info TINYTEXT NULL,
+  term_admin_menu_member_locations TINYTEXT NULL,
+  term_admin_menu_member_facilities TINYTEXT NULL,
+  term_admin_menu_member_attractions TINYTEXT NULL,
+  term_admin_menu_member_contacts TINYTEXT NULL,
+  term_admin_menu_configure_member_types TINYTEXT NULL,
+  term_admin_menu_configure_member_cats TINYTEXT NULL,
+  term_admin_menu_configure_accom_types TINYTEXT NULL,
+  term_admin_menu_configure_amenities TINYTEXT NULL,
+  term_admin_menu_configure_cities TINYTEXT NULL,
+  term_admin_menu_configure_regions TINYTEXT NULL,
+  term_admin_menu_settings_general TINYTEXT NULL,
+  term_admin_menu_settings_terms TINYTEXT NULL,
+  term_admin_menu_settings_development TINYTEXT NULL,
+  term_member TINYTEXT NULL,
+  term_member_cap TINYTEXT NULL,
+  term_member_plur TINYTEXT NULL,
+  term_member_plur_cap TINYTEXT NULL,
+  term_location TINYTEXT NULL,
+  term_location_cap TINYTEXT NULL,
+  term_location_plur TINYTEXT NULL,
+  term_location_plur_cap TINYTEXT NULL,
+  term_facility TINYTEXT NULL,
+  term_facility_cap TINYTEXT NULL,
+  term_facility_plur TINYTEXT NULL,
+  term_facility_plur_cap TINYTEXT NULL,
+  term_attraction TINYTEXT NULL,
+  term_attraction_cap TINYTEXT NULL,
+  term_attraction_plur TINYTEXT NULL,
+  term_attraction_plur_cap TINYTEXT NULL,
+  term_contact TINYTEXT NULL,
+  term_contact_cap TINYTEXT NULL,
+  term_contact_plur TINYTEXT NULL,
+  term_contact_plur_cap TINYTEXT NULL,
+  term_webcam_cap TINYTEXT NULL,
+  PRIMARY KEY (id)
+);
+
+----
+
+-- Default terms entry
+INSERT INTO {prefix}settings_terms
+    (
+    id,
+    term_admin_menu_members,
+    term_admin_menu_member_list,
+    term_admin_menu_member,
+    term_admin_menu_configure,
+    term_admin_menu_settings,
+    term_admin_menu_shortcodes,
+    term_admin_menu_members_dashboard,
+    term_admin_menu_members_list,
+    term_admin_menu_members_reports,
+    term_admin_menu_member_dashboard,
+    term_admin_menu_member_info,
+    term_admin_menu_member_locations,
+    term_admin_menu_member_facilities,
+    term_admin_menu_member_attractions,
+    term_admin_menu_member_contacts,
+    term_admin_menu_configure_member_types,
+    term_admin_menu_configure_member_cats,
+    term_admin_menu_configure_accom_types,
+    term_admin_menu_configure_amenities,
+    term_admin_menu_configure_cities,
+    term_admin_menu_configure_regions,
+    term_admin_menu_settings_general,
+    term_admin_menu_settings_terms,
+    term_admin_menu_settings_development,
+    term_member,
+    term_member_cap,
+    term_member_plur,
+    term_member_plur_cap,
+    term_location,
+    term_location_cap,
+    term_location_plur,
+    term_location_plur_cap,
+    term_facility,
+    term_facility_cap,
+    term_facility_plur,
+    term_facility_plur_cap,
+    term_attraction,
+    term_attraction_cap,
+    term_attraction_plur,
+    term_attraction_plur_cap,
+    term_contact,
+    term_contact_cap,
+    term_contact_plur,
+    term_contact_plur_cap,
+    term_webcam_cap
+    )
+   VALUES
+    (
+    1,
+    'Members',
+    'Member',
+    'Member',
+    'Configure',
+    'Management',
+    'Shortcodes',
+    'Dashboard',
+    'Member List',
+    'Reports',
+    'Member Dashboard',
+    'Member Info',
+    'Locations',
+    'Facilities',
+    'Attractions',
+    'Contacts',
+    'Member Types',
+    'Member Categories',
+    'Accommodation Types',
+    'Amenities',
+    'Cities',
+    'Regions',
+    'General Settings',
+    'Terms & Phrases',
+    'Development',
+    'member',
+    'Member',
+    'members',
+    'Members',
+    'location',
+    'Location',
+    'locations',
+    'Locations',
+    'facility',
+    'Facility',
+    'facilities',
+    'Facilities',
+    'attraction',
+    'Attraction',
+    'attractions',
+    'Attractions',
+    'contact',
+    'Contact',
+    'contacts',
+    'Contacts',
+    'Webcam'
+    )
+;
+
+----
+
+-- Theme Settings - Only 1 entry in this table
+CREATE TABLE {prefix}settings_theme (
+    id INT NOT NULL AUTO_INCREMENT,
+    PRIMARY KEY (id)
+);
+
+----
+
+-- Default Theme Settings entry
+INSERT INTO {prefix}settings_theme
+    (
+    id
+    )
+   VALUES
+    (
+    1
+    )
+;
+
index befc21d..d31121a 100644 (file)
@@ -50,6 +50,7 @@ $glmMembersDbVersions = array(
     '1.1.16' => array('version' => '1.1.16', 'tables' => 18, 'date' => '8/22/16'),
     '1.1.17' => array('version' => '1.1.17', 'tables' => 18, 'date' => '8/29/16'),
     '1.1.18' => array('version' => '1.1.18', 'tables' => 18, 'date' => '9/16/16'),
+    '1.1.19' => array('version' => '1.1.19', 'tables' => 18, 'date' => '9/20/16')
 );
 
 
diff --git a/setup/databaseScripts/drop_database_V1.1.18.sql b/setup/databaseScripts/drop_database_V1.1.18.sql
deleted file mode 100644 (file)
index 935890b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
--- Gaslight Media Members Database 
--- File Created: 12/09/14 15:27:15
--- Database Version: 1.1.16
--- Database Deletion Script
--- Note: Tables with DELETE CASCADE must appear before referenced table
-
-DROP TABLE IF EXISTS
-    {prefix}amenities,
-    {prefix}amenity_ref,
-    {prefix}category_member_info,
-    {prefix}cities,
-    {prefix}clickthrough_stats,
-    {prefix}images,
-    {prefix}files,
-    {prefix}members,
-    {prefix}member_detail_stats,
-    {prefix}member_info,
-    {prefix}member_type,
-    {prefix}regions,
-    {prefix}settings_general,
-    {prefix}settings_terms,
-    {prefix}settings_theme,
-    {prefix}categories,
-    {prefix}amenity_groups,
-    {prefix}grouped_amenities
-;
-
diff --git a/setup/databaseScripts/drop_database_V1.1.19.sql b/setup/databaseScripts/drop_database_V1.1.19.sql
new file mode 100644 (file)
index 0000000..935890b
--- /dev/null
@@ -0,0 +1,27 @@
+-- Gaslight Media Members Database 
+-- File Created: 12/09/14 15:27:15
+-- Database Version: 1.1.16
+-- Database Deletion Script
+-- Note: Tables with DELETE CASCADE must appear before referenced table
+
+DROP TABLE IF EXISTS
+    {prefix}amenities,
+    {prefix}amenity_ref,
+    {prefix}category_member_info,
+    {prefix}cities,
+    {prefix}clickthrough_stats,
+    {prefix}images,
+    {prefix}files,
+    {prefix}members,
+    {prefix}member_detail_stats,
+    {prefix}member_info,
+    {prefix}member_type,
+    {prefix}regions,
+    {prefix}settings_general,
+    {prefix}settings_terms,
+    {prefix}settings_theme,
+    {prefix}categories,
+    {prefix}amenity_groups,
+    {prefix}grouped_amenities
+;
+
diff --git a/setup/databaseScripts/update_database_V1.1.19.sql b/setup/databaseScripts/update_database_V1.1.19.sql
new file mode 100644 (file)
index 0000000..4cda599
--- /dev/null
@@ -0,0 +1,14 @@
+-- Gaslight Media Members Database 
+-- File Created: 8/15/16 14:59:42
+-- Database Version: 1.1.18
+-- 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 dashes
+-- Sets which character to use to separate phone numbers
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN term_webcam_cap TINYTEXT NULL;
+
+----
+
+UPDATE TABLE {prefix}settings_terms SET term_webcam_cap = 'Webcam';
\ No newline at end of file
index 01824b7..9e6b67b 100644 (file)
                     </table>
                 </td>
             </tr>
+            <tr>
+                <th>Live Camera:</th>
+                <td>
+                    <table class="glm-admin-table">
+                        <tr>
+                            <th {if $termSettings.fieldRequired.term_webcam_cap}class="glm-required"{/if}>Capitalized:</th>
+                            <td {if $termSettings.fieldFail.term_webcam_cap}class="glm-form-bad-input"{/if}>
+                                <input type="text" name="term_webcam_cap" value="{$termSettings.fieldData.term_webcam_cap}" class="glm-form-text-input-medium">
+                                {if $termSettings.fieldFail.term_webcam_cap}<p>{$termSettings.fieldFail.term_webcam_cap}</p>{/if}
+                            </td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
         </table>
         <input type="submit" value="Update Settings" class="button button-primary">
     </form>
index 18f409c..a2c634d 100644 (file)
             
         <!-- Profile Status & Description -->
         
-        <table id="glm-table-descr" class="glm-admin-table glm-member-info-table">
-            <tr>
-                <th {if $memberInfo.fieldRequired.reference_name}class="glm-required"{/if}>Profile Name:</th>
-                <td {if $memberInfo.fieldFail.reference_name}class="glm-form-bad-input" data-tabid="glm-member-info-descr"{/if}>
-                    <input type="text" name="reference_name" value="{$memberInfo.fieldData.reference_name}" class="glm-form-text-input" placeholder="Name of this {$terms.term_member} profile record for reference only. Not displayed to user.">
-                    {if $memberInfo.fieldFail.reference_name}<p>{$memberInfo.fieldFail.reference_name}</p>{/if}<br>
-                    The "Profile Name" field is used to help identify this particular {$terms.term_member} profile. {$terms.term_member_plur_cap} may have multiple profiles,
-                    only one of which can be active at a time. Multiple profiles make it easy to manage separate sets of information that may be 
-                    used at different times, for example seasons of the year or for special events (i.e. "Winter Profile").  
-                </td>
-            </tr>
-            <tr>
-                <th>Profile Status:</th>
-                <td>
-                    <select name="status">
-        {foreach from=$memberInfo.fieldData.status.list item=v}
-                        <option value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
-        {/foreach}
-                    </select>
-                    {if $memberInfo.fieldFail.status}<p>{$memberInfo.fieldFail.status}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.descr}class="glm-required"{/if}>Description:</th>
-                <td {if $memberInfo.fieldFail.descr}class="glm-form-bad-input" data-tabid="glm-member-info-descr"{/if}>
-                    {php} 
-                        wp_editor('{$memberInfo.fieldData.descr|escape:quotes}', 'glm_descr', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'descr',
-                            'editor_height' => 200,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
-                    {if $memberInfo.fieldFail.descr}<p>{$memberInfo.fieldFail.descr}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.short_descr}class="glm-required"{/if}>Short Description:</th>
-                <td {if $memberInfo.fieldFail.short_descr}class="glm-form-bad-input" data-tabid="glm-member-info-descr"{/if}>
-                    <input type="text" name="short_descr" value="{$memberInfo.fieldData.short_descr}" class="glm-form-text-input glm-char-count" data-msgArea="short-descr-msg" maxlength="120" placeholder="A short, one line, description of the {$terms.term_member}.">
-                    <br><span id="short-descr-msg"></span>
-                    {if $memberInfo.fieldFail.short_descr}<p>{$memberInfo.fieldFail.short_descr}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.notes}class="glm-required"{/if}>Notes:</th>
-            <td
-                {if $memberInfo.fieldFail.notes}class="glm-form-bad-input" data-tabid="glm-member-info-descr"{/if}>
-                <textarea name="notes" class="glm-form-textarea">{$memberInfo.fieldData.notes}</textarea>
-                {if $memberInfo.fieldFail.notes}
-                <p>{$memberInfo.fieldFail.notes}</p>{/if}<br> This
-                "Notes" field is not displayed anywhere else. It is
-                strictly for making and keeping notes related to this
-                {$terms.term_member} profile.
-            </td>
-        </tr>
-        </table>
+        {include file='admin/member/memberInfo/editStatus.html'}
         
         <!-- **** Address and Location **** -->
-        
-        <table id="glm-table-address" class="glm-admin-table glm-hidden glm-member-info-table">
-            <tr>
-                <th {if $memberInfo.fieldRequired.addr1}class="glm-required"{/if}>Address Line 1:</th>
-                <td {if $memberInfo.fieldFail.addr1}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
-                    <input type="text" id="addr1" name="addr1" value="{$memberInfo.fieldData.addr1}" class="glm-form-text-input">
-                    {if $memberInfo.fieldFail.addr1}<p>{$memberInfo.fieldFail.addr1}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.addr2}class="glm-required"{/if}>Address Line 2:</th>
-                <td {if $memberInfo.fieldFail.addr2}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
-                    <input id="addr2" type="text" name="addr2" value="{$memberInfo.fieldData.addr2}" class="glm-form-text-input">
-                    {if $memberInfo.fieldFail.addr2}<p>{$memberInfo.fieldFail.addr2}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th>City</th>
-                <td class="glm-item-container">
-                    <!--  Add new city dialog -->
-                    <div id="newCityButton" class="button button-secondary glm-right">Add a new City</div>
-                    <div id="newCityDialog" class="glm-dialog-box" title="Enter a New City">
-                        <table class="glm-admin-table">
-                            <tr>
-                                <th class="glm-required">City Name:</th>
-                                <td id="newCityNameTD">
-                                    <input id="newCityName" type="text" name="newCityName" class="glm-form-text-input">
-                                    <div id="newCityNameRequired"></div>
-                                </td>
-                            </tr>
-                        </table>
-                        <p><span class="glm-required">*</span> Required</p>
-                        <a id="newCityCancel" class="button button-primary glm-right">Cancel</a>
-                        <input id="newCitySubmit" type="submit" value="Add new City">
-                    </div>
-                    <!-- City Selection -->
-                    <input id="cityName" type="hidden" name="newCityName" value=""><!-- this field is only used if adding a new city to pass the new name -->
-                    <select name="city" id="city">
-                        <option value="0"></option>
-        {foreach from=$memberInfo.fieldData.city.list item=v}
-                        <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
-                            {$v.name}
-                        </option>
-        {/foreach}
-                    </select>
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.state}class="glm-required"{/if}>State:</th>
-                <td {if $memberInfo.fieldFail.state}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
-                    <select id="state" name="state">
-        {foreach from=$memberInfo.fieldData.state.list item=v}
-                        <option value="{$v.value}"{if $settings.default_state == $v.value} selected="selected"{/if}>
-                            {$v.name} {if $settings.default_state == $v.value} (default){/if}
-                        </option>
-        {/foreach}
-                    </select>
-                    {if $memberInfo.fieldFail.state}<p>{$memberInfo.fieldFail.state}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.zip}class="glm-required"{/if}>ZIP / Postal Code:</th>
-                <td {if $memberInfo.fieldFail.zip}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
-                    <input id="zip" type="text" name="zip" value="{$memberInfo.fieldData.zip}" class="glm-form-text-input-short">
-                    {if $memberInfo.fieldFail.zip}<p>{$memberInfo.fieldFail.zip}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.country}class="glm-required"{/if}>Country:</th>
-                <td {if $memberInfo.fieldFail.country}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
-                    <select id="country" name="country">
-        {foreach from=$memberInfo.fieldData.country.list item=v}
-                        <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
-                            {$v.name} {$v.value}
-                        </option>
-        {/foreach}
-                    </select>
-                    {if $memberInfo.fieldFail.country}<p>{$memberInfo.fieldFail.country}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.region}class="glm-required"{/if}>Region:</th>
-                <td {if $memberInfo.fieldFail.region}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
-                    <select name="region">
-        {foreach from=$memberInfo.fieldData.region.list item=v}
-                        <option value="{$v.value}"{if $v.default} selected="selected"{/if}>{$v.name}</option>
-        {/foreach}
-                    </select>
-                    {if $memberInfo.fieldFail.region}<p>{$memberInfo.fieldFail.region}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                {if $memberInfo.fieldRequired.lat}<th class="emRequiredInputField">{else}<th>{/if}Location:</th>
-                <td>
-                    <div id="glm-estimate-location" class="button button-secondary">Map Location Using Above Address</div>
-                    <p>
-                        MAP USE: Drag the pointer to the desired location for this {$terms.term_member}.
-                        Use + and - buttons or the mouse wheel to zoom in or out.
-                        Click and drag anywhere else on the map to move to another area.
-                    </p>
-                    <div id="locationMap" class="glm-map-edit">(map loads here)</div>
-                    <p>
-                        <b>Selected Position:</b> 
-                        &nbsp;&nbsp;Latitude <input id="glmLat" name="lat" type="text" value="{$memberInfo.fieldData.lat}" class="glm-form-text-input-veryshort">
-                        &nbsp;&nbsp;Longitude <input id="glmLng" name="lon" type="text" value="{$memberInfo.fieldData.lon}" class="glm-form-text-input-veryshort">
-                        &nbsp;&nbsp;<span id="latLonRecenter" class="button button-secondary">Update pointer with new lat/lon postion.</span>
-                    </p>
-                </td>
-            </tr>
-        </table>
+
+        {include file='admin/member/memberInfo/editLocation.html'}
 
         <!-- **** Contact Info **** -->
-        
-        <table id="glm-table-contact" class="glm-admin-table glm-hidden glm-member-info-table">
-            <tr>
-                <th {if $memberInfo.fieldRequired.phone}class="glm-required"{/if}>Phone #:</th>
-                <td {if $memberInfo.fieldFail.phone}class="glm-form-bad-input" data-tabid="glm-member-info-contact"{/if}>
-                    <input type="text" name="phone" value="{$memberInfo.fieldData.phone}" class="glm-form-text-input-short glm-phone-input" >
-                    {if $memberInfo.fieldFail.phone}<p>{$memberInfo.fieldFail.phone}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.toll_free}class="glm-required"{/if}>Toll Free #:</th>
-                <td {if $memberInfo.fieldFail.toll_free}class="glm-form-bad-input" data-tabid="glm-member-info-contact"{/if}>
-                    <input type="text" name="toll_free" value="{$memberInfo.fieldData.toll_free}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 800.123.4567 [ext 123]">
-                    {if $memberInfo.fieldFail.toll_free}<p>{$memberInfo.fieldFail.toll_free}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.email}class="glm-required"{/if}>E-Mail Address:</th>
-                <td {if $memberInfo.fieldFail.email}class="glm-form-bad-input" data-tabid="glm-member-info-contact"{/if}>
-                    <input type="text" name="email" value="{$memberInfo.fieldData.email}" class="glm-form-text-input-short" placeholder="ex: info@gaslightmedia.com">
-                    {if $memberInfo.fieldFail.email}<p>{$memberInfo.fieldFail.email}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.url}class="glm-required"{/if}>Web Address (URL):</th>
-                <td {if $memberInfo.fieldFail.url}class="glm-form-bad-input" data-tabid="glm-member-info-contact"{/if}>
-        {if $memberInfo.fieldData.url}
-                    <a class="button button-secondary glm-right" href="{$memberInfo.fieldData.url}" target="urlTarget">Test Link</a>
-        {/if}
-                    <input type="text" name="url" value="{$memberInfo.fieldData.url}" class="glm-form-text-input-medium" placeholder="ex: http://www.gaslightmedia.com">
-                    {if $memberInfo.fieldFail.url}<p>{$memberInfo.fieldFail.url}</p>{/if}
-                </td>
-            </tr>
-        </table>
+
+        {include file='admin/member/memberInfo/editContact.html'}
 
         <!-- **** Category & Amenities **** -->
         
-        <table id="glm-table-cat" class="glm-admin-table glm-hidden glm-member-info-table">
-            <tr>
-                <th>Categories</th>
-                <td class="glm-item-container">
-                    <!--  Add new category dialog -->
-
-{if apply_filters('glm_members_menu_members', true)}
-                    <div id="newCategoryButton" class="button button-secondary glm-right">Add a new Category</div>
-{/if}
-
-                    <div id="newCategoryDialog" class="glm-dialog-box" title="Enter a New Category">
-                            <table class="glm-admin-table">
-                                <tr>
-                                    <th class="glm-required">Category Name:</th>
-                                    <td id="newCatNameTD">
-                                        <input id="newCatName" type="text" name="newCatName" class="glm-form-text-input">
-                                        <div id="newCatNameRequired"></div>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <th>Parent Category:</th>
-                                    <td>
-                                        <select id="newCatParent" name="newCatParent">
-                            {if $availableCategories}
-                                            <option value=""></option>
-                                {foreach $availableCategories as $t}
-                                    {if !$t.parent.value} <!-- don't show child categories -->
-                                            <option value="{$t.id}" data-parent="{$t.name}">{$t.name}</option>
-                                    {/if}
-                                {/foreach}
-                            {/if}
-                                        </select>
-                                        <br>OR<br>
-                                        <input id="newCatParentName" type="text" name="newCatParentName" placeholder="Enter a new parent name."> 
-                                    </td>
-                                </tr>
-                            </table>
-                            <p><span class="glm-required">*</span> Required</p>
-                            <a id="newCategoryCancel" class="button button-primary glm-right">Cancel</a>
-                            <input id="newCategorySubmit" type="submit" value="Add new Category">
-                    </div>
-                    <!-- Category Selection -->
-{if apply_filters('glm_members_menu_members', true)}
-                    <select name="categorySelect" id="categorySelect">
-        {if $availableCategories}
-                        <option id="categoryNone" value=""></option>
-            {foreach from=$availableCategories item=v}
-                        <option value="{$v.id}" data-parent="{$v.parent.name}">
-                            {if $v.parent.value}&nbsp;&nbsp;&nbsp;&nbsp;{/if}{$v.name}
-                        </option>
-            {/foreach}
-        {else}
-                        <option id="" value="">(No Categories Listed - Select "Add a new Category" to the right. )</option>  
-        {/if}
-                    </select>&nbsp;&nbsp; Select a category to add to box below.<br>
-{else}
-                    <p>You do not have permission to change your {$terms.term_member} categories. Please call if you need changes made here.                    
-{/if}
-                    <div id="activeCategories" class="glm-dynSelect-box">
-                    
-        {if isset($memberInfo.fieldData.categories) && $memberInfo.fieldData.categories}
-            {foreach from=$memberInfo.fieldData.categories item=c}
-                        <div data-id="{$c.id}" class="glm-dynSelect-item glm-members-catgegory"> 
-                            {if $c.parent_name != ''}{$c.parent_name}: {/if}{$c.name} 
-{if apply_filters('glm_members_menu_members', true)}                            
-                            <span data-id="{$c.id}" class="glm-dynSelect-delete catDelete">X</span>
-{/if}                            
-                            <input type="hidden" name="category[{$c.id}]" value="{$c.id}">
-                       </div>                    
-            {/foreach}
-        {/if}                    
-                    </div>
-                </td>
-            </tr>
-            <tr>
-                <th>Amenities</th>
-                <td class="glm-item-container">
-                    <!-- Amenity Selection -->
-                    <select name="amenitySelect" id="amenitySelect">
-        {if $availableAmenities}
-                        <option id="amenityNone" value=""></option>
-            {foreach from=$availableAmenities item=v}
-                        <option value="{$v.id}">
-                            {$v.name}
-                        </option>
-            {/foreach}
-        {else}
-                        <option id="" value="">(No Amenities Listed - See "Configure" > "Amenities")</option>  
-        {/if}
-                    </select>&nbsp;&nbsp; Select an amenity to add to box below.<br>
-                    <div id="activeAmenities" class="glm-dynSelect-box">
-        {if isset($memberInfo.fieldData.amenities) && $memberInfo.fieldData.amenities}
-            {foreach from=$memberInfo.fieldData.amenities item=c}
-                        <div data-id="{$c.id}" class="glm-dynSelect-item glm-members-amenity"> 
-                            {$c.name} 
-                            <span data-id="{$c.id}" class="glm-dynSelect-delete amenityDelete">X</span>
-                            <input type="hidden" name="amenity[{$c.id}]" value="{$c.id}">
-                       </div>                    
-            {/foreach}
-        {/if}                    
-                    </div>
-                </td>
-            </tr>
-        </table>
-
+        {include file='admin/member/memberInfo/editCategory.html'}
         
         <!-- **** Images **** -->
          
-        <table id="glm-table-images" class="glm-admin-table glm-hidden glm-member-info-table">
-            <tr>
-                <td>&nbsp;</td>
-                <td>
-                    <p>
-                        Best image size to provide is between 800 and 1000 pixels wide and stored as a JPG or JPEG file. 
-                        Also try to supply images that have a reasonable "aspect ratio" (not too tall, not too wide).
-                        Files provided like this should have a file size of 100 to 250 KB. Images will be automatically
-                        resized for use in the Web site. Images that are too large will be rejected.
-                   </p>
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.logo}class="glm-required"{/if}>Profile Image:</th>
-                <td {if $memberInfo.fieldFail.logo}class="glm-form-bad-input" data-tabid="glm-member-info-images"{/if}>
-                    <table class="glm-admin-image-edit-table">
-        {if $memberInfo.fieldData.logo}
-                        <tr>
-                            <td>
-                                <div class="glm-galleryImage" data-id="logo">
-                                    <img src="{$glmPluginMediaUrl}/images/small/{$memberInfo.fieldData.logo}">
-                                </div>
-                            </td>
-                            <td>
-                                <input type="checkbox" name="logo_delete"> Delete Image<br>
-                                {$memberInfo.fieldData.logo}<br>
-                            </td>
-                        </tr>
-        {/if}
-                        <tr><td colspan="2"><b>New image:</b> <input type="file" name="logo_new"></td></tr>
-                    </table>
-                    <div id="glm-galleryImageLarger_logo" class="glm-imageDialog"><img src="{$glmPluginMediaUrl}/images/large/{$memberInfo.fieldData.logo}"></div>
-                    {if $memberInfo.fieldFail.logo}<p>{$memberInfo.fieldFail.logo}</p>{/if}
-                </td>
-            </tr>
-            <tr>
-                <th>Image Gallery</th>
-                <td class="glm-item-container glm-imageGalleryContainer">
-                
-    {if $memberInfoID}                
-                    <input type="hidden" id="galleryPositionOrder" name="galleryPositionOrder" 
-                        value="{if $haveImageGallery}{foreach $imageGallery as $i name=ig}{if $i.file_name}{$i.id}{if not $smarty.foreach.ig.last},{/if}{/if}{/foreach}{/if}" />
-                    <div class="glm-imageDropContainer">
-                            <!-- All fields with class "glm-imageDrop" are automatically processed by imageUpload.js -->
-                        <div class="glm-imageDrop glm-imageItemHidden" 
-                                data-refType="{$ref_type_numb.MemberInfo}" 
-                                data-recordID="{$memberInfo.fieldData.id}" 
-                                data-maxFileSizeKB="2500"
-                                data-allowedTypes="image/jpeg,image/png,image/gif,image/x-ms-bmp"
-                                >
-                            <!-- The contents of this div are read by imageUpload.js to use for display of upload progress. -->
-                            <div class="glm-imageUploadStatusTemplate glm-imageItemHidden">
-                                
-                                <!-- Start of upload status pop-up template - Parameters are of the form "[name]" -->
-                                <b><u>Uploading Image { thisFile } of { numbFiles }</u></b>
-                                <table class="glm-statusTable">
-                                    <tr>
-                                        <td class="glm-statusImageTD" rowspan="5">
-                                            <div class="glm-statusImageContainer">
-                                                <bust-stupid-ngg-image-selection src="{ fileImage }"></bust-stupid-ngg-image-selection>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div style="float: right; margin: .2em .2em 0 0;" id="imageUploadCancel" class="button button-primary glm-right">Cancel Upload</div></td>
-                                        <td class="glm-statusPrompt">Name: </td><td class="glm-statusValue">{ fileName }</td>
-                                    </tr>
-                                    <tr><td class="glm-statusPrompt">Type: </td><td class="glm-statusValue">{ fileType }</td></tr>
-                                    <tr><td class="glm-statusPrompt">Size: </td><td class="glm-statusValue">{ fileSize }</td></tr>
-                                    <tr><td class="glm-statusPrompt">Progress: </td><td class="glm-statusValue"><div class="glm-progressBarContainer"><div class="glm-progressBar"></div></div></td></tr>
-                                </table>
-                                <!-- End of template -->
-                                
-                            </div>
-                            <!-- The contents of this div are read by imageUpload.js to use as a template for inserting a new image into the gallery area -->
-                            <div class="glm-galleryImageDataTemplate glm-imageItemHidden">
-                            
-                                <!-- 
-                                    Start of new image template.
-                                    Parmeters are of the form "{ name }" where the spaces are required to avoid Smarty interpreting the parameters.
-                                    Note that these input fields are dissabled to avoid the template fields being submitted. The imageUpload.js
-                                    code enables the fields when it replicates the template for a new image. 
-                                -->
-                                <li id="{ id }" class="glm-galleryContainer">
-                                    <div class="glm-galleryImageData">
-                                        <table class="glm-statusTable">
-                                            <tr>
-                                                <th>Caption:</th>
-                                                <td><input id="galleryImage_caption_{ id }" type="text" name="galleryImage_caption[{ id }]" value="" class="glm-form-text-input-medium" disabled></td>
-                                                <td rowspan="2">
-                                                    <table>
-                                                        <tr><th>Delete:</th><td><input type="checkbox" name="galleryImage_delete[{ id }]" disabled></td></tr>
-                                                        <tr><th>featured Image:</th><td><input type="radio" name="galleryImage_featured" value="{ id }"></td></tr>
-                                                        <tr><th colspan="2" class="glm-notice" style="font-size: 1.2em;">New Upload</th></tr>
-                                                    </table>                             
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <th>Description:</th>
-                                                <td><textarea name="galleryImage_descr[{ id }]" disabled></textarea></td>
-                                            </tr>
-                                        </table>
-                                    </div>
-                                    <div class="glm-galleryImage" data-id="{ id }">
-                                        <bust-stupid-ngg-image-selection src="{$glmPluginMediaUrl}/images/small/{ filename }"></bust-stupid-ngg-image-selection>
-                                    </div>
-                                </li>
-                                <div id="glm-galleryImageLarger2_{ id }" class="glm-imageDialog">
-                                    <bust-stupid-ngg-image-selection src="{$glmPluginMediaUrl}/images/large/{ filename }"></bust-stupid-ngg-image-selection>
-                                </div>
-                                <!-- End of template -->
-                                
-                            </div>
-                        </div> <!-- Overlay of parent for drag/drop detection -->
-                        <div class="glm-imageUploadStatus glm-imageItemHidden"></div> <!-- Overlay for Upload Status Bars -->
-                        <div class="glm-imageDropText glm-imageItemHidden">Drag and drop new images here</div>
-                        <div class="glm-noImageDropText glm-imageItemHidden">HTML5 file drag-and-drop not supported by your browser.<br>Use "Browse" button above to upload an image.</div>
-                    </div>
-                    <div class="glm-right"><b>No Featured Image:</b> <input type="radio" name="galleryImage_featured" value="0"><br>&nbsp;</div>
-                    <div class="glm-left">Click images to view full size.</div>
-                    <ul class="glm-galleryImages">
-                        <!-- Note that id in li is needed for sorting -->
-        {if $haveImageGallery}     
-            {foreach $imageGallery as $i}
-                {if $i.file_name}
-                        <li id="{$i.id}" class="glm-galleryContainer">
-                            <div class="glm-galleryImageData">
-                                <table class="glm-statusTable">
-                                    <tr>
-                                        <th>Caption:</th>
-                                        <td><input id="galleryImage_caption_{$i.id}" type="text" name="galleryImage_caption[{$i.id}]" value="{$i.caption}" class="glm-form-text-input-medium"></td>
-                                        <td rowspan="2">
-                                            <table>
-                                                <tr><th>Delete:</th><td><input type="checkbox" name="galleryImage_delete[{$i.id}]"></td></tr>
-                                                <tr><th>Featured Image:</th><td><input type="radio" name="galleryImage_featured" value="{$i.id}" {if $i.featured.value}checked="checked"{/if}></td></tr>
-                                            </table>                             
-                                            <input type="hidden" name="galleryImage_position[{$i.id}]" value="{$i.position}">
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <th>Description:</th>
-                                        <td><textarea name="galleryImage_descr[{$i.id}]">{$i.descr}</textarea></td>
-                                        <th colspan="2">
-                                        </th>
-                                    </tr>
-                                </table>
-                            </div>
-                            <div class="glm-galleryImage" data-id="{$i.id}">
-                                <img src="{$glmPluginMediaUrl}/images/small/{$i.file_name}">
-                            </div>
-                            <div id="glm-galleryImageLarger_{$i.id}" class="glm-imageDialog"><img src="{$glmPluginMediaUrl}/images/large/{$i.file_name}"></div>
-                {/if}
-                       </li>
-                                         
-            {/foreach}
-        {/if}
-                    </ul>
-    {else}
-                    <b>Note:</b> Images may only be added to {$terms.term_member} profile records that have been created.
-                    You are editing information to create a new record.
-                    <br>After you click "Add new {$terms.term_member}" below, you may come back here to add images to the gallery.
-    {/if}          
-                </td>
-            </tr>
-        </table>
+        {include file='admin/member/memberInfo/editImages.html'}
         
         <!-- **** Video **** -->
         
-        <table id="glm-table-video" class="glm-admin-table glm-hidden glm-member-info-table">
-            <tr style="display:none">
-                <th {if $memberInfo.fieldRequired.video_type}class="glm-required"{/if}>Video Type:</th>
-                <td {if $memberInfo.fieldFail.video_type}class="glm-form-bad-input" data-tabid="glm-member-info-video"{/if}>
-                    <select id="glm-video-type" name="video_type">
-        {foreach from=$memberInfo.fieldData.video_type.list item=v}
-                        <option value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
-        {/foreach}
-                    </select>
-                    {if $memberInfo.fieldFail.video_type}<p>{$memberInfo.fieldFail.video_type}</p>{/if}
-                </td>
-            </tr>
-            <tr id="glm-video-url" class="glm-hidden">
-                <th {if $memberInfo.fieldRequired.video_url}class="glm-required"{/if}>Video URL:</th>
-                <td {if $memberInfo.fieldFail.video_url}class="glm-form-bad-input" data-tabid="glm-member-info-video"{/if}>
-                    <input type="text" name="video_url" value="{$memberInfo.fieldData.video_url}" class="glm-form-text-input-medium" placeholder="ex: https://www.youtube.com/watch?v=C0DPdy98e4c">
-                    {if $memberInfo.fieldFail.video_url}<p>{$memberInfo.fieldFail.video_url}</p>{/if}
-                     <span id="video-url-msg">Only YouTube and Vimeo links are supported</span>
-                </td>
-            </tr>
-            <tr id="glm-video-file" class="glm-hidden">
-                <th {if $memberInfo.fieldRequired.video_file}class="glm-required"{/if}>Video File:</th>
-                <td {if $memberInfo.fieldFail.video_file}class="glm-form-bad-input"{/if}>
-        {if $memberInfo.fieldData.video_file}
-                    <b>File Name:</b> {$memberInfo.fieldData.video_file}<br>
-                    Replace this video file:</b> <input type="file" name="video_file">
-                    <input type="checkbox" name="video_file_delete"> Delete Video File<br>
-        {else}
-                    <b>New file:</b> <input type="file" name="video_file_new">
-        {/if}
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.video_title}class="glm-required"{/if}>Video Title:</th>
-                <td {if $memberInfo.fieldFail.video_title}class="glm-form-bad-input" data-tabid="glm-member-info-video"{/if}>
-                    <input type="text" name="video_title" value="{$memberInfo.fieldData.video_title}" class="glm-form-text-input-medium glm-char-count" data-msgArea="video-title-msg" maxlength="80">
-                    {if $memberInfo.fieldFail.video_title}<p>{$memberInfo.fieldFail.video_title}</p>{/if}<br>
-                    <span id="video-title-msg"></span>
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.video_descr}class="glm-required"{/if}>Video Description:</th>
-                <td {if $memberInfo.fieldFail.video_descr}class="glm-form-bad-input" data-tabid="glm-member-info-video"{/if}>
-                    {php} 
-                        wp_editor('{$memberInfo.fieldData.video_descr|escape:quotes}', 'glm_video_descr', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'video_descr',
-                            'editor_height' => 200,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
-                    {if $memberInfo.fieldFail.video_descr}<p>{$memberInfo.fieldFail.video_descr}</p>{/if}
-                </td>
-            </tr>
-        </table>
+        {include file='admin/member/memberInfo/editVideo.html'}
         
         <!-- **** Live Cam **** -->
         
-        <table id="glm-table-live-cam" class="glm-admin-table glm-hidden glm-member-info-table">
-            <tr>
-                <th {if $memberInfo.fieldRequired.live_cam_type}class="glm-required"{/if}>Source Type:</th>
-                <td {if $memberInfo.fieldFail.live_cam_type}class="glm-form-bad-input" data-tabid="glm-member-info-live-cam"{/if}>
-                    <select id="glm-live-cam-type" name="live_cam_type">
-        {foreach from=$memberInfo.fieldData.live_cam_type.list item=v}
-            
-                        <option {if $v.name!='Image'}disabled {/if}value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
-        {/foreach}
-                    </select>
-                    {if $memberInfo.fieldFail.live_cam_type}<p>{$memberInfo.fieldFail.live_cam_type}</p>{/if}
-                </td>
-            </tr>
-            <tr id="glm-live-cam-url">
-                <th {if $memberInfo.fieldRequired.live_cam_url}class="glm-required"{/if}>Source URL:</th>
-                <td {if $memberInfo.fieldFail.live_cam_url}class="glm-form-bad-input" data-tabid="glm-member-info-live-cam"{/if}>
-                    <input type="text" name="live_cam_url" value="{$memberInfo.fieldData.live_cam_url}" class="glm-form-text-input-medium" placeholder="ex: https://www.youtube.com/watch?v=C0DPdy98e4c">
-                    {if $memberInfo.fieldFail.live_cam_url}<p>{$memberInfo.fieldFail.live_cam_url}</p>{/if}
-                    <span id="live-cam-url-msg">Only image links are supported</span>
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.live_cam_title}class="glm-required"{/if}>Title to Display:</th>
-                <td {if $memberInfo.fieldFail.video_title}class="glm-form-bad-input" data-tabid="glm-member-info-live-cam"{/if}>
-                    <input type="text" name="live_cam_title" value="{$memberInfo.fieldData.live_cam_title}" class="glm-form-text-input-medium glm-char-count" data-msgArea="video-title-msg" maxlength="80">
-                    {if $memberInfo.fieldFail.live_cam_title}<p>{$memberInfo.fieldFail.live_cam_title}</p>{/if}<br>
-                    <span id="live-cam-title-msg"></span>
-                </td>
-            </tr>
-            <tr>
-                <th {if $memberInfo.fieldRequired.live_cam_descr}class="glm-required"{/if}>Description to Display:</th>
-                <td {if $memberInfo.fieldFail.live_cam_descr}class="glm-form-bad-input" data-tabid="glm-member-info-live-cam"{/if}>
-                    {php} 
-                        wp_editor('{$memberInfo.fieldData.live_cam_descr|escape:quotes}', 'glm_live_cam_descr', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'live_cam_descr',
-                            'editor_height' => 200,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
-                    {if $memberInfo.fieldFail.live_cam_descr}<p>{$memberInfo.fieldFail.live_cam_descr}</p>{/if}
-                </td>
-            </tr>
-        </table>
+        {include file='admin/member/memberInfo/editCamera.html'}
         
         <!-- **** Credit Cards **** -->
         
-        <table id="glm-table-ccards" class="glm-admin-table glm-hidden glm-member-info-table">
-            <tr>
-                <th {if $memberInfo.fieldRequired.cc_type}class="glm-required"{/if}>Credit Cards Accepted:</th>
-                <td {if $memberInfo.fieldFail.cc_type}class="glm-form-bad-input" data-tabid="glm-member-info-ccards"{/if}>
-        {foreach from=$memberInfo.fieldData.cc_type.bitmap item=v}
-                    <input type="checkbox" name="cc_type[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}> {$v.name}<br>
-        {/foreach}                    
-                    {if $memberInfo.fieldFail.cc_type}<p>{$memberInfo.fieldFail.cc_type}</p>{/if}
-                </td>
-            </tr>
-        </table>
-
-        <p><span class="glm-required">*</span> Required</p>
-        <input id="updateMemberProfile" type="submit" value="{if $memberInfoID && $memberInfo}Update {$terms.term_member} profile{else}Add new {$terms.term_member} profile{/if}">
+        {include file='admin/member/memberInfo/editCreditCards.html'}
 
     </form>
     
             // Set masking for phone number fields - see http://digitalbush.com/projects/masked-input-plugin/
             $.mask.definitions['e'] = "[A-Za-z0-9: ]";
             $(".glm-phone-input").mask("999{$settings.phone_infix}999{$settings.phone_infix}9999? eeeeeeeeeee");
-                            
+            
+            $('#glm-live-cam-type').on("change", function() {
+                checkLiveCamType();
+            });
+            function checkLiveCamType() {
+                var camType = $('#glm-live-cam-type').val();
+                if (camType == 1) {
+                    $('.not-with-url-type').addClass('glm-hidden');                    
+                } else {
+                    $('.not-with-url-type').removeClass('glm-hidden');
+                }
+            }
+            checkLiveCamType();
+            
         });
     </script>
             
diff --git a/views/admin/member/memberInfo/editCamera.html b/views/admin/member/memberInfo/editCamera.html
new file mode 100644 (file)
index 0000000..02c50e3
--- /dev/null
@@ -0,0 +1,46 @@
+        
+        <table id="glm-table-live-cam" class="glm-admin-table glm-hidden glm-member-info-table">
+            <tr>
+                <th {if $memberInfo.fieldRequired.live_cam_type}class="glm-required"{/if}>Type:</th>
+                <td {if $memberInfo.fieldFail.live_cam_type}class="glm-form-bad-input" data-tabid="glm-member-info-live-cam"{/if}>
+                    <select id="glm-live-cam-type" name="live_cam_type">
+        {foreach from=$memberInfo.fieldData.live_cam_type.list item=v}
+            
+                        <option value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
+        {/foreach}
+                    </select>
+                    {if $memberInfo.fieldFail.live_cam_type}<p>{$memberInfo.fieldFail.live_cam_type}</p>{/if}
+                </td>
+            </tr>
+            <tr id="glm-live-cam-url">
+                <th {if $memberInfo.fieldRequired.live_cam_url}class="glm-required"{/if}>URL:</th>
+                <td {if $memberInfo.fieldFail.live_cam_url}class="glm-form-bad-input" data-tabid="glm-member-info-live-cam"{/if}>
+                    <input type="text" name="live_cam_url" value="{$memberInfo.fieldData.live_cam_url}" class="glm-form-text-input-medium-long" placeholder="ex: http://cams.gaslightmedia.com/cameras/images/GLM-Basin-Small.jpg">
+                    {if $memberInfo.fieldFail.live_cam_url}<p>{$memberInfo.fieldFail.live_cam_url}</p>{/if}
+                </td>
+            </tr>
+            <tr class="not-with-url-type">
+                <th {if $memberInfo.fieldRequired.live_cam_title}class="glm-required"{/if}>Title to Display:</th>
+                <td {if $memberInfo.fieldFail.video_title}class="glm-form-bad-input" data-tabid="glm-member-info-live-cam"{/if}>
+                    <input type="text" name="live_cam_title" value="{$memberInfo.fieldData.live_cam_title}" class="glm-form-text-input-medium glm-char-count" data-msgArea="video-title-msg" maxlength="80">
+                    {if $memberInfo.fieldFail.live_cam_title}<p>{$memberInfo.fieldFail.live_cam_title}</p>{/if}<br>
+                    <span id="live-cam-title-msg"></span>
+                </td>
+            </tr>
+            <tr class="not-with-url-type glm-hidden">
+                <th {if $memberInfo.fieldRequired.live_cam_descr}class="glm-required"{/if}>Description to Display:</th>
+                <td {if $memberInfo.fieldFail.live_cam_descr}class="glm-form-bad-input" data-tabid="glm-member-info-live-cam"{/if}>
+                    {php} 
+                        wp_editor('{$memberInfo.fieldData.live_cam_descr|escape:quotes}', 'glm_live_cam_descr', array(
+                            'media_buttons' => false,
+                            // 'quicktags' => false,
+                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
+                            'textarea_name' => 'live_cam_descr',
+                            'editor_height' => 200,     // Height in px, overrides editor_rows
+                                // 'textarea_rows' => 8
+                        ));
+                    {/php}
+                    {if $memberInfo.fieldFail.live_cam_descr}<p>{$memberInfo.fieldFail.live_cam_descr}</p>{/if}
+                </td>
+            </tr>
+        </table>
diff --git a/views/admin/member/memberInfo/editCategory.html b/views/admin/member/memberInfo/editCategory.html
new file mode 100644 (file)
index 0000000..74e5978
--- /dev/null
@@ -0,0 +1,106 @@
+
+        <table id="glm-table-cat" class="glm-admin-table glm-hidden glm-member-info-table">
+            <tr>
+                <th>Categories</th>
+                <td class="glm-item-container">
+                    <!--  Add new category dialog -->
+
+{if apply_filters('glm_members_menu_members', true)}
+                    <div id="newCategoryButton" class="button button-secondary glm-right">Add a new Category</div>
+{/if}
+
+                    <div id="newCategoryDialog" class="glm-dialog-box" title="Enter a New Category">
+                            <table class="glm-admin-table">
+                                <tr>
+                                    <th class="glm-required">Category Name:</th>
+                                    <td id="newCatNameTD">
+                                        <input id="newCatName" type="text" name="newCatName" class="glm-form-text-input">
+                                        <div id="newCatNameRequired"></div>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <th>Parent Category:</th>
+                                    <td>
+                                        <select id="newCatParent" name="newCatParent">
+                            {if $availableCategories}
+                                            <option value=""></option>
+                                {foreach $availableCategories as $t}
+                                    {if !$t.parent.value} <!-- don't show child categories -->
+                                            <option value="{$t.id}" data-parent="{$t.name}">{$t.name}</option>
+                                    {/if}
+                                {/foreach}
+                            {/if}
+                                        </select>
+                                        <br>OR<br>
+                                        <input id="newCatParentName" type="text" name="newCatParentName" placeholder="Enter a new parent name."> 
+                                    </td>
+                                </tr>
+                            </table>
+                            <p><span class="glm-required">*</span> Required</p>
+                            <a id="newCategoryCancel" class="button button-primary glm-right">Cancel</a>
+                            <input id="newCategorySubmit" type="submit" value="Add new Category">
+                    </div>
+                    <!-- Category Selection -->
+{if apply_filters('glm_members_menu_members', true)}
+                    <select name="categorySelect" id="categorySelect">
+        {if $availableCategories}
+                        <option id="categoryNone" value=""></option>
+            {foreach from=$availableCategories item=v}
+                        <option value="{$v.id}" data-parent="{$v.parent.name}">
+                            {if $v.parent.value}&nbsp;&nbsp;&nbsp;&nbsp;{/if}{$v.name}
+                        </option>
+            {/foreach}
+        {else}
+                        <option id="" value="">(No Categories Listed - Select "Add a new Category" to the right. )</option>  
+        {/if}
+                    </select>&nbsp;&nbsp; Select a category to add to box below.<br>
+{else}
+                    <p>You do not have permission to change your {$terms.term_member} categories. Please call if you need changes made here.                    
+{/if}
+                    <div id="activeCategories" class="glm-dynSelect-box">
+                    
+        {if isset($memberInfo.fieldData.categories) && $memberInfo.fieldData.categories}
+            {foreach from=$memberInfo.fieldData.categories item=c}
+                        <div data-id="{$c.id}" class="glm-dynSelect-item glm-members-catgegory"> 
+                            {if $c.parent_name != ''}{$c.parent_name}: {/if}{$c.name} 
+{if apply_filters('glm_members_menu_members', true)}                            
+                            <span data-id="{$c.id}" class="glm-dynSelect-delete catDelete">X</span>
+{/if}                            
+                            <input type="hidden" name="category[{$c.id}]" value="{$c.id}">
+                       </div>                    
+            {/foreach}
+        {/if}                    
+                    </div>
+                </td>
+            </tr>
+            <tr>
+                <th>Amenities</th>
+                <td class="glm-item-container">
+                    <!-- Amenity Selection -->
+                    <select name="amenitySelect" id="amenitySelect">
+        {if $availableAmenities}
+                        <option id="amenityNone" value=""></option>
+            {foreach from=$availableAmenities item=v}
+                        <option value="{$v.id}">
+                            {$v.name}
+                        </option>
+            {/foreach}
+        {else}
+                        <option id="" value="">(No Amenities Listed - See "Configure" > "Amenities")</option>  
+        {/if}
+                    </select>&nbsp;&nbsp; Select an amenity to add to box below.<br>
+                    <div id="activeAmenities" class="glm-dynSelect-box">
+        {if isset($memberInfo.fieldData.amenities) && $memberInfo.fieldData.amenities}
+            {foreach from=$memberInfo.fieldData.amenities item=c}
+                        <div data-id="{$c.id}" class="glm-dynSelect-item glm-members-amenity"> 
+                            {$c.name} 
+                            <span data-id="{$c.id}" class="glm-dynSelect-delete amenityDelete">X</span>
+                            <input type="hidden" name="amenity[{$c.id}]" value="{$c.id}">
+                       </div>                    
+            {/foreach}
+        {/if}                    
+                    </div>
+                </td>
+            </tr>
+        </table>
+
diff --git a/views/admin/member/memberInfo/editContact.html b/views/admin/member/memberInfo/editContact.html
new file mode 100644 (file)
index 0000000..f23c4f1
--- /dev/null
@@ -0,0 +1,36 @@
+
+                
+        <table id="glm-table-contact" class="glm-admin-table glm-hidden glm-member-info-table">
+            <tr>
+                <th {if $memberInfo.fieldRequired.phone}class="glm-required"{/if}>Phone #:</th>
+                <td {if $memberInfo.fieldFail.phone}class="glm-form-bad-input" data-tabid="glm-member-info-contact"{/if}>
+                    <input type="text" name="phone" value="{$memberInfo.fieldData.phone}" class="glm-form-text-input-short glm-phone-input" >
+                    {if $memberInfo.fieldFail.phone}<p>{$memberInfo.fieldFail.phone}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.toll_free}class="glm-required"{/if}>Toll Free #:</th>
+                <td {if $memberInfo.fieldFail.toll_free}class="glm-form-bad-input" data-tabid="glm-member-info-contact"{/if}>
+                    <input type="text" name="toll_free" value="{$memberInfo.fieldData.toll_free}" class="glm-form-text-input-short glm-phone-input" placeholder="ex: 800.123.4567 [ext 123]">
+                    {if $memberInfo.fieldFail.toll_free}<p>{$memberInfo.fieldFail.toll_free}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.email}class="glm-required"{/if}>E-Mail Address:</th>
+                <td {if $memberInfo.fieldFail.email}class="glm-form-bad-input" data-tabid="glm-member-info-contact"{/if}>
+                    <input type="text" name="email" value="{$memberInfo.fieldData.email}" class="glm-form-text-input-short" placeholder="ex: info@gaslightmedia.com">
+                    {if $memberInfo.fieldFail.email}<p>{$memberInfo.fieldFail.email}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.url}class="glm-required"{/if}>Web Address (URL):</th>
+                <td {if $memberInfo.fieldFail.url}class="glm-form-bad-input" data-tabid="glm-member-info-contact"{/if}>
+        {if $memberInfo.fieldData.url}
+                    <a class="button button-secondary glm-right" href="{$memberInfo.fieldData.url}" target="urlTarget">Test Link</a>
+        {/if}
+                    <input type="text" name="url" value="{$memberInfo.fieldData.url}" class="glm-form-text-input-medium" placeholder="ex: http://www.gaslightmedia.com">
+                    {if $memberInfo.fieldFail.url}<p>{$memberInfo.fieldFail.url}</p>{/if}
+                </td>
+            </tr>
+        </table>
+
diff --git a/views/admin/member/memberInfo/editCreditCards.html b/views/admin/member/memberInfo/editCreditCards.html
new file mode 100644 (file)
index 0000000..e587ae7
--- /dev/null
@@ -0,0 +1,15 @@
+
+        <table id="glm-table-ccards" class="glm-admin-table glm-hidden glm-member-info-table">
+            <tr>
+                <th {if $memberInfo.fieldRequired.cc_type}class="glm-required"{/if}>Credit Cards Accepted:</th>
+                <td {if $memberInfo.fieldFail.cc_type}class="glm-form-bad-input" data-tabid="glm-member-info-ccards"{/if}>
+        {foreach from=$memberInfo.fieldData.cc_type.bitmap item=v}
+                    <input type="checkbox" name="cc_type[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}> {$v.name}<br>
+        {/foreach}                    
+                    {if $memberInfo.fieldFail.cc_type}<p>{$memberInfo.fieldFail.cc_type}</p>{/if}
+                </td>
+            </tr>
+        </table>
+
+        <p><span class="glm-required">*</span> Required</p>
+        <input id="updateMemberProfile" type="submit" value="{if $memberInfoID && $memberInfo}Update {$terms.term_member} profile{else}Add new {$terms.term_member} profile{/if}">
diff --git a/views/admin/member/memberInfo/editImages.html b/views/admin/member/memberInfo/editImages.html
new file mode 100644 (file)
index 0000000..a75c16f
--- /dev/null
@@ -0,0 +1,166 @@
+
+        <table id="glm-table-images" class="glm-admin-table glm-hidden glm-member-info-table">
+            <tr>
+                <td>&nbsp;</td>
+                <td>
+                    <p>
+                        Best image size to provide is between 800 and 1000 pixels wide and stored as a JPG or JPEG file. 
+                        Also try to supply images that have a reasonable "aspect ratio" (not too tall, not too wide).
+                        Files provided like this should have a file size of 100 to 250 KB. Images will be automatically
+                        resized for use in the Web site. Images that are too large will be rejected.
+                   </p>
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.logo}class="glm-required"{/if}>Profile Image:</th>
+                <td {if $memberInfo.fieldFail.logo}class="glm-form-bad-input" data-tabid="glm-member-info-images"{/if}>
+                    <table class="glm-admin-image-edit-table">
+        {if $memberInfo.fieldData.logo}
+                        <tr>
+                            <td>
+                                <div class="glm-galleryImage" data-id="logo">
+                                    <img src="{$glmPluginMediaUrl}/images/small/{$memberInfo.fieldData.logo}">
+                                </div>
+                            </td>
+                            <td>
+                                <input type="checkbox" name="logo_delete"> Delete Image<br>
+                                {$memberInfo.fieldData.logo}<br>
+                            </td>
+                        </tr>
+        {/if}
+                        <tr><td colspan="2"><b>New image:</b> <input type="file" name="logo_new"></td></tr>
+                    </table>
+                    <div id="glm-galleryImageLarger_logo" class="glm-imageDialog"><img src="{$glmPluginMediaUrl}/images/large/{$memberInfo.fieldData.logo}"></div>
+                    {if $memberInfo.fieldFail.logo}<p>{$memberInfo.fieldFail.logo}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th>Image Gallery</th>
+                <td class="glm-item-container glm-imageGalleryContainer">
+                
+    {if $memberInfoID}                
+                    <input type="hidden" id="galleryPositionOrder" name="galleryPositionOrder" 
+                        value="{if $haveImageGallery}{foreach $imageGallery as $i name=ig}{if $i.file_name}{$i.id}{if not $smarty.foreach.ig.last},{/if}{/if}{/foreach}{/if}" />
+                    <div class="glm-imageDropContainer">
+                            <!-- All fields with class "glm-imageDrop" are automatically processed by imageUpload.js -->
+                        <div class="glm-imageDrop glm-imageItemHidden" 
+                                data-refType="{$ref_type_numb.MemberInfo}" 
+                                data-recordID="{$memberInfo.fieldData.id}" 
+                                data-maxFileSizeKB="2500"
+                                data-allowedTypes="image/jpeg,image/png,image/gif,image/x-ms-bmp"
+                                >
+                            <!-- The contents of this div are read by imageUpload.js to use for display of upload progress. -->
+                            <div class="glm-imageUploadStatusTemplate glm-imageItemHidden">
+                                
+                                <!-- Start of upload status pop-up template - Parameters are of the form "[name]" -->
+                                <b><u>Uploading Image { thisFile } of { numbFiles }</u></b>
+                                <table class="glm-statusTable">
+                                    <tr>
+                                        <td class="glm-statusImageTD" rowspan="5">
+                                            <div class="glm-statusImageContainer">
+                                                <bust-stupid-ngg-image-selection src="{ fileImage }"></bust-stupid-ngg-image-selection>
+                                            </div>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td><div style="float: right; margin: .2em .2em 0 0;" id="imageUploadCancel" class="button button-primary glm-right">Cancel Upload</div></td>
+                                        <td class="glm-statusPrompt">Name: </td><td class="glm-statusValue">{ fileName }</td>
+                                    </tr>
+                                    <tr><td class="glm-statusPrompt">Type: </td><td class="glm-statusValue">{ fileType }</td></tr>
+                                    <tr><td class="glm-statusPrompt">Size: </td><td class="glm-statusValue">{ fileSize }</td></tr>
+                                    <tr><td class="glm-statusPrompt">Progress: </td><td class="glm-statusValue"><div class="glm-progressBarContainer"><div class="glm-progressBar"></div></div></td></tr>
+                                </table>
+                                <!-- End of template -->
+                                
+                            </div>
+                            <!-- The contents of this div are read by imageUpload.js to use as a template for inserting a new image into the gallery area -->
+                            <div class="glm-galleryImageDataTemplate glm-imageItemHidden">
+                            
+                                <!-- 
+                                    Start of new image template.
+                                    Parmeters are of the form "{ name }" where the spaces are required to avoid Smarty interpreting the parameters.
+                                    Note that these input fields are dissabled to avoid the template fields being submitted. The imageUpload.js
+                                    code enables the fields when it replicates the template for a new image. 
+                                -->
+                                <li id="{ id }" class="glm-galleryContainer">
+                                    <div class="glm-galleryImageData">
+                                        <table class="glm-statusTable">
+                                            <tr>
+                                                <th>Caption:</th>
+                                                <td><input id="galleryImage_caption_{ id }" type="text" name="galleryImage_caption[{ id }]" value="" class="glm-form-text-input-medium" disabled></td>
+                                                <td rowspan="2">
+                                                    <table>
+                                                        <tr><th>Delete:</th><td><input type="checkbox" name="galleryImage_delete[{ id }]" disabled></td></tr>
+                                                        <tr><th>featured Image:</th><td><input type="radio" name="galleryImage_featured" value="{ id }"></td></tr>
+                                                        <tr><th colspan="2" class="glm-notice" style="font-size: 1.2em;">New Upload</th></tr>
+                                                    </table>                             
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>Description:</th>
+                                                <td><textarea name="galleryImage_descr[{ id }]" disabled></textarea></td>
+                                            </tr>
+                                        </table>
+                                    </div>
+                                    <div class="glm-galleryImage" data-id="{ id }">
+                                        <bust-stupid-ngg-image-selection src="{$glmPluginMediaUrl}/images/small/{ filename }"></bust-stupid-ngg-image-selection>
+                                    </div>
+                                </li>
+                                <div id="glm-galleryImageLarger2_{ id }" class="glm-imageDialog">
+                                    <bust-stupid-ngg-image-selection src="{$glmPluginMediaUrl}/images/large/{ filename }"></bust-stupid-ngg-image-selection>
+                                </div>
+                                <!-- End of template -->
+                                
+                            </div>
+                        </div> <!-- Overlay of parent for drag/drop detection -->
+                        <div class="glm-imageUploadStatus glm-imageItemHidden"></div> <!-- Overlay for Upload Status Bars -->
+                        <div class="glm-imageDropText glm-imageItemHidden">Drag and drop new images here</div>
+                        <div class="glm-noImageDropText glm-imageItemHidden">HTML5 file drag-and-drop not supported by your browser.<br>Use "Browse" button above to upload an image.</div>
+                    </div>
+                    <div class="glm-right"><b>No Featured Image:</b> <input type="radio" name="galleryImage_featured" value="0"><br>&nbsp;</div>
+                    <div class="glm-left">Click images to view full size.</div>
+                    <ul class="glm-galleryImages">
+                        <!-- Note that id in li is needed for sorting -->
+        {if $haveImageGallery}     
+            {foreach $imageGallery as $i}
+                {if $i.file_name}
+                        <li id="{$i.id}" class="glm-galleryContainer">
+                            <div class="glm-galleryImageData">
+                                <table class="glm-statusTable">
+                                    <tr>
+                                        <th>Caption:</th>
+                                        <td><input id="galleryImage_caption_{$i.id}" type="text" name="galleryImage_caption[{$i.id}]" value="{$i.caption}" class="glm-form-text-input-medium"></td>
+                                        <td rowspan="2">
+                                            <table>
+                                                <tr><th>Delete:</th><td><input type="checkbox" name="galleryImage_delete[{$i.id}]"></td></tr>
+                                                <tr><th>Featured Image:</th><td><input type="radio" name="galleryImage_featured" value="{$i.id}" {if $i.featured.value}checked="checked"{/if}></td></tr>
+                                            </table>                             
+                                            <input type="hidden" name="galleryImage_position[{$i.id}]" value="{$i.position}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <th>Description:</th>
+                                        <td><textarea name="galleryImage_descr[{$i.id}]">{$i.descr}</textarea></td>
+                                        <th colspan="2">
+                                        </th>
+                                    </tr>
+                                </table>
+                            </div>
+                            <div class="glm-galleryImage" data-id="{$i.id}">
+                                <img src="{$glmPluginMediaUrl}/images/small/{$i.file_name}">
+                            </div>
+                            <div id="glm-galleryImageLarger_{$i.id}" class="glm-imageDialog"><img src="{$glmPluginMediaUrl}/images/large/{$i.file_name}"></div>
+                {/if}
+                       </li>
+                                         
+            {/foreach}
+        {/if}
+                    </ul>
+    {else}
+                    <b>Note:</b> Images may only be added to {$terms.term_member} profile records that have been created.
+                    You are editing information to create a new record.
+                    <br>After you click "Add new {$terms.term_member}" below, you may come back here to add images to the gallery.
+    {/if}          
+                </td>
+            </tr>
+        </table>
diff --git a/views/admin/member/memberInfo/editLocation.html b/views/admin/member/memberInfo/editLocation.html
new file mode 100644 (file)
index 0000000..ff99a74
--- /dev/null
@@ -0,0 +1,110 @@
+        
+        <table id="glm-table-address" class="glm-admin-table glm-hidden glm-member-info-table">
+            <tr>
+                <th {if $memberInfo.fieldRequired.addr1}class="glm-required"{/if}>Address Line 1:</th>
+                <td {if $memberInfo.fieldFail.addr1}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
+                    <input type="text" id="addr1" name="addr1" value="{$memberInfo.fieldData.addr1}" class="glm-form-text-input">
+                    {if $memberInfo.fieldFail.addr1}<p>{$memberInfo.fieldFail.addr1}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.addr2}class="glm-required"{/if}>Address Line 2:</th>
+                <td {if $memberInfo.fieldFail.addr2}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
+                    <input id="addr2" type="text" name="addr2" value="{$memberInfo.fieldData.addr2}" class="glm-form-text-input">
+                    {if $memberInfo.fieldFail.addr2}<p>{$memberInfo.fieldFail.addr2}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th>City</th>
+                <td class="glm-item-container">
+                    <!--  Add new city dialog -->
+                    <div id="newCityButton" class="button button-secondary glm-right">Add a new City</div>
+                    <div id="newCityDialog" class="glm-dialog-box" title="Enter a New City">
+                        <table class="glm-admin-table">
+                            <tr>
+                                <th class="glm-required">City Name:</th>
+                                <td id="newCityNameTD">
+                                    <input id="newCityName" type="text" name="newCityName" class="glm-form-text-input">
+                                    <div id="newCityNameRequired"></div>
+                                </td>
+                            </tr>
+                        </table>
+                        <p><span class="glm-required">*</span> Required</p>
+                        <a id="newCityCancel" class="button button-primary glm-right">Cancel</a>
+                        <input id="newCitySubmit" type="submit" value="Add new City">
+                    </div>
+                    <!-- City Selection -->
+                    <input id="cityName" type="hidden" name="newCityName" value=""><!-- this field is only used if adding a new city to pass the new name -->
+                    <select name="city" id="city">
+                        <option value="0"></option>
+        {foreach from=$memberInfo.fieldData.city.list item=v}
+                        <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+                            {$v.name}
+                        </option>
+        {/foreach}
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.state}class="glm-required"{/if}>State:</th>
+                <td {if $memberInfo.fieldFail.state}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
+                    <select id="state" name="state">
+        {foreach from=$memberInfo.fieldData.state.list item=v}
+                        <option value="{$v.value}"{if $settings.default_state == $v.value} selected="selected"{/if}>
+                            {$v.name} {if $settings.default_state == $v.value} (default){/if}
+                        </option>
+        {/foreach}
+                    </select>
+                    {if $memberInfo.fieldFail.state}<p>{$memberInfo.fieldFail.state}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.zip}class="glm-required"{/if}>ZIP / Postal Code:</th>
+                <td {if $memberInfo.fieldFail.zip}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
+                    <input id="zip" type="text" name="zip" value="{$memberInfo.fieldData.zip}" class="glm-form-text-input-short">
+                    {if $memberInfo.fieldFail.zip}<p>{$memberInfo.fieldFail.zip}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.country}class="glm-required"{/if}>Country:</th>
+                <td {if $memberInfo.fieldFail.country}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
+                    <select id="country" name="country">
+        {foreach from=$memberInfo.fieldData.country.list item=v}
+                        <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+                            {$v.name} {$v.value}
+                        </option>
+        {/foreach}
+                    </select>
+                    {if $memberInfo.fieldFail.country}<p>{$memberInfo.fieldFail.country}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.region}class="glm-required"{/if}>Region:</th>
+                <td {if $memberInfo.fieldFail.region}class="glm-form-bad-input" data-tabid="glm-member-info-address"{/if}>
+                    <select name="region">
+        {foreach from=$memberInfo.fieldData.region.list item=v}
+                        <option value="{$v.value}"{if $v.default} selected="selected"{/if}>{$v.name}</option>
+        {/foreach}
+                    </select>
+                    {if $memberInfo.fieldFail.region}<p>{$memberInfo.fieldFail.region}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                {if $memberInfo.fieldRequired.lat}<th class="emRequiredInputField">{else}<th>{/if}Location:</th>
+                <td>
+                    <div id="glm-estimate-location" class="button button-secondary">Map Location Using Above Address</div>
+                    <p>
+                        MAP USE: Drag the pointer to the desired location for this {$terms.term_member}.
+                        Use + and - buttons or the mouse wheel to zoom in or out.
+                        Click and drag anywhere else on the map to move to another area.
+                    </p>
+                    <div id="locationMap" class="glm-map-edit">(map loads here)</div>
+                    <p>
+                        <b>Selected Position:</b> 
+                        &nbsp;&nbsp;Latitude <input id="glmLat" name="lat" type="text" value="{$memberInfo.fieldData.lat}" class="glm-form-text-input-veryshort">
+                        &nbsp;&nbsp;Longitude <input id="glmLng" name="lon" type="text" value="{$memberInfo.fieldData.lon}" class="glm-form-text-input-veryshort">
+                        &nbsp;&nbsp;<span id="latLonRecenter" class="button button-secondary">Update pointer with new lat/lon postion.</span>
+                    </p>
+                </td>
+            </tr>
+        </table>
diff --git a/views/admin/member/memberInfo/editStatus.html b/views/admin/member/memberInfo/editStatus.html
new file mode 100644 (file)
index 0000000..d72bd46
--- /dev/null
@@ -0,0 +1,61 @@
+        
+        <table id="glm-table-descr" class="glm-admin-table glm-member-info-table">
+            <tr>
+                <th {if $memberInfo.fieldRequired.reference_name}class="glm-required"{/if}>Profile Name:</th>
+                <td {if $memberInfo.fieldFail.reference_name}class="glm-form-bad-input" data-tabid="glm-member-info-descr"{/if}>
+                    <input type="text" name="reference_name" value="{$memberInfo.fieldData.reference_name}" class="glm-form-text-input" placeholder="Name of this {$terms.term_member} profile record for reference only. Not displayed to user.">
+                    {if $memberInfo.fieldFail.reference_name}<p>{$memberInfo.fieldFail.reference_name}</p>{/if}<br>
+                    The "Profile Name" field is used to help identify this particular {$terms.term_member} profile. {$terms.term_member_plur_cap} may have multiple profiles,
+                    only one of which can be active at a time. Multiple profiles make it easy to manage separate sets of information that may be 
+                    used at different times, for example seasons of the year or for special events (i.e. "Winter Profile").  
+                </td>
+            </tr>
+            <tr>
+                <th>Profile Status:</th>
+                <td>
+                    <select name="status">
+        {foreach from=$memberInfo.fieldData.status.list item=v}
+                        <option value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
+        {/foreach}
+                    </select>
+                    {if $memberInfo.fieldFail.status}<p>{$memberInfo.fieldFail.status}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.descr}class="glm-required"{/if}>Description:</th>
+                <td {if $memberInfo.fieldFail.descr}class="glm-form-bad-input" data-tabid="glm-member-info-descr"{/if}>
+                    {php} 
+                        wp_editor('{$memberInfo.fieldData.descr|escape:quotes}', 'glm_descr', array(
+                            'media_buttons' => false,
+                            // 'quicktags' => false,
+                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
+                            'textarea_name' => 'descr',
+                            'editor_height' => 200,     // Height in px, overrides editor_rows
+                                // 'textarea_rows' => 8
+                        ));
+                    {/php}
+                    {if $memberInfo.fieldFail.descr}<p>{$memberInfo.fieldFail.descr}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.short_descr}class="glm-required"{/if}>Short Description:</th>
+                <td {if $memberInfo.fieldFail.short_descr}class="glm-form-bad-input" data-tabid="glm-member-info-descr"{/if}>
+                    <input type="text" name="short_descr" value="{$memberInfo.fieldData.short_descr}" class="glm-form-text-input glm-char-count" data-msgArea="short-descr-msg" maxlength="120" placeholder="A short, one line, description of the {$terms.term_member}.">
+                    <br><span id="short-descr-msg"></span>
+                    {if $memberInfo.fieldFail.short_descr}<p>{$memberInfo.fieldFail.short_descr}</p>{/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.notes}class="glm-required"{/if}>Notes:</th>
+            <td
+                {if $memberInfo.fieldFail.notes}class="glm-form-bad-input" data-tabid="glm-member-info-descr"{/if}>
+                <textarea name="notes" class="glm-form-textarea">{$memberInfo.fieldData.notes}</textarea>
+                {if $memberInfo.fieldFail.notes}
+                <p>{$memberInfo.fieldFail.notes}</p>{/if}<br> This
+                "Notes" field is not displayed anywhere else. It is
+                strictly for making and keeping notes related to this
+                {$terms.term_member} profile.
+            </td>
+        </tr>
+        </table>
+        
diff --git a/views/admin/member/memberInfo/editVideo.html b/views/admin/member/memberInfo/editVideo.html
new file mode 100644 (file)
index 0000000..301171a
--- /dev/null
@@ -0,0 +1,58 @@
+
+        <table id="glm-table-video" class="glm-admin-table glm-hidden glm-member-info-table">
+            <tr style="display:none">
+                <th {if $memberInfo.fieldRequired.video_type}class="glm-required"{/if}>Video Type:</th>
+                <td {if $memberInfo.fieldFail.video_type}class="glm-form-bad-input" data-tabid="glm-member-info-video"{/if}>
+                    <select id="glm-video-type" name="video_type">
+        {foreach from=$memberInfo.fieldData.video_type.list item=v}
+                        <option value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
+        {/foreach}
+                    </select>
+                    {if $memberInfo.fieldFail.video_type}<p>{$memberInfo.fieldFail.video_type}</p>{/if}
+                </td>
+            </tr>
+            <tr id="glm-video-url" class="glm-hidden">
+                <th {if $memberInfo.fieldRequired.video_url}class="glm-required"{/if}>Video URL:</th>
+                <td {if $memberInfo.fieldFail.video_url}class="glm-form-bad-input" data-tabid="glm-member-info-video"{/if}>
+                    <input type="text" name="video_url" value="{$memberInfo.fieldData.video_url}" class="glm-form-text-input-medium" placeholder="ex: https://www.youtube.com/watch?v=C0DPdy98e4c">
+                    {if $memberInfo.fieldFail.video_url}<p>{$memberInfo.fieldFail.video_url}</p>{/if}
+                     <span id="video-url-msg">Only YouTube and Vimeo links are supported</span>
+                </td>
+            </tr>
+            <tr id="glm-video-file" class="glm-hidden">
+                <th {if $memberInfo.fieldRequired.video_file}class="glm-required"{/if}>Video File:</th>
+                <td {if $memberInfo.fieldFail.video_file}class="glm-form-bad-input"{/if}>
+        {if $memberInfo.fieldData.video_file}
+                    <b>File Name:</b> {$memberInfo.fieldData.video_file}<br>
+                    Replace this video file:</b> <input type="file" name="video_file">
+                    <input type="checkbox" name="video_file_delete"> Delete Video File<br>
+        {else}
+                    <b>New file:</b> <input type="file" name="video_file_new">
+        {/if}
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.video_title}class="glm-required"{/if}>Video Title:</th>
+                <td {if $memberInfo.fieldFail.video_title}class="glm-form-bad-input" data-tabid="glm-member-info-video"{/if}>
+                    <input type="text" name="video_title" value="{$memberInfo.fieldData.video_title}" class="glm-form-text-input-medium glm-char-count" data-msgArea="video-title-msg" maxlength="80">
+                    {if $memberInfo.fieldFail.video_title}<p>{$memberInfo.fieldFail.video_title}</p>{/if}<br>
+                    <span id="video-title-msg"></span>
+                </td>
+            </tr>
+            <tr>
+                <th {if $memberInfo.fieldRequired.video_descr}class="glm-required"{/if}>Video Description:</th>
+                <td {if $memberInfo.fieldFail.video_descr}class="glm-form-bad-input" data-tabid="glm-member-info-video"{/if}>
+                    {php} 
+                        wp_editor('{$memberInfo.fieldData.video_descr|escape:quotes}', 'glm_video_descr', array(
+                            'media_buttons' => false,
+                            // 'quicktags' => false,
+                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
+                            'textarea_name' => 'video_descr',
+                            'editor_height' => 200,     // Height in px, overrides editor_rows
+                                // 'textarea_rows' => 8
+                        ));
+                    {/php}
+                    {if $memberInfo.fieldFail.video_descr}<p>{$memberInfo.fieldFail.video_descr}</p>{/if}
+                </td>
+            </tr>
+        </table>
index 6eedd8e..abfe318 100644 (file)
                         {apply_filters('glm-member-db-front-members-detail-linksTop', '', $member.id)}
                         {if $member.email && $settings.detail_show_email}<a href="mailto:{$member.email}">Email</a>{/if}
                         {if $settings.detail_show_coupons && $coupons}<a href="#glm-member-detail-coupons">Coupons</a>{/if}
+                        {if $member.live_cam_type.value==1 && $member.live_cam_url && $settings.detail_show_live_cam}<a target="_blank" href="{$member.live_cam_url}">{$terms.term_webcam_cap}</a>{/if}
                         {apply_filters('glm-member-db-front-members-detail-linksBottom', '', $member.id)}
                     </div>
     
                     {/if}
                     
                     {apply_filters('glm-member-db-front-members-detail-videoAfter', '', $member.id)}
-                    
+              
                     {apply_filters('glm-member-db-front-members-detail-liveCamBefore', '', $member.id)}
-                    {if $member.live_cam_url && $settings.detail_show_live_cam}
-                    <div id="glm-member-detail-live-cam-toggle" class="glm-member-detail-content-toggle">Live Cam</div>
+                    {if $member.live_cam_type.value!=1 && $member.live_cam_url && $settings.detail_show_live_cam}
+                    <div id="glm-member-detail-live-cam-toggle" class="glm-member-detail-content-toggle">{$terms.term_webcam_cap}</div>
                     <div id="glm-member-detail-live-cam-container" class="glm-member-detail-content-data small-12">
                         <table class="glm-member-detail-table">
                             <div><h3 class="glm-member-detail-live-cam-title">{$member.live_cam_title}</h3></div>
-                            <div class="glm-member-detail-live-cam-embed">{$member.live_cam_embed}</div>
+                        {if $member.live_cam_type.value == 2}
+                            <img width="auto" max-height="315" src="{$member.live_cam_url}">
+                        {/if}
                             <div class="glm-member-detail-live-cam-descr"><p>{$member.live_cam_descr}</p></div>
                         </table>
                         <div class="glm-member-detail-sub-data-links row">
index 72ff1a6..bf1ab8c 100644 (file)
         <!--                        {if $m.phone && $settings.list_map_show_phone}<a href="tel:+{$m.phone}">Phone</a>{/if}-->
                                 {$packageLink = apply_filters('glm-member-db-front-members-list-linksBottom', '', $m.member_pointer)}
                                 {if $packageLink}<li>{$packageLink}</li>{/if}
+                                {if $m.live_cam_type.value == 1}
+                                    <li><a target="_blank" href="{$m.live_cam_url}">{$terms.term_webcam_cap}</a></li>
+                                {/if}
                                 <li><a href="{$siteBaseUrl}{$settings.canonical_member_page}/{$m.member_slug}/">View&nbsp;More</a></li>
                                 {apply_filters('glm-member-db-front-members-list-memberBelow', '', $m.member_pointer)}
                             </ul>
                         {apply_filters('glm-member-db-front-members-list-memberLinksTop', '', $m.member_pointer)}
                         {if $m.url && $settings.list_show_url}<a class='glm-member-list-website-link' data-member-id="{$m.member_pointer}" data-member-slug="{$m.member_slug}" href="{$m.url}"{if $settings.list_show_url_newtarget} target="_blank"{/if} >Visit Website</a>{/if}
                         {if $m.email && $settings.list_show_email}<a href="mailto:{$m.email}">Email</a>{/if}
+                        {if $m.live_cam_type.value == 1}
+                            <a target="_blank" href="{$m.live_cam_url}">{$terms.term_webcam_cap}</a>
+                        {/if}
                         {apply_filters('glm-member-db-front-members-list-linksBottom', '', $m.member_pointer)}
                      </div>
                     <div class="glm-member-db-socials">