From: Laury GvR Date: Thu, 3 Nov 2016 15:02:22 +0000 (-0400) Subject: Correcting extraneous spacing in data class files. X-Git-Tag: v2.8.3^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=27be4f75221083c58a452a82b7c2a1655d9df4da;p=WP-Plugins%2Fglm-member-db.git Correcting extraneous spacing in data class files. Indentation on data class files changed from 8 spaces to 4 spaces per tab indentation. --- diff --git a/classes/data/dataAmenities.php b/classes/data/dataAmenities.php index 60ace161..0f86bdc8 100644 --- a/classes/data/dataAmenities.php +++ b/classes/data/dataAmenities.php @@ -108,51 +108,51 @@ class GlmDataAmenities extends GlmDataAbstract */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a', - ), - - // Facility Type - 'ref_type' => array ( - 'field' => 'ref_type', - 'type' => 'list', - 'list' => $this->config['ref_type'], - 'required' => true, - 'use' => 'a', - ), - - // Name - 'name' => array( - 'field' => 'name', - 'type' => 'text', - 'required' => true, - 'unique' => true, - 'use' => 'a', - ), - - // Uses Value - 'uses_value' => array( - 'field' => 'uses_value', - 'type' => 'checkbox', - 'use' => 'a', - ), - - // Description - 'descr' => array( - 'field' => 'descr', - 'type' => 'text', - 'use' => 'a', - ), - - // Short Description - 'short_descr' => array( - 'field' => 'short_descr', - 'type' => 'text', - 'use' => 'a', - ), + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a', + ), + + // Facility Type + 'ref_type' => array ( + 'field' => 'ref_type', + 'type' => 'list', + 'list' => $this->config['ref_type'], + 'required' => true, + 'use' => 'a', + ), + + // Name + 'name' => array( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'unique' => true, + 'use' => 'a', + ), + + // Uses Value + 'uses_value' => array( + 'field' => 'uses_value', + 'type' => 'checkbox', + 'use' => 'a', + ), + + // Description + 'descr' => array( + 'field' => 'descr', + 'type' => 'text', + 'use' => 'a', + ), + + // Short Description + 'short_descr' => array( + 'field' => 'short_descr', + 'type' => 'text', + 'use' => 'a', + ), ); @@ -182,19 +182,19 @@ class GlmDataAmenities extends GlmDataAbstract switch ( $action ) { case 'l': case 'g': - $sql = " - SELECT * - FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "grouped_amenities - WHERE amenity_id = " . $result_data['id']; - $result_data['groups'] = $this->wpdb->get_results( $sql, ARRAY_A ); - $result_data['groups_json'] = json_encode($result_data['groups']); - break; + $sql = " + SELECT * + FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "grouped_amenities + WHERE amenity_id = " . $result_data['id']; + $result_data['groups'] = $this->wpdb->get_results( $sql, ARRAY_A ); + $result_data['groups_json'] = json_encode($result_data['groups']); + break; case 'i': - echo '
INSERT: $result_data: ' . print_r($result_data, true) . '
'; - echo '
$_REQUEST: ' . print_r($_REQUEST, true) . '
'; - break; + echo '
INSERT: $result_data: ' . print_r($result_data, true) . '
'; + echo '
$_REQUEST: ' . print_r($_REQUEST, true) . '
'; + break; case 'd': - break; + break; } return $result_data; } @@ -226,7 +226,7 @@ class GlmDataAmenities extends GlmDataAbstract $sql = " SELECT A.* FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "amenity_ref AS R, - ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "amenities AS A + ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "amenities AS A WHERE R.ref_type = $ref_type AND R.ref_dest = $ref_dest AND A.id = R.amenity @@ -278,10 +278,10 @@ class GlmDataAmenities extends GlmDataAbstract foreach ( $amenities as $a ) { $sql = " - INSERT INTO " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "amenity_ref - ( amenity, ref_type, ref_dest) - VALUES - ( $a, $ref_type, $ref_dest ) + INSERT INTO " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "amenity_ref + ( amenity, ref_type, ref_dest) + VALUES + ( $a, $ref_type, $ref_dest ) ;"; $this->wpdb->query( $sql ); diff --git a/classes/data/dataCategories.php b/classes/data/dataCategories.php index 9f36a758..cb5b86a7 100644 --- a/classes/data/dataCategories.php +++ b/classes/data/dataCategories.php @@ -108,56 +108,56 @@ class GlmDataCategories extends GlmDataAbstract */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Name - 'name' => array( - 'field' => 'name', - 'type' => 'text', - 'required' => true, - 'unique' => true, - 'use' => 'a' - ), - - // Parent - for adding, deleting and editing, has selection tabels - 'parent' => array( - 'field' => 'parent', - 'type' => 'pointer', - 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'categories', - 'p_field' => 'name', - 'p_orderby' => 'name', - 'p_blank' => true, - 'force_list' => true, - 'required' => false, - 'use' => 'a' - ), + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Name + 'name' => array( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'unique' => true, + 'use' => 'a' + ), + + // Parent - for adding, deleting and editing, has selection tabels + 'parent' => array( + 'field' => 'parent', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'categories', + 'p_field' => 'name', + 'p_orderby' => 'name', + 'p_blank' => true, + 'force_list' => true, + 'required' => false, + 'use' => 'a' + ), /* - // Parent ID - 'parent_id' => array( - 'field' => 'parent', - 'as' => 'parent_id', - 'type' => 'integer', - 'use' => 'a' - ), + // Parent ID + 'parent_id' => array( + 'field' => 'parent', + 'as' => 'parent_id', + 'type' => 'integer', + 'use' => 'a' + ), */ - // Description - 'descr' => array( - 'field' => 'descr', - 'type' => 'text', - 'use' => 'a' - ), + // Description + 'descr' => array( + 'field' => 'descr', + 'type' => 'text', + 'use' => 'a' + ), - // Short Description - 'short_descr' => array( - 'field' => 'short_descr', - 'type' => 'text', - 'use' => 'a' - ) + // Short Description + 'short_descr' => array( + 'field' => 'short_descr', + 'type' => 'text', + 'use' => 'a' + ) ); @@ -197,20 +197,20 @@ class GlmDataCategories extends GlmDataAbstract // If it's not positive, then fail if ($parent <= 0) { - return false; + return false; } // Check that parent exists $sql = " - SELECT COUNT(id) AS count - FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories - WHERE id = $parent + SELECT COUNT(id) AS count + FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories + WHERE id = $parent ;"; $test = $this->wpdb->get_row($sql, ARRAY_A); // Should be only one entry if the parent category exists if ($test['count'] != 1) { - return false; + return false; } $parentID = $parent; @@ -222,40 +222,40 @@ class GlmDataCategories extends GlmDataAbstract // If the name didn't pass the filer then fail if ($parent == false) { - return false; + return false; } // Check if the name already exists $sql = " - SELECT id - FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories - WHERE name = '$parent' + SELECT id + FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories + WHERE name = '$parent' ;"; $parentCategory = $this->wpdb->get_row($sql, ARRAY_A); // If we found the parent ID if ($parentCategory['id']) { - // Set that as the parent ID for the new category - $parentID = $parentCategory['id']; + // Set that as the parent ID for the new category + $parentID = $parentCategory['id']; // Otherwise, try to add the parent category } else { - // Add the parent as a new category - $sql = " - INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories - ( name, parent ) - VALUES - ( '".addslashes($parent)."', 0 ) - ;"; - $this->wpdb->query($sql); - $parentID = $this->wpdb->insert_id; - - // Check if it didn't store properly - if (!$parentID) { - return false; - } + // Add the parent as a new category + $sql = " + INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories + ( name, parent ) + VALUES + ( '".addslashes($parent)."', 0 ) + ;"; + $this->wpdb->query($sql); + $parentID = $this->wpdb->insert_id; + + // Check if it didn't store properly + if (!$parentID) { + return false; + } } @@ -281,10 +281,10 @@ class GlmDataCategories extends GlmDataAbstract // Try to add the new category $sql = " - INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories - ( name, parent ) - VALUES - ( '".addslashes($name)."', $parentID ) + INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories + ( name, parent ) + VALUES + ( '".addslashes($name)."', $parentID ) ;"; $this->wpdb->query($sql); $categoryID = $this->wpdb->insert_id; @@ -320,44 +320,44 @@ class GlmDataCategories extends GlmDataAbstract // If we only want categories for active and visible members - and we want any of their parents (i know it's messy) if ($forActiveMembers) { $where = " - ( - T.id in ( - SELECT DISTINCT(C.parent) - from glm_glm_members_categories C - WHERE C.id in ( - SELECT DISTINCT(CMI.category) - FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info CMI, - ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info MI, - ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members M - WHERE MI.id = CMI.member_info - AND MI.status = 10 - AND M.id = MI.member - $regionWhere - AND M.access IN ( - ".$this->config['access_numb']['NoAccess'].", - ".$this->config['access_numb']['Moderated'].", - ".$this->config['access_numb']['Full']." - ) - ) - ) - OR - T.id in ( - SELECT DISTINCT(CMI.category) - FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info CMI, - ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info MI, - ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members M - WHERE MI.id = CMI.member_info - AND MI.status = 10 - AND M.id = MI.member - $regionWhere - AND M.access IN ( - ".$this->config['access_numb']['NoAccess'].", - ".$this->config['access_numb']['Moderated'].", - ".$this->config['access_numb']['Full']." - ) - ) - - ) + ( + T.id in ( + SELECT DISTINCT(C.parent) + FROM glm_glm_members_categories C + WHERE C.id in ( + SELECT DISTINCT(CMI.category) + FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info CMI, + ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info MI, + ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members M + WHERE MI.id = CMI.member_info + AND MI.status = 10 + AND M.id = MI.member + $regionWhere + AND M.access IN ( + ".$this->config['access_numb']['NoAccess'].", + ".$this->config['access_numb']['Moderated'].", + ".$this->config['access_numb']['Full']." + ) + ) + ) + OR + T.id in ( + SELECT DISTINCT(CMI.category) + FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info CMI, + ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info MI, + ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members M + WHERE MI.id = CMI.member_info + AND MI.status = 10 + AND M.id = MI.member + $regionWhere + AND M.access IN ( + ".$this->config['access_numb']['NoAccess'].", + ".$this->config['access_numb']['Moderated'].", + ".$this->config['access_numb']['Full']." + ) + ) + + ) "; } @@ -367,8 +367,8 @@ class GlmDataCategories extends GlmDataAbstract if (!$forEdit && is_array($categoriesSorted)) { while (list($k, $v) = each($categoriesSorted)) { - $categoriesSorted[$k]['parent_id'] = $v['parent']['value']; - $categoriesSorted[$k]['parent'] = $v['parent']['name']; + $categoriesSorted[$k]['parent_id'] = $v['parent']['value']; + $categoriesSorted[$k]['parent'] = $v['parent']['name']; } } @@ -392,9 +392,9 @@ class GlmDataCategories extends GlmDataAbstract // Set any parent references with this ID to 0 $sql = " - UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories - SET parent = 0 - WHERE parent = ".$r['id']." + UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories + SET parent = 0 + WHERE parent = ".$r['id']." ;"; $this->wpdb->query($sql); @@ -426,25 +426,25 @@ class GlmDataCategories extends GlmDataAbstract // If there's a parent, append the name of this entry to the parent // The '~~~' simply keeps appended strings from any chance of a match with something else if ($a[$parent]['value']) { - $aVal = $a[$parent]['name'].'~~~'.$a['name']; + $aVal = $a[$parent]['name'].'~~~'.$a['name']; } else { - // Otheriwse just use the name. - $aVal = $a['name']; + // Otheriwse just use the name. + $aVal = $a['name']; } // Same for b value if ($b[$parent]['value']) { - $bVal = $b[$parent]['name'].'~~~'.$b['name']; + $bVal = $b[$parent]['name'].'~~~'.$b['name']; } else { - $bVal = $b['name']; + $bVal = $b['name']; } if ($aVal > $bVal) { - return 1; + return 1; } if ($aVal < $bVal) { - return -1; + return -1; } return 0; diff --git a/classes/data/dataCategoryMemberInfo.php b/classes/data/dataCategoryMemberInfo.php index 68ef0b88..ef58c8e0 100644 --- a/classes/data/dataCategoryMemberInfo.php +++ b/classes/data/dataCategoryMemberInfo.php @@ -108,38 +108,38 @@ class GlmDataCategoryMemberInfo extends GlmDataAbstract */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Category ID - 'category' => array( - 'field' => 'category', - 'type' => 'integer', - 'required' => true, - 'use' => 'a' - ), - - // Member Info ID - 'member_info' => array( - 'field' => 'member_info', - 'type' => 'integer', - 'required' => true, - 'use' => 'a' - ), - - // Category Name - 'category_name' => array( - 'field' => 'category', - 'type' => 'pointer', - 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'categories', - 'p_field' => 'name', - 'p_orderby' => 'name', - 'use' => 'gl' - ) + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Category ID + 'category' => array( + 'field' => 'category', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Member Info ID + 'member_info' => array( + 'field' => 'member_info', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Category Name + 'category_name' => array( + 'field' => 'category', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'categories', + 'p_field' => 'name', + 'p_orderby' => 'name', + 'use' => 'gl' + ) ); @@ -178,26 +178,26 @@ class GlmDataCategoryMemberInfo extends GlmDataAbstract $sql = " SELECT T.category, T.member_info, - ( - SELECT name - FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories - WHERE id = T.category - ) AS category_name, - ( - SELECT parent - FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories - WHERE id = T.category - ) AS category_parent, - COALESCE ( - ( - SELECT name - FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories - WHERE id = category_parent - ), - '' - ) AS parent_name + ( + SELECT name + FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories + WHERE id = T.category + ) AS category_name, + ( + SELECT parent + FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories + WHERE id = T.category + ) AS category_parent, + COALESCE ( + ( + SELECT name + FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories + WHERE id = category_parent + ), + '' + ) AS parent_name FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info T - $where + $where ;"; $list = $this->wpdb->get_results($sql, ARRAY_A); @@ -239,16 +239,16 @@ class GlmDataCategoryMemberInfo extends GlmDataAbstract // For each category in the list foreach ($current as $key => $val) { - $current[$key]['selected'] = false; + $current[$key]['selected'] = false; - // Delete existing ones from the supplied selection list and mark selected ones in the current list - if (isset($selectedCategories[$val['id']])) { + // Delete existing ones from the supplied selection list and mark selected ones in the current list + if (isset($selectedCategories[$val['id']])) { - unset($selectedCategories[$val['id']]); + unset($selectedCategories[$val['id']]); - $current[$key]['selected'] = true; + $current[$key]['selected'] = true; - } + } } @@ -259,10 +259,10 @@ class GlmDataCategoryMemberInfo extends GlmDataAbstract // Add the category $sql = " - INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info - ( category, member_info ) - VALUES - ( $s, $memberInfoID ) + INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info + ( category, member_info ) + VALUES + ( $s, $memberInfoID ) ;"; $this->wpdb->query($sql); @@ -273,18 +273,18 @@ class GlmDataCategoryMemberInfo extends GlmDataAbstract if (is_array($current) && count($current) > 0) { foreach ($current as $key => $val) { - if (!$val['selected']) { + if (!$val['selected']) { - // Delete the entry - // Add the category - $sql = " - DELETE FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info - WHERE member_info = $memberInfoID - AND id = ".$val['id']." - ;"; - $this->wpdb->query($sql); + // Delete the entry + // Add the category + $sql = " + DELETE FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info + WHERE member_info = $memberInfoID + AND id = ".$val['id']." + ;"; + $this->wpdb->query($sql); - } + } } } diff --git a/classes/data/dataCities.php b/classes/data/dataCities.php index 591aeeef..d9d97f5f 100644 --- a/classes/data/dataCities.php +++ b/classes/data/dataCities.php @@ -108,21 +108,21 @@ class GlmDataCities extends GlmDataAbstract */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Name - 'name' => array( - 'field' => 'name', - 'type' => 'text', - 'required' => true, - 'unique' => true, - 'use' => 'a' - ) + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Name + 'name' => array( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'unique' => true, + 'use' => 'a' + ) ); diff --git a/classes/data/dataGroups.php b/classes/data/dataGroups.php index 63958bf9..ba717894 100644 --- a/classes/data/dataGroups.php +++ b/classes/data/dataGroups.php @@ -106,21 +106,21 @@ class GlmDataGroups extends GlmDataAbstract * Table Data Fields */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), - // Name - 'name' => array( - 'field' => 'name', - 'type' => 'text', - 'required' => true, - 'unique' => true, - 'use' => 'a' - ), + // Name + 'name' => array( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'unique' => true, + 'use' => 'a' + ), ); if ( is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) { diff --git a/classes/data/dataImages.php b/classes/data/dataImages.php index 2ec2a8ba..761a0cc4 100644 --- a/classes/data/dataImages.php +++ b/classes/data/dataImages.php @@ -108,99 +108,99 @@ class GlmDataImages extends GlmDataAbstract */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Original file name - 'name' => array( - 'field' => 'name', - 'type' => 'text', - 'required' => true, - 'use' => 'a' - ), - - // Status - 'status' => array ( - 'field' => 'status', - 'type' => 'list', - 'list' => $this->config['status'], - 'required' => true, - 'default' => $this->config['status_numb']['Pending'], - 'force_list' => true, - 'use' => 'a' - ), + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Original file name + 'name' => array( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Status + 'status' => array ( + 'field' => 'status', + 'type' => 'list', + 'list' => $this->config['status'], + 'required' => true, + 'default' => $this->config['status_numb']['Pending'], + 'force_list' => true, + 'use' => 'a' + ), /* Not using for now - // Special Image flag - only one of these - 'selected' => array ( - 'field' => 'selected', - 'type' => 'checkbox', - 'use' => 'gled' - ), + // Special Image flag - only one of these + 'selected' => array ( + 'field' => 'selected', + 'type' => 'checkbox', + 'use' => 'gled' + ), */ - // Featured Image flag - 'featured' => array ( - 'field' => 'featured', - 'type' => 'checkbox', - 'use' => 'gled' - ), - - // File Name - 'file_name' => array( - 'field' => 'file_name', - 'type' => 'text', - 'required' => true, - 'use' => 'a' - ), - - // Description - 'descr' => array( - 'field' => 'descr', - 'type' => 'text', - 'use' => 'a' - ), - - // Caption - 'caption' => array( - 'field' => 'caption', - 'type' => 'text', - 'use' => 'a' - ), - - // Position - 'position' => array( - 'field' => 'position', - 'type' => 'integer', - 'use' => 'a' - ), - - // Reference Type - Which table this entry is associated with - 'ref_type' => array ( - 'field' => 'ref_type', - 'type' => 'list', - 'list' => $this->config['ref_type'], - 'required' => true, - 'default' => $this->config['ref_type_numb']['None'], - 'force_list' => true, - 'use' => 'a' - ), - - // Reference Entry ID - 'ref_dest' => array( - 'field' => 'ref_dest', - 'type' => 'integer', - 'use' => 'gled' - ), - - // Reference Destination - Which entry in the table is it associated with - 'position' => array( - 'field' => 'position', - 'type' => 'integer', - 'use' => 'a' - ) + // Featured Image flag + 'featured' => array ( + 'field' => 'featured', + 'type' => 'checkbox', + 'use' => 'gled' + ), + + // File Name + 'file_name' => array( + 'field' => 'file_name', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Description + 'descr' => array( + 'field' => 'descr', + 'type' => 'text', + 'use' => 'a' + ), + + // Caption + 'caption' => array( + 'field' => 'caption', + 'type' => 'text', + 'use' => 'a' + ), + + // Position + 'position' => array( + 'field' => 'position', + 'type' => 'integer', + 'use' => 'a' + ), + + // Reference Type - Which table this entry is associated with + 'ref_type' => array ( + 'field' => 'ref_type', + 'type' => 'list', + 'list' => $this->config['ref_type'], + 'required' => true, + 'default' => $this->config['ref_type_numb']['None'], + 'force_list' => true, + 'use' => 'a' + ), + + // Reference Entry ID + 'ref_dest' => array( + 'field' => 'ref_dest', + 'type' => 'integer', + 'use' => 'gled' + ), + + // Reference Destination - Which entry in the table is it associated with + 'position' => array( + 'field' => 'position', + 'type' => 'integer', + 'use' => 'a' + ) ); @@ -234,7 +234,7 @@ class GlmDataImages extends GlmDataAbstract if (!isset($this->config['ref_type'][$refType])) { if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice("dataImages.php - getGallery()
  Specified reference type ($refType) is invalid.", 'Alert'); + glmMembersAdmin::addNotice("dataImages.php - getGallery()
  Specified reference type ($refType) is invalid.", 'Alert'); } return false; @@ -245,7 +245,7 @@ class GlmDataImages extends GlmDataAbstract if ($refID <= 0) { if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice("dataImages.php - getGallery()
  Specified reference destination ($refID) is invalid.", 'Alert'); + glmMembersAdmin::addNotice("dataImages.php - getGallery()
  Specified reference destination ($refID) is invalid.", 'Alert'); } return false; @@ -286,7 +286,7 @@ class GlmDataImages extends GlmDataAbstract if (isset($_REQUEST[$orderField]) && trim($_REQUEST[$orderField]) == '') { if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { - glmMembersAdmin::addNotice('dataImages: galleryPositionOrder() unable to find '.$orderField.' data. Perhaps there\'s no images at this time.', 'Process'); + glmMembersAdmin::addNotice('dataImages: galleryPositionOrder() unable to find '.$orderField.' data. Perhaps there\'s no images at this time.', 'Process'); } return false; @@ -309,20 +309,20 @@ class GlmDataImages extends GlmDataAbstract // Do sanity check on image ID if (($i-0) > 0) { - // Set the position for this image - $sql = "UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX ."images SET position = $pos WHERE id = $i;"; - $this->wpdb->query($sql); - $pos++; + // Set the position for this image + $sql = "UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX ."images SET position = $pos WHERE id = $i;"; + $this->wpdb->query($sql); + $pos++; - $queryError = $this->wpdb->last_error; - if ($queryError) { + $queryError = $this->wpdb->last_error; + if ($queryError) { - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { - glmMembersAdmin::addNotice("  Error setting position order for images.
$queryError
$sql", 'Alert'); - } + if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { + glmMembersAdmin::addNotice("  Error setting position order for images.
$queryError
$sql", 'Alert'); + } - return false; - } + return false; + } } } @@ -348,31 +348,31 @@ class GlmDataImages extends GlmDataAbstract // If any image gallery data is submitted if (isset($_REQUEST['galleryImage_caption']) - && is_array($_REQUEST['galleryImage_caption']) - && count($_REQUEST['galleryImage_caption']) > 0) { + && is_array($_REQUEST['galleryImage_caption']) + && count($_REQUEST['galleryImage_caption']) > 0) { // Get the ID of the "featured" image - Only one $featured = 0; if (isset($_REQUEST['galleryImage_featured'])) { - $featured = ($_REQUEST['galleryImage_featured'] - 0); + $featured = ($_REQUEST['galleryImage_featured'] - 0); } // Update other data for this image reset($_REQUEST['galleryImage_caption']); while (list($k, $v) = each($_REQUEST['galleryImage_caption'])) { - $id = ($k -0); + $id = ($k -0); - // Sanitize input - $caption = sanitize_text_field( $_REQUEST['galleryImage_caption'][$k] ); - $descr = sanitize_text_field( $_REQUEST['galleryImage_descr'][$k] ); -// $featured = (isset($_REQUEST['galleryImage_featured']) && isset($_REQUEST['galleryImage_featured'][$k]) && $_REQUEST['galleryImage_featured'][$k] == 'on' ? 'true' : 'false'); + // Sanitize input + $caption = sanitize_text_field( $_REQUEST['galleryImage_caption'][$k] ); + $descr = sanitize_text_field( $_REQUEST['galleryImage_descr'][$k] ); +// $featured = (isset($_REQUEST['galleryImage_featured']) && isset($_REQUEST['galleryImage_featured'][$k]) && $_REQUEST['galleryImage_featured'][$k] == 'on' ? 'true' : 'false'); - // Check if this is the featured image - $thisFeatured = ($featured == $k ? 'true' : 'false'); + // Check if this is the featured image + $thisFeatured = ($featured == $k ? 'true' : 'false'); - // Update data for this image - $sql = "UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX ."images SET caption = '$caption', descr = '$descr', featured = $thisFeatured WHERE id = $id;"; - $this->wpdb->query($sql); + // Update data for this image + $sql = "UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX ."images SET caption = '$caption', descr = '$descr', featured = $thisFeatured WHERE id = $id;"; + $this->wpdb->query($sql); } // Check for an image deletion @@ -381,7 +381,7 @@ class GlmDataImages extends GlmDataAbstract // For each delete requested reset($_REQUEST['galleryImage_delete']); while (list($k, $v) = each($_REQUEST['galleryImage_delete'])) { - $id = ($k -0); + $id = ($k -0); // If a valid key and delete request is in fact set if ($id > 0 && $v == 'on') { @@ -401,32 +401,31 @@ class GlmDataImages extends GlmDataAbstract reset($this->config['imageSizes']); while (list($k, $v) = each($this->config['imageSizes'])) { - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { - glmMembersAdmin::addNotice("      Deleting size $k.", 'Process'); - } + if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + glmMembersAdmin::addNotice("      Deleting size $k.", 'Process'); + } - // Check if the image actually exists - May not if we're doing development - if (is_file(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$imgData['file_name'])) { + // Check if the image actually exists - May not if we're doing development + if (is_file(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$imgData['file_name'])) { - // Delete each image size - unlink(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$imgData['file_name']); + // Delete each image size + unlink(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$imgData['file_name']); - } + } } // Check if the image actually exists - May not if we're doing development if (is_file(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/original/'.$imgData['file_name'])) { - // Also delete the original - unlink(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/original/'.$imgData['file_name']); + // Also delete the original + unlink(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/original/'.$imgData['file_name']); } } } } } - } // Get updated image gallery @@ -465,58 +464,58 @@ class GlmDataImages extends GlmDataAbstract // If we have an image gallery with any images if ($imageGallerySrc !== false - && is_array($imageGallerySrc) - && count($imageGallerySrc) > 0) { + && is_array($imageGallerySrc) + && count($imageGallerySrc) > 0) { // for each gallery image foreach ($imageGallerySrc as $i) { - $srcName = $i['file_name']; + $srcName = $i['file_name']; - // Strip the source table name and ID from the file name (part after first '-') - $dstName = $dstTable.'_'.$refIDDst.'-'.substr(strchr($i['file_name'], '-'), 1); + // Strip the source table name and ID from the file name (part after first '-') + $dstName = $dstTable.'_'.$refIDDst.'-'.substr(strchr($i['file_name'], '-'), 1); - // For each image size - reset($sizes); - while (list($k, $v) = each($sizes)) { + // For each image size + reset($sizes); + while (list($k, $v) = each($sizes)) { - // Check if the source image exists - if (is_file(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$srcName)) { + // Check if the source image exists + if (is_file(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$srcName)) { - // Copy src file to dst file for this size - copy(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$srcName, GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$dstName); + // Copy src file to dst file for this size + copy(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$srcName, GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$dstName); - } - } + } + } - // Add this image to the images table - // Store image name in images table - $sql = " - INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX ."images - ( - name, - file_name, - descr, - caption, - status, - position, - ref_type, - ref_dest - ) - VALUES - ( - '".$i['name']."', - '$dstName', - '".addslashes($i['descr'])."', - '".addslashes($i['caption'])."', - ".$i['status']['value'].", - ".$i['position'].", - $refTypeDst, - $refIDDst - ); - "; - $this->wpdb->query($sql); - // $queryError = $this->wpdb->last_error; + // Add this image to the images table + // Store image name in images table + $sql = " + INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX ."images + ( + name, + file_name, + descr, + caption, + status, + position, + ref_type, + ref_dest + ) + VALUES + ( + '".$i['name']."', + '$dstName', + '".addslashes($i['descr'])."', + '".addslashes($i['caption'])."', + ".$i['status']['value'].", + ".$i['position'].", + $refTypeDst, + $refIDDst + ); + "; + $this->wpdb->query($sql); + // $queryError = $this->wpdb->last_error; } diff --git a/classes/data/dataMemberInfo.php b/classes/data/dataMemberInfo.php index 523a6954..c596768c 100644 --- a/classes/data/dataMemberInfo.php +++ b/classes/data/dataMemberInfo.php @@ -555,15 +555,15 @@ class GlmDataMemberInfo extends GlmDataAbstract WHERE $where AND member = $memberID AND status = ".$this->config['status_numb']['Active']." - AND ( - SELECT access - FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members - WHERE id = T.member - ) IN ( - ".$this->config['access_numb']['NoAccess'].", - ".$this->config['access_numb']['Moderated'].", - ".$this->config['access_numb']['Full']." - ) + AND ( + SELECT access + FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members + WHERE id = T.member + ) IN ( + ".$this->config['access_numb']['NoAccess'].", + ".$this->config['access_numb']['Moderated'].", + ".$this->config['access_numb']['Full']." + ) "; $memberInfo = $this->wpdb->get_row($sql, ARRAY_A); diff --git a/classes/data/dataMemberTypes.php b/classes/data/dataMemberTypes.php index 935605bb..5b426f63 100644 --- a/classes/data/dataMemberTypes.php +++ b/classes/data/dataMemberTypes.php @@ -131,13 +131,11 @@ class GlmDataMemberTypes extends GlmDataAbstract 'use' => 'a' ) - ); if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } - } } diff --git a/classes/data/dataMembers.php b/classes/data/dataMembers.php index 130ed943..c0714dd2 100644 --- a/classes/data/dataMembers.php +++ b/classes/data/dataMembers.php @@ -241,15 +241,15 @@ class GlmDataMembers extends GlmDataAbstract { * */ 'pending' => array ( - 'field' => 'id', - 'as' => 'pending', - 'type' => 'pointer', - 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'member_info', - 'p_field' => 'member', - 'p_id' => 'member', - 'p_where' => 'status = '.$this->config['status_numb']['Pending'], - 'p_sum' => true, - 'use' => 'gl' + 'field' => 'id', + 'as' => 'pending', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'member_info', + 'p_field' => 'member', + 'p_id' => 'member', + 'p_where' => 'status = '.$this->config['status_numb']['Pending'], + 'p_sum' => true, + 'use' => 'gl' ) @@ -296,9 +296,9 @@ class GlmDataMembers extends GlmDataAbstract { // Update the city selected for this memberInfo record $sql = " - UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members - SET member_slug = '$slug' - WHERE id = $id + UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members + SET member_slug = '$slug' + WHERE id = $id ;"; $this->wpdb->query($sql); diff --git a/classes/data/settings/dataSettingsGeneral.php b/classes/data/settings/dataSettingsGeneral.php index aeaf2e43..9a0deb9f 100644 --- a/classes/data/settings/dataSettingsGeneral.php +++ b/classes/data/settings/dataSettingsGeneral.php @@ -88,15 +88,15 @@ class GlmDataSettingsGeneral extends GlmDataAbstract { // If this class is not being extended along with existing $wpdb and $config - if (!$this->wpdb) { + if (!$this->wpdb) { - // Save WordPress Database object - $this->wpdb = $wpdb; + // Save WordPress Database object + $this->wpdb = $wpdb; - // Save plugin configuration object - $this->config = $config; + // Save plugin configuration object + $this->config = $config; - } + } /* * Table Name @@ -108,941 +108,941 @@ class GlmDataSettingsGeneral extends GlmDataAbstract */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - /* - * Debug Options - */ - - // Admin Debug - 'admin_debug' => array( - 'field' => 'admin_debug', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Admin Debug Verbose - 'admin_debug_verbose' => array( - 'field' => 'admin_debug_verbose', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Front-end Debug - 'front_debug' => array( - 'field' => 'front_debug', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Front-end Debug Verbose - 'front_debug_verbose' => array( - 'field' => 'front_debug_verbose', - 'type' => 'checkbox', - 'use' => 'a' - ), - - /* - * Misc Settings - */ - - // Enable Members - 'enable_members' => array( - 'field' => 'enable_members', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Google Maps API Key - 'google_maps_api_key' => array( - 'field' => 'google_maps_api_key', - 'type' => 'text', - 'use' => 'a' - ), - - // Google Maps Default Latitude - 'maps_default_lat' => array( - 'field' => 'maps_default_lat', - 'type' => 'float', - 'use' => 'a' - ), - - // Google Maps Default Longitude - 'maps_default_lon' => array( - 'field' => 'maps_default_lon', - 'type' => 'float', - 'use' => 'a' - ), - - // Google Maps Default Zoom - 'maps_default_zoom' => array( - 'field' => 'maps_default_zoom', - 'type' => 'integer', - 'default' => 12, - 'use' => 'a' - ), - - // Time Zone - 'time_zone' => array( - 'field' => 'time_zone', - 'type' => 'text', - 'use' => 'a' - ), - - // Canonical Member Page Name - 'canonical_member_page' => array( - 'field' => 'canonical_member_page', - 'type' => 'text', - 'use' => 'a' - ), - - // Character to use as phone infix - 'phone_infix' => array( - 'field' => 'phone_infix', - 'type' => 'text', - 'use' => 'a' - ), - - // Default State - 'default_state' => array ( - 'field' => 'default_state', - 'type' => 'list', - 'list' => $this->config['states'], - 'default' => 'MI', - 'force_list' => true, - 'use' => 'a' - ), - - - /* - * Front-end Member Search Options - */ - - - // Search Filters Opened - 'list_show_search_filters_opened' => array( - 'field' => 'list_show_search_filters_opened', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Show Map - 'list_show_map' => array( - 'field' => 'list_show_map', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show List - 'list_show_list' => array( - 'field' => 'list_show_list', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Member List Order - 'list_order_list' => array( - 'field' => 'list_order_list', - 'type' => 'list', - 'list' => $this->config['sort_order'], - 'required' => true, - 'default' => $this->config['sort_order_numb']['Alpha-Numeric'], - 'force_list' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show List - 'list_header_text' => array( - 'field' => 'list_header_text', - 'type' => 'text', - 'use' => 'a' - ), - - // Front-end Listings - Show Search Form - 'list_show_search' => array( - 'field' => 'list_show_search', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Search Text - 'list_show_search_text' => array( - 'field' => 'list_show_search_text', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Search Category - 'list_show_search_category' => array( - 'field' => 'list_show_search_category', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Search Amenities - 'list_show_search_amenities' => array( - 'field' => 'list_show_search_amenities', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Show Search Amenities - 'list_show_search_region' => array( - 'field' => 'list_show_search_region', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Show Search Alpha - 'list_show_search_alpha' => array( - 'field' => 'list_show_search_alpha', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Whether the Search/Filters box should be sticky - 'list_floating_search' => array( - 'field' => 'list_floating_search', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - How far from the top the sticky Search/Filters box should hover - 'list_floating_search_distance_top' => array( - 'field' => 'list_floating_search_distance_top', - 'type' => 'integer', - 'default' => 0, - 'use' => 'a' - ), - - /* - * Front-end Member Listing Options - */ - - // Front-end Listings - Show Detail Link - 'list_show_detail_link' => array( - 'field' => 'list_show_detail_link', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Front-end Listings - Show Logo - 'list_show_logo' => array( - 'field' => 'list_show_logo', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Front-end Listings - Show Logo for Mobile - 'list_logo_for_mobile' => array( - 'field' => 'list_logo_for_mobile', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Front-end Listings - Show Logo Filler - 'list_show_logo_filler' => array( - 'field' => 'list_show_logo_filler', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Front-end Listings - Logo Size - 'list_logo_size' => array( - 'field' => 'list_logo_size', - 'type' => 'list', - 'list' => $this->config['image_sizes'], - 'force_list' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Address - 'list_show_address' => array( - 'field' => 'list_show_address', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Street - 'list_show_street' => array( - 'field' => 'list_show_street', - 'type' => 'checkbox', - 'use' => 'a' - ), - - // Front-end Listings - Show City, State, ZIP - 'list_show_citystatezip' => array( - 'field' => 'list_show_citystatezip', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show country - 'list_show_country' => array( - 'field' => 'list_show_country', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Region - 'list_show_region' => array( - 'field' => 'list_show_region', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Description - 'list_show_descr' => array( - 'field' => 'list_show_descr', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Show Short Description - 'list_show_short_descr' => array( - 'field' => 'list_show_short_descr', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show phone - 'list_show_phone' => array( - 'field' => 'list_show_phone', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Toll Free - 'list_show_tollfree' => array( - 'field' => 'list_show_tollfree', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show URL - 'list_show_url' => array( - 'field' => 'list_show_url', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show URL Using New Target - 'list_show_url_newtarget' => array( - 'field' => 'list_show_url_newtarget', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show E-Mail - 'list_show_email' => array( - 'field' => 'list_show_email', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ), - - // Front-end Listings - Show Categories - 'list_show_categories' => array( - 'field' => 'list_show_categories', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Show Credit Cards - 'list_show_creditcards' => array( - 'field' => 'list_show_creditcards', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Show Amenities - 'list_show_amenities' => array( - 'field' => 'list_show_amenities', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Show Packages - 'list_show_packages' => array( - 'field' => 'list_show_packages', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Show Link to Packages - 'list_show_packages_link' => array( - 'field' => 'list_show_packages_link', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member List - Show Live Cam - 'list_show_live_cam' => array( - 'field' => 'list_show_live_cam', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - /* - * Front-end Member Listing Map Options - */ - - - // Google Map Opened - 'list_map_show_opened' => array( - 'field' => 'list_map_show_opened', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Detail Link - 'list_map_show_detaillink' => array( - 'field' => 'list_map_show_detaillink', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Logo - 'list_map_show_logo' => array( - 'field' => 'list_map_show_logo', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Logo Size - 'list_map_logo_size' => array( - 'field' => 'list_map_logo_size', - 'type' => 'list', - 'list' => $this->config['image_sizes'], - 'force_list' => true, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Description - 'list_map_show_descr' => array( - 'field' => 'list_map_show_descr', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Short Description - 'list_map_show_short_descr' => array( - 'field' => 'list_map_show_short_descr', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Address - 'list_map_show_address' => array( - 'field' => 'list_map_show_address', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Street - 'list_map_show_street' => array( - 'field' => 'list_map_show_street', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show City, State, ZIP - 'list_map_show_citystatezip' => array( - 'field' => 'list_map_show_citystatezip', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Country - 'list_map_show_country' => array( - 'field' => 'list_map_show_country', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Region - 'list_map_show_region' => array( - 'field' => 'list_map_show_region', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Phone - 'list_map_show_phon' => array( - 'field' => 'list_map_show_phone', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Toll Free - 'list_map_show_tollfree' => array( - 'field' => 'list_map_show_tollfree', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show URL - 'list_map_show_url' => array( - 'field' => 'list_map_show_url', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show URL With New Target - 'list_map_show_url_newtarget' => array( - 'field' => 'list_map_show_url_newtarget', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show E-Mail - 'list_map_show_email' => array( - 'field' => 'list_map_show_email', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Categories - 'list_map_show_categories' => array( - 'field' => 'list_map_show_categories', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show Credit Cards - 'list_map_show_creditcards' => array( - 'field' => 'list_map_show_creditcards', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - Map Show amenities - 'list_map_show_amenities' => array( - 'field' => 'list_map_show_amenities', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - /* - * Front-end Member Detail Page Options - */ - - // Front-end Member Detail - Show Map - 'detail_show_map' => array( - 'field' => 'detail_show_map', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Listings - How far from the top the sticky Search/Filters box should hover - 'detail_top_offset_autoscroll' => array( - 'field' => 'detail_top_offset_autoscroll', - 'type' => 'integer', - 'default' => 0, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Directions - 'detail_show_directions' => array( - 'field' => 'detail_show_directions', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Logo - 'detail_show_logo' => array( - 'field' => 'detail_show_logo', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Logo Size - 'detail_logo_size' => array( - 'field' => 'detail_logo_size', - 'type' => 'list', - 'list' => $this->config['image_sizes'], - 'force_list' => true, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Description - 'detail_show_descr' => array( - 'field' => 'detail_show_descr', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Short Description - 'detail_show_short_descr' => array( - 'field' => 'detail_show_short_descr', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Address - 'detail_show_address' => array( - 'field' => 'detail_show_address', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Street - 'detail_show_street' => array( - 'field' => 'detail_show_street', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show City, State, ZIP - 'detail_show_citystatezip' => array( - 'field' => 'detail_show_citystatezip', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Country - 'detail_show_country' => array( - 'field' => 'detail_show_country', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Region - 'detail_show_region' => array( - 'field' => 'detail_show_region', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Phone - 'detail_show_phone' => array( - 'field' => 'detail_show_phone', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Toll Free - 'detail_show_tollfree' => array( - 'field' => 'detail_show_tollfree', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show URL - 'detail_show_url' => array( - 'field' => 'detail_show_url', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show URL With New Target - 'detail_show_url_newtarget' => array( - 'field' => 'detail_show_url_newtarget', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show E-Mail - 'detail_show_email' => array( - 'field' => 'detail_show_email', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Categories - 'detail_show_categories' => array( - 'field' => 'detail_show_categories', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Credit Cards - 'detail_show_creditcards' => array( - 'field' => 'detail_show_creditcards', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Amenities - 'detail_show_amenities' => array( - 'field' => 'detail_show_amenities', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Image Gallery - 'detail_show_imagegallery' => array( - 'field' => 'detail_show_imagegallery', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Coupons - 'detail_show_coupons' => array( - 'field' => 'detail_show_coupons', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Packages - 'detail_show_packages' => array( - 'field' => 'detail_show_packages', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Events - 'detail_show_events' => array( - 'field' => 'detail_show_events', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Video - 'detail_show_video' => array( - 'field' => 'detail_show_video', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Member Detail - Show Live Cam - 'detail_show_live_cam' => array( - 'field' => 'detail_show_live_cam', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - /* - * Front-end Member Detail Map Options - */ - - // Front-end Detail - Map Show Logo - 'detail_map_show_logo' => array( - 'field' => 'detail_map_show_logo', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Logo Size - 'detail_map_logo_size' => array( - 'field' => 'detail_map_logo_size', - 'type' => 'list', - 'list' => $this->config['image_sizes'], - 'force_list' => true, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Description - 'detail_map_show_descr' => array( - 'field' => 'detail_map_show_descr', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Short Description - 'detail_map_show_short_descr' => array( - 'field' => 'detail_map_show_short_descr', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Address - 'detail_map_show_address' => array( - 'field' => 'detail_map_show_address', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Street - 'detail_map_show_street' => array( - 'field' => 'detail_map_show_street', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show City, State, ZIP - 'detail_map_show_citystatezip' => array( - 'field' => 'detail_map_show_citystatezip', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Country - 'detail_map_show_country' => array( - 'field' => 'detail_map_show_country', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Region - 'detail_map_show_region' => array( - 'field' => 'detail_map_show_region', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Phone - 'detail_map_show_phon' => array( - 'field' => 'detail_map_show_phone', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Toll Free - 'detail_map_show_tollfree' => array( - 'field' => 'detail_map_show_tollfree', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show URL - 'detail_map_show_url' => array( - 'field' => 'detail_map_show_url', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show URL With New Target - 'detail_map_show_url_newtarget' => array( - 'field' => 'detail_map_show_url_newtarget', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Email - 'detail_map_show_email' => array( - 'field' => 'detail_map_show_email', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Categories - 'detail_map_show_categories' => array( - 'field' => 'detail_map_show_categories', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show Credit Cards - 'detail_map_show_creditcards' => array( - 'field' => 'detail_map_show_creditcards', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - // Front-end Detail - Map Show amenities - 'detail_map_show_amenities' => array( - 'field' => 'detail_map_show_amenities', - 'type' => 'checkbox', - 'default' => false, - 'use' => 'a' - ), - - /* - * Front-end Member Detail Map Options - */ - - // Front-end Detail - Map Show amenities - 'members_only_support_email' => array( - 'field' => 'members_only_support_email', - 'type' => 'text', - 'use' => 'a' - ), - - // Front-end Detail - Map Show Logo - 'members_only_support_phone' => array( - 'field' => 'members_only_support_phone', - 'type' => 'text', - 'use' => 'a' - ) + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + /* + * Debug Options + */ + + // Admin Debug + 'admin_debug' => array( + 'field' => 'admin_debug', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Admin Debug Verbose + 'admin_debug_verbose' => array( + 'field' => 'admin_debug_verbose', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Front-end Debug + 'front_debug' => array( + 'field' => 'front_debug', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Front-end Debug Verbose + 'front_debug_verbose' => array( + 'field' => 'front_debug_verbose', + 'type' => 'checkbox', + 'use' => 'a' + ), + + /* + * Misc Settings + */ + + // Enable Members + 'enable_members' => array( + 'field' => 'enable_members', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Google Maps API Key + 'google_maps_api_key' => array( + 'field' => 'google_maps_api_key', + 'type' => 'text', + 'use' => 'a' + ), + + // Google Maps Default Latitude + 'maps_default_lat' => array( + 'field' => 'maps_default_lat', + 'type' => 'float', + 'use' => 'a' + ), + + // Google Maps Default Longitude + 'maps_default_lon' => array( + 'field' => 'maps_default_lon', + 'type' => 'float', + 'use' => 'a' + ), + + // Google Maps Default Zoom + 'maps_default_zoom' => array( + 'field' => 'maps_default_zoom', + 'type' => 'integer', + 'default' => 12, + 'use' => 'a' + ), + + // Time Zone + 'time_zone' => array( + 'field' => 'time_zone', + 'type' => 'text', + 'use' => 'a' + ), + + // Canonical Member Page Name + 'canonical_member_page' => array( + 'field' => 'canonical_member_page', + 'type' => 'text', + 'use' => 'a' + ), + + // Character to use as phone infix + 'phone_infix' => array( + 'field' => 'phone_infix', + 'type' => 'text', + 'use' => 'a' + ), + + // Default State + 'default_state' => array ( + 'field' => 'default_state', + 'type' => 'list', + 'list' => $this->config['states'], + 'default' => 'MI', + 'force_list' => true, + 'use' => 'a' + ), + + + /* + * Front-end Member Search Options + */ + + + // Search Filters Opened + 'list_show_search_filters_opened' => array( + 'field' => 'list_show_search_filters_opened', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Show Map + 'list_show_map' => array( + 'field' => 'list_show_map', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show List + 'list_show_list' => array( + 'field' => 'list_show_list', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Member List Order + 'list_order_list' => array( + 'field' => 'list_order_list', + 'type' => 'list', + 'list' => $this->config['sort_order'], + 'required' => true, + 'default' => $this->config['sort_order_numb']['Alpha-Numeric'], + 'force_list' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show List + 'list_header_text' => array( + 'field' => 'list_header_text', + 'type' => 'text', + 'use' => 'a' + ), + + // Front-end Listings - Show Search Form + 'list_show_search' => array( + 'field' => 'list_show_search', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Search Text + 'list_show_search_text' => array( + 'field' => 'list_show_search_text', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Search Category + 'list_show_search_category' => array( + 'field' => 'list_show_search_category', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Search Amenities + 'list_show_search_amenities' => array( + 'field' => 'list_show_search_amenities', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Show Search Amenities + 'list_show_search_region' => array( + 'field' => 'list_show_search_region', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Show Search Alpha + 'list_show_search_alpha' => array( + 'field' => 'list_show_search_alpha', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Whether the Search/Filters box should be sticky + 'list_floating_search' => array( + 'field' => 'list_floating_search', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - How far from the top the sticky Search/Filters box should hover + 'list_floating_search_distance_top' => array( + 'field' => 'list_floating_search_distance_top', + 'type' => 'integer', + 'default' => 0, + 'use' => 'a' + ), + + /* + * Front-end Member Listing Options + */ + + // Front-end Listings - Show Detail Link + 'list_show_detail_link' => array( + 'field' => 'list_show_detail_link', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Front-end Listings - Show Logo + 'list_show_logo' => array( + 'field' => 'list_show_logo', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Front-end Listings - Show Logo for Mobile + 'list_logo_for_mobile' => array( + 'field' => 'list_logo_for_mobile', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Front-end Listings - Show Logo Filler + 'list_show_logo_filler' => array( + 'field' => 'list_show_logo_filler', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Front-end Listings - Logo Size + 'list_logo_size' => array( + 'field' => 'list_logo_size', + 'type' => 'list', + 'list' => $this->config['image_sizes'], + 'force_list' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Address + 'list_show_address' => array( + 'field' => 'list_show_address', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Street + 'list_show_street' => array( + 'field' => 'list_show_street', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Front-end Listings - Show City, State, ZIP + 'list_show_citystatezip' => array( + 'field' => 'list_show_citystatezip', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show country + 'list_show_country' => array( + 'field' => 'list_show_country', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Region + 'list_show_region' => array( + 'field' => 'list_show_region', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Description + 'list_show_descr' => array( + 'field' => 'list_show_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Show Short Description + 'list_show_short_descr' => array( + 'field' => 'list_show_short_descr', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show phone + 'list_show_phone' => array( + 'field' => 'list_show_phone', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Toll Free + 'list_show_tollfree' => array( + 'field' => 'list_show_tollfree', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show URL + 'list_show_url' => array( + 'field' => 'list_show_url', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show URL Using New Target + 'list_show_url_newtarget' => array( + 'field' => 'list_show_url_newtarget', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show E-Mail + 'list_show_email' => array( + 'field' => 'list_show_email', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ), + + // Front-end Listings - Show Categories + 'list_show_categories' => array( + 'field' => 'list_show_categories', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Show Credit Cards + 'list_show_creditcards' => array( + 'field' => 'list_show_creditcards', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Show Amenities + 'list_show_amenities' => array( + 'field' => 'list_show_amenities', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Show Packages + 'list_show_packages' => array( + 'field' => 'list_show_packages', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Show Link to Packages + 'list_show_packages_link' => array( + 'field' => 'list_show_packages_link', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member List - Show Live Cam + 'list_show_live_cam' => array( + 'field' => 'list_show_live_cam', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + /* + * Front-end Member Listing Map Options + */ + + + // Google Map Opened + 'list_map_show_opened' => array( + 'field' => 'list_map_show_opened', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Detail Link + 'list_map_show_detaillink' => array( + 'field' => 'list_map_show_detaillink', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Logo + 'list_map_show_logo' => array( + 'field' => 'list_map_show_logo', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Logo Size + 'list_map_logo_size' => array( + 'field' => 'list_map_logo_size', + 'type' => 'list', + 'list' => $this->config['image_sizes'], + 'force_list' => true, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Description + 'list_map_show_descr' => array( + 'field' => 'list_map_show_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Short Description + 'list_map_show_short_descr' => array( + 'field' => 'list_map_show_short_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Address + 'list_map_show_address' => array( + 'field' => 'list_map_show_address', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Street + 'list_map_show_street' => array( + 'field' => 'list_map_show_street', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show City, State, ZIP + 'list_map_show_citystatezip' => array( + 'field' => 'list_map_show_citystatezip', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Country + 'list_map_show_country' => array( + 'field' => 'list_map_show_country', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Region + 'list_map_show_region' => array( + 'field' => 'list_map_show_region', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Phone + 'list_map_show_phon' => array( + 'field' => 'list_map_show_phone', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Toll Free + 'list_map_show_tollfree' => array( + 'field' => 'list_map_show_tollfree', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show URL + 'list_map_show_url' => array( + 'field' => 'list_map_show_url', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show URL With New Target + 'list_map_show_url_newtarget' => array( + 'field' => 'list_map_show_url_newtarget', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show E-Mail + 'list_map_show_email' => array( + 'field' => 'list_map_show_email', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Categories + 'list_map_show_categories' => array( + 'field' => 'list_map_show_categories', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Credit Cards + 'list_map_show_creditcards' => array( + 'field' => 'list_map_show_creditcards', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - Map Show amenities + 'list_map_show_amenities' => array( + 'field' => 'list_map_show_amenities', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + /* + * Front-end Member Detail Page Options + */ + + // Front-end Member Detail - Show Map + 'detail_show_map' => array( + 'field' => 'detail_show_map', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Listings - How far from the top the sticky Search/Filters box should hover + 'detail_top_offset_autoscroll' => array( + 'field' => 'detail_top_offset_autoscroll', + 'type' => 'integer', + 'default' => 0, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Directions + 'detail_show_directions' => array( + 'field' => 'detail_show_directions', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Logo + 'detail_show_logo' => array( + 'field' => 'detail_show_logo', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Logo Size + 'detail_logo_size' => array( + 'field' => 'detail_logo_size', + 'type' => 'list', + 'list' => $this->config['image_sizes'], + 'force_list' => true, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Description + 'detail_show_descr' => array( + 'field' => 'detail_show_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Short Description + 'detail_show_short_descr' => array( + 'field' => 'detail_show_short_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Address + 'detail_show_address' => array( + 'field' => 'detail_show_address', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Street + 'detail_show_street' => array( + 'field' => 'detail_show_street', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show City, State, ZIP + 'detail_show_citystatezip' => array( + 'field' => 'detail_show_citystatezip', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Country + 'detail_show_country' => array( + 'field' => 'detail_show_country', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Region + 'detail_show_region' => array( + 'field' => 'detail_show_region', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Phone + 'detail_show_phone' => array( + 'field' => 'detail_show_phone', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Toll Free + 'detail_show_tollfree' => array( + 'field' => 'detail_show_tollfree', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show URL + 'detail_show_url' => array( + 'field' => 'detail_show_url', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show URL With New Target + 'detail_show_url_newtarget' => array( + 'field' => 'detail_show_url_newtarget', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show E-Mail + 'detail_show_email' => array( + 'field' => 'detail_show_email', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Categories + 'detail_show_categories' => array( + 'field' => 'detail_show_categories', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Credit Cards + 'detail_show_creditcards' => array( + 'field' => 'detail_show_creditcards', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Amenities + 'detail_show_amenities' => array( + 'field' => 'detail_show_amenities', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Image Gallery + 'detail_show_imagegallery' => array( + 'field' => 'detail_show_imagegallery', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Coupons + 'detail_show_coupons' => array( + 'field' => 'detail_show_coupons', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Packages + 'detail_show_packages' => array( + 'field' => 'detail_show_packages', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Events + 'detail_show_events' => array( + 'field' => 'detail_show_events', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Video + 'detail_show_video' => array( + 'field' => 'detail_show_video', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Live Cam + 'detail_show_live_cam' => array( + 'field' => 'detail_show_live_cam', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + /* + * Front-end Member Detail Map Options + */ + + // Front-end Detail - Map Show Logo + 'detail_map_show_logo' => array( + 'field' => 'detail_map_show_logo', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Logo Size + 'detail_map_logo_size' => array( + 'field' => 'detail_map_logo_size', + 'type' => 'list', + 'list' => $this->config['image_sizes'], + 'force_list' => true, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Description + 'detail_map_show_descr' => array( + 'field' => 'detail_map_show_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Short Description + 'detail_map_show_short_descr' => array( + 'field' => 'detail_map_show_short_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Address + 'detail_map_show_address' => array( + 'field' => 'detail_map_show_address', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Street + 'detail_map_show_street' => array( + 'field' => 'detail_map_show_street', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show City, State, ZIP + 'detail_map_show_citystatezip' => array( + 'field' => 'detail_map_show_citystatezip', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Country + 'detail_map_show_country' => array( + 'field' => 'detail_map_show_country', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Region + 'detail_map_show_region' => array( + 'field' => 'detail_map_show_region', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Phone + 'detail_map_show_phon' => array( + 'field' => 'detail_map_show_phone', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Toll Free + 'detail_map_show_tollfree' => array( + 'field' => 'detail_map_show_tollfree', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show URL + 'detail_map_show_url' => array( + 'field' => 'detail_map_show_url', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show URL With New Target + 'detail_map_show_url_newtarget' => array( + 'field' => 'detail_map_show_url_newtarget', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Email + 'detail_map_show_email' => array( + 'field' => 'detail_map_show_email', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Categories + 'detail_map_show_categories' => array( + 'field' => 'detail_map_show_categories', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Credit Cards + 'detail_map_show_creditcards' => array( + 'field' => 'detail_map_show_creditcards', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show amenities + 'detail_map_show_amenities' => array( + 'field' => 'detail_map_show_amenities', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + /* + * Front-end Member Detail Map Options + */ + + // Front-end Detail - Map Show amenities + 'members_only_support_email' => array( + 'field' => 'members_only_support_email', + 'type' => 'text', + 'use' => 'a' + ), + + // Front-end Detail - Map Show Logo + 'members_only_support_phone' => array( + 'field' => 'members_only_support_phone', + 'type' => 'text', + 'use' => 'a' + ) ); diff --git a/classes/data/settings/dataSettingsTerms.php b/classes/data/settings/dataSettingsTerms.php index 64451238..61f2a2b6 100644 --- a/classes/data/settings/dataSettingsTerms.php +++ b/classes/data/settings/dataSettingsTerms.php @@ -88,15 +88,15 @@ class GlmDataSettingsTerms extends GlmDataAbstract { // If this class is not being extended along with existing $wpdb and $config - if (!$this->wpdb) { + if (!$this->wpdb) { - // Save WordPress Database object - $this->wpdb = $wpdb; + // Save WordPress Database object + $this->wpdb = $wpdb; - // Save plugin configuration object - $this->config = $config; + // Save plugin configuration object + $this->config = $config; - } + } /* * Table Name @@ -108,339 +108,339 @@ class GlmDataSettingsTerms extends GlmDataAbstract */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - /* - * Admin Menu Names - */ - - // Menu Members - 'term_admin_menu_members' => array( - 'field' => 'term_admin_menu_members', - 'type' => 'text', - 'use' => 'a' - ), - - // Sub Menu Member List - 'term_admin_menu_members_list' => array( - 'field' => 'term_admin_menu_member_list', - 'type' => 'text', - 'use' => 'a' - ), - - // Menu Member - 'term_admin_menu_member' => array( - 'field' => 'term_admin_menu_member', - 'type' => 'text', - 'use' => 'a' - ), - - // Menu Configure - 'term_admin_menu_configure' => array( - 'field' => 'term_admin_menu_configure', - 'type' => 'text', - 'use' => 'a' - ), - - // Menu Settings - 'term_admin_menu_settings' => array( - 'field' => 'term_admin_menu_settings', - 'type' => 'text', - 'use' => 'a' - ), - - // Menu Shortcodes - 'term_admin_menu_shortcodes' => array( - 'field' => 'term_admin_menu_shortcodes', - 'type' => 'text', - 'use' => 'a' - ), - - /* - * Admin Page Tabs - */ - - // Tab Members/Main Dashboard - 'term_admin_menu_members_dashboard' => array( - 'field' => 'term_admin_menu_members_dashboard', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Members/List of Members - 'term_admin_menu_members_list' => array( - 'field' => 'term_admin_menu_members_list', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Members/Reports - 'term_admin_menu_members_reports' => array( - 'field' => 'term_admin_menu_members_reports', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Member/Member Dashboard - 'term_admin_menu_member_dashboard' => array( - 'field' => 'term_admin_menu_member_dashboard', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Member/Member Info - 'term_admin_menu_member_info' => array( - 'field' => 'term_admin_menu_member_info', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Member/Locations - 'term_admin_menu_member_locations' => array( - 'field' => 'term_admin_menu_member_locations', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Member/Facilities - 'term_admin_menu_member_facilities' => array( - 'field' => 'term_admin_menu_member_facilities', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Member/Attractions - 'term_admin_menu_member_attractions' => array( - 'field' => 'term_admin_menu_member_attractions', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Member/Contacts - 'term_admin_menu_member_contacts' => array( - 'field' => 'term_admin_menu_member_contacts', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Configure/Member Types - 'term_admin_menu_configure_member_types' => array( - 'field' => 'term_admin_menu_configure_member_types', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Configure/Member Categories - 'term_admin_menu_configure_member_cats' => array( - 'field' => 'term_admin_menu_configure_member_cats', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Configure/Accommodation Types - 'term_admin_menu_configure_accom_types' => array( - 'field' => 'term_admin_menu_configure_accom_types', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Configure/Amenities - 'term_admin_menu_configure_amenities' => array( - 'field' => 'term_admin_menu_configure_amenities', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Configure/Cities - 'term_admin_menu_configure_cities' => array( - 'field' => 'term_admin_menu_configure_cities', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Configure/Regions - 'term_admin_menu_configure_regions' => array( - 'field' => 'term_admin_menu_configure_regions', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Settings/General Settings - 'term_admin_menu_settings_general' => array( - 'field' => 'term_admin_menu_settings_general', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Settings/Terms and Phrases - 'term_admin_menu_settings_terms' => array( - 'field' => 'term_admin_menu_settings_terms', - 'type' => 'text', - 'use' => 'a' - ), - - // Tab Settings/Development - 'term_admin_menu_settings_development' => array( - 'field' => 'term_admin_menu_settings_development', - 'type' => 'text', - 'use' => 'a' - ), - - /* - * General Terms - */ - - // Member - 'term_member' => array( - 'field' => 'term_member', - 'type' => 'text', - 'use' => 'a' - ), - - // Member Cap - 'term_member_cap' => array( - 'field' => 'term_member_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Member Plural - 'term_member_plur' => array( - 'field' => 'term_member_plur', - 'type' => 'text', - 'use' => 'a' - ), - - // Member Plural Cap - 'term_member_plur_cap' => array( - 'field' => 'term_member_plur_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Location - 'term_location' => array( - 'field' => 'term_location', - 'type' => 'text', - 'use' => 'a' - ), - - // Location Cap - 'term_location_cap' => array( - 'field' => 'term_location_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Location Plur - 'term_location_plur' => array( - 'field' => 'term_location_plur', - 'type' => 'text', - 'use' => 'a' - ), - - // Location Plur Cap - 'term_location_plur_cap' => array( - 'field' => 'term_location_plur_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Facility - 'term_facility' => array( - 'field' => 'term_facility', - 'type' => 'text', - 'use' => 'a' - ), - - // Facility Cap - 'term_facility_cap' => array( - 'field' => 'term_facility_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Facility Plur - 'term_facility_plur' => array( - 'field' => 'term_facility_plur', - 'type' => 'text', - 'use' => 'a' - ), - - // Facility Plur Cap - 'term_facility_plur_cap' => array( - 'field' => 'term_facility_plur_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Attraction - 'term_attraction' => array( - 'field' => 'term_attraction', - 'type' => 'text', - 'use' => 'a' - ), - - // Attraction Cap - 'term_attraction_cap' => array( - 'field' => 'term_attraction_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Attraction Plur - 'term_attraction_plur' => array( - 'field' => 'term_attraction_plur', - 'type' => 'text', - 'use' => 'a' - ), - - // Attraction Plur Cap - 'term_attraction_plur_cap' => array( - 'field' => 'term_attraction_plur_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Contact - 'term_contact' => array( - 'field' => 'term_contact', - 'type' => 'text', - 'use' => 'a' - ), - - // Contact Cap - 'term_contact_cap' => array( - 'field' => 'term_contact_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Contact Plur - 'term_contact_plur' => array( - 'field' => 'term_contact_plur', - 'type' => 'text', - 'use' => 'a' - ), - - // Contact Plur Cap - 'term_contact_plur_cap' => array( - 'field' => 'term_contact_plur_cap', - 'type' => 'text', - 'use' => 'a' - ), - - // Live Camera Cap - 'term_webcam_cap' => array( - 'field' => 'term_webcam_cap', - 'type' => 'text', - 'use' => 'a' - ) + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + /* + * Admin Menu Names + */ + + // Menu Members + 'term_admin_menu_members' => array( + 'field' => 'term_admin_menu_members', + 'type' => 'text', + 'use' => 'a' + ), + + // Sub Menu Member List + 'term_admin_menu_members_list' => array( + 'field' => 'term_admin_menu_member_list', + 'type' => 'text', + 'use' => 'a' + ), + + // Menu Member + 'term_admin_menu_member' => array( + 'field' => 'term_admin_menu_member', + 'type' => 'text', + 'use' => 'a' + ), + + // Menu Configure + 'term_admin_menu_configure' => array( + 'field' => 'term_admin_menu_configure', + 'type' => 'text', + 'use' => 'a' + ), + + // Menu Settings + 'term_admin_menu_settings' => array( + 'field' => 'term_admin_menu_settings', + 'type' => 'text', + 'use' => 'a' + ), + + // Menu Shortcodes + 'term_admin_menu_shortcodes' => array( + 'field' => 'term_admin_menu_shortcodes', + 'type' => 'text', + 'use' => 'a' + ), + + /* + * Admin Page Tabs + */ + + // Tab Members/Main Dashboard + 'term_admin_menu_members_dashboard' => array( + 'field' => 'term_admin_menu_members_dashboard', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Members/List of Members + 'term_admin_menu_members_list' => array( + 'field' => 'term_admin_menu_members_list', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Members/Reports + 'term_admin_menu_members_reports' => array( + 'field' => 'term_admin_menu_members_reports', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Member Dashboard + 'term_admin_menu_member_dashboard' => array( + 'field' => 'term_admin_menu_member_dashboard', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Member Info + 'term_admin_menu_member_info' => array( + 'field' => 'term_admin_menu_member_info', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Locations + 'term_admin_menu_member_locations' => array( + 'field' => 'term_admin_menu_member_locations', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Facilities + 'term_admin_menu_member_facilities' => array( + 'field' => 'term_admin_menu_member_facilities', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Attractions + 'term_admin_menu_member_attractions' => array( + 'field' => 'term_admin_menu_member_attractions', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Contacts + 'term_admin_menu_member_contacts' => array( + 'field' => 'term_admin_menu_member_contacts', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Member Types + 'term_admin_menu_configure_member_types' => array( + 'field' => 'term_admin_menu_configure_member_types', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Member Categories + 'term_admin_menu_configure_member_cats' => array( + 'field' => 'term_admin_menu_configure_member_cats', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Accommodation Types + 'term_admin_menu_configure_accom_types' => array( + 'field' => 'term_admin_menu_configure_accom_types', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Amenities + 'term_admin_menu_configure_amenities' => array( + 'field' => 'term_admin_menu_configure_amenities', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Cities + 'term_admin_menu_configure_cities' => array( + 'field' => 'term_admin_menu_configure_cities', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Regions + 'term_admin_menu_configure_regions' => array( + 'field' => 'term_admin_menu_configure_regions', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Settings/General Settings + 'term_admin_menu_settings_general' => array( + 'field' => 'term_admin_menu_settings_general', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Settings/Terms and Phrases + 'term_admin_menu_settings_terms' => array( + 'field' => 'term_admin_menu_settings_terms', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Settings/Development + 'term_admin_menu_settings_development' => array( + 'field' => 'term_admin_menu_settings_development', + 'type' => 'text', + 'use' => 'a' + ), + + /* + * General Terms + */ + + // Member + 'term_member' => array( + 'field' => 'term_member', + 'type' => 'text', + 'use' => 'a' + ), + + // Member Cap + 'term_member_cap' => array( + 'field' => 'term_member_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Member Plural + 'term_member_plur' => array( + 'field' => 'term_member_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Member Plural Cap + 'term_member_plur_cap' => array( + 'field' => 'term_member_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Location + 'term_location' => array( + 'field' => 'term_location', + 'type' => 'text', + 'use' => 'a' + ), + + // Location Cap + 'term_location_cap' => array( + 'field' => 'term_location_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Location Plur + 'term_location_plur' => array( + 'field' => 'term_location_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Location Plur Cap + 'term_location_plur_cap' => array( + 'field' => 'term_location_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility + 'term_facility' => array( + 'field' => 'term_facility', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility Cap + 'term_facility_cap' => array( + 'field' => 'term_facility_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility Plur + 'term_facility_plur' => array( + 'field' => 'term_facility_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility Plur Cap + 'term_facility_plur_cap' => array( + 'field' => 'term_facility_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Attraction + 'term_attraction' => array( + 'field' => 'term_attraction', + 'type' => 'text', + 'use' => 'a' + ), + + // Attraction Cap + 'term_attraction_cap' => array( + 'field' => 'term_attraction_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Attraction Plur + 'term_attraction_plur' => array( + 'field' => 'term_attraction_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Attraction Plur Cap + 'term_attraction_plur_cap' => array( + 'field' => 'term_attraction_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact + 'term_contact' => array( + 'field' => 'term_contact', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact Cap + 'term_contact_cap' => array( + 'field' => 'term_contact_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact Plur + 'term_contact_plur' => array( + 'field' => 'term_contact_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact Plur Cap + 'term_contact_plur_cap' => array( + 'field' => 'term_contact_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Live Camera Cap + 'term_webcam_cap' => array( + 'field' => 'term_webcam_cap', + 'type' => 'text', + 'use' => 'a' + ) ); @@ -448,7 +448,6 @@ class GlmDataSettingsTerms extends GlmDataAbstract if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } - } } diff --git a/classes/data/settings/dataSettingsTheme.php b/classes/data/settings/dataSettingsTheme.php index e9b19a04..65f495c4 100644 --- a/classes/data/settings/dataSettingsTheme.php +++ b/classes/data/settings/dataSettingsTheme.php @@ -88,15 +88,15 @@ class GlmDataSettingsTheme extends GlmDataAbstract { // If this class is not being extended along with existing $wpdb and $config - if (!$this->wpdb) { + if (!$this->wpdb) { - // Save WordPress Database object - $this->wpdb = $wpdb; + // Save WordPress Database object + $this->wpdb = $wpdb; - // Save plugin configuration object - $this->config = $config; + // Save plugin configuration object + $this->config = $config; - } + } /* * Table Name @@ -108,19 +108,18 @@ class GlmDataSettingsTheme extends GlmDataAbstract */ $this->fields = array( - 'id' => array( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ) + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ) ); if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } - } } diff --git a/classes/glmMemberImportFromConnections.php b/classes/glmMemberImportFromConnections.php index e7c9dd54..c89dff80 100644 --- a/classes/glmMemberImportFromConnections.php +++ b/classes/glmMemberImportFromConnections.php @@ -74,7 +74,7 @@ class GlmMemberImportFromConnections $sql = " SELECT count(id) AS count FROM ".$this->wpdb->prefix."connections - ;"; + ;"; $c = $this->wpdb->get_row($sql, ARRAY_A); $queryError = $this->wpdb->last_error; if ($queryError) { @@ -100,7 +100,7 @@ class GlmMemberImportFromConnections $sql = " SELECT * FROM ".$this->wpdb->prefix."connections - ;"; + ;"; $list = $this->wpdb->get_results($sql, ARRAY_A); $queryError = $this->wpdb->last_error; @@ -459,8 +459,8 @@ class GlmMemberImportFromConnections $membID, '".addslashes($m['organization'])."', ".($m['status'] == 'approved' ? - $this->config['status_numb']['Active'] : - $this->config['status_numb']['Inactive'] + $this->config['status_numb']['Active'] : + $this->config['status_numb']['Inactive'] ).", 'Imported from Connections Business Listing', '".addslashes($m['bio'])."', @@ -501,15 +501,15 @@ class GlmMemberImportFromConnections // Add to category_member_info table $sql = " INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info - ( - category, - member_info - ) + ( + category, + member_info + ) VALUES - ( - ".$cats[$mc['term_taxonomy_id']]['new_id'].", - $membID - ) + ( + ".$cats[$mc['term_taxonomy_id']]['new_id'].", + $membID + ) ;"; $this->wpdb->query($sql); $queryError = $this->wpdb->last_error; diff --git a/classes/glmPluginSupport.php b/classes/glmPluginSupport.php index d0a8cbf6..03f2b44e 100644 --- a/classes/glmPluginSupport.php +++ b/classes/glmPluginSupport.php @@ -283,32 +283,32 @@ return; // Off for now ** Need to make this switchable in management if ( !$existingPost) { - // Put together the new page, then update the option with the new ID - $templateUsed = isset($requiredPageInfo['template']) ? $requiredPageInfo['template'] : 'index.php'; - $new_id = $this->insertReqPage( - $requiredPageInfo['title'], - $requiredPageInfo['content'], - 'publish', - 'page', - '1', - $templateUsed, - $postParent - ); - update_option($option, $new_id); - - // Make extra page if members only is created - if ($new_id == get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID)) { - $this->insertReqPage( - 'Members Only Sample Subpage', - 'This page will automatically be locked to Members Only with the members-only-template', - 'publish', - 'page', - '1', - $templateUsed, - $new_id - ); + // Put together the new page, then update the option with the new ID + $templateUsed = isset($requiredPageInfo['template']) ? $requiredPageInfo['template'] : 'index.php'; + $new_id = $this->insertReqPage( + $requiredPageInfo['title'], + $requiredPageInfo['content'], + 'publish', + 'page', + '1', + $templateUsed, + $postParent + ); + update_option($option, $new_id); + + // Make extra page if members only is created + if ($new_id == get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID)) { + $this->insertReqPage( + 'Members Only Sample Subpage', + 'This page will automatically be locked to Members Only with the members-only-template', + 'publish', + 'page', + '1', + $templateUsed, + $new_id + ); - } + } } else { // No page created } diff --git a/views/admin/member/memberInfo.html b/views/admin/member/memberInfo.html index a2c634df..6617b741 100644 --- a/views/admin/member/memberInfo.html +++ b/views/admin/member/memberInfo.html @@ -168,14 +168,14 @@ Amenities - {if isset($memberInfo.fieldData.amenities) && $memberInfo.fieldData.amenities} - {foreach from=$memberInfo.fieldData.amenities item=c} + {if isset($memberInfo.fieldData.amenities) && $memberInfo.fieldData.amenities} + {foreach from=$memberInfo.fieldData.amenities item=c}
{$c.name} -
- {/foreach} - {/if} + + {/foreach} + {/if} Notes:{$memberInfo.fieldData.notes} @@ -183,31 +183,30 @@ Image Gallery