From b1240b935a2c7b3241065d7694f844ffbb2e5fba Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Wed, 10 Jun 2015 14:22:44 -0400 Subject: [PATCH] Adding more settings for new settings pages. Added settings for member urls to use new targets. --- classes/data/settings/dataSettingsGeneral.php | 342 ++++++++++++++++-- config/plugin.ini | 8 +- misc/databaseScripts/create_database_V0.1.sql | 38 +- views/front/members/detail.html | 2 +- views/front/members/list.html | 4 +- 5 files changed, 362 insertions(+), 32 deletions(-) diff --git a/classes/data/settings/dataSettingsGeneral.php b/classes/data/settings/dataSettingsGeneral.php index 37100b18..dc7ea0ae 100644 --- a/classes/data/settings/dataSettingsGeneral.php +++ b/classes/data/settings/dataSettingsGeneral.php @@ -155,7 +155,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'google_maps_api_key' => array( 'field' => 'google_maps_api_key', 'type' => 'text', - 'use' => 'lg' + 'use' => 'a' ), // Google Maps Default Latitude @@ -180,7 +180,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'time_zone' => array( 'field' => 'time_zone', 'type' => 'text', - 'use' => 'lg' + 'use' => 'a' ), /* @@ -192,7 +192,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_map', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show List @@ -200,7 +200,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_list', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Search Form @@ -208,7 +208,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_search', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Search Text @@ -216,7 +216,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_search_text', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Search Category @@ -224,7 +224,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_search_category', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Search Amenities @@ -232,7 +232,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_search_amenities', 'type' => 'checkbox', 'default' => false, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Search Alpha @@ -240,7 +240,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_search_alpha', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), /* @@ -251,14 +251,14 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'list_show_detail_link' => array( 'field' => 'list_show_detail_link', 'type' => 'checkbox', - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Logo 'list_show_logo' => array( 'field' => 'list_show_logo', 'type' => 'checkbox', - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Logo Size @@ -267,7 +267,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'type' => 'list', 'list' => $this->config['image_sizes'], 'required' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Address @@ -275,14 +275,14 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_address', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Street 'list_show_street' => array( 'field' => 'list_show_Street', 'type' => 'checkbox', - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show City, State, ZIP @@ -290,7 +290,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_citystatezip', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show country @@ -298,7 +298,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_country', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Region @@ -306,7 +306,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_region', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Description @@ -314,7 +314,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_descr', 'type' => 'checkbox', 'default' => false, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Short Description @@ -322,7 +322,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_short_descr', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show phone @@ -330,7 +330,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_phone', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Toll Free @@ -338,7 +338,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_tollfree', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show URL @@ -346,7 +346,15 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_url', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + '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 Categories @@ -354,7 +362,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_categories', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Credit Cards @@ -362,7 +370,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_creditcards', 'type' => 'checkbox', 'default' => true, - 'use' => 'lg' + 'use' => 'a' ), // Front-end Listings - Show Amenities @@ -370,14 +378,298 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_show_amenities', 'type' => 'checkbox', 'default' => false, - 'use' => 'lg' + 'use' => 'a' + ), + + /* + * Front-end Member Listing Map Options + */ + + // 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'], + 'required' => true, + 'use' => 'a' + ), + + // Front-end Listings - Map Show Description + 'list_map_show_description' => array( + 'field' => 'list_map_show_description', + '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 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 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'], + 'required' => true, + 'use' => 'a' + ), + + // Front-end Member Detail - Show Description + 'detail_show_description' => array( + 'field' => 'detail_show_description', + '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 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' + ) ); diff --git a/config/plugin.ini b/config/plugin.ini index 328ded26..4263698b 100644 --- a/config/plugin.ini +++ b/config/plugin.ini @@ -87,6 +87,7 @@ front-config['list_show_short_descr'] = false front-config['list_show_phone'] = true front-config['list_show_tollfree'] = true front-config['list_show_url'] = true +front-config['list_show_url_newtarget'] = true front-config['list_show_categories'] = false front-config['list_show_creditcards'] = false front-config['list_show_amenities'] = false @@ -104,25 +105,26 @@ front-config['list_map_show_region'] = true front-config['list_map_show_phone'] = true front-config['list_map_show_tollfree'] = true front-config['list_map_show_url'] = true +front-config['list_map_show_url_newtarget'] = true front-config['list_map_show_categories'] = true front-config['list_map_show_creditcards'] = true front-config['list_map_show_amenities'] = false ; Front-end Member Detail Options front-config['detail_show_map'] = true front-config['detail_show_directions'] = true -front-config['detail_show_detaillink'] = true front-config['detail_show_logo'] = true front-config['detail_logo_size'] = large +front-config['detail_show_description'] = true +front-config['detail_show_short_descr'] = false front-config['detail_show_address'] = true front-config['detail_show_street'] = true front-config['detail_show_citystatezip'] = true front-config['detail_show_country'] = true front-config['detail_show_region'] = true -front-config['detail_show_description'] = true -front-config['detail_show_short_descr'] = false front-config['detail_show_phone'] = true front-config['detail_show_tollfree'] = true front-config['detail_show_url'] = true +front-config['detail_show_url_newtarget'] = true front-config['detail_show_categories'] = true front-config['detail_show_creditcards'] = true front-config['detail_show_amenities'] = true diff --git a/misc/databaseScripts/create_database_V0.1.sql b/misc/databaseScripts/create_database_V0.1.sql index 85dd1b12..885865dc 100644 --- a/misc/databaseScripts/create_database_V0.1.sql +++ b/misc/databaseScripts/create_database_V0.1.sql @@ -486,6 +486,7 @@ CREATE TABLE {prefix}settings_general ( list_show_map BOOLEAN NULL, list_show_list BOOLEAN NULL, list_show_search BOOLEAN NULL, + list_show_search_text BOOLEAN NULL, list_show_search_category BOOLEAN NULL, list_show_search_amenities BOOLEAN NULL, list_show_search_alphja BOOLEAN NULL, @@ -502,10 +503,45 @@ CREATE TABLE {prefix}settings_general ( list_show_phone BOOLEAN NULL, list_show_tollfree BOOLEAN NULL, list_show_url BOOLEAN NULL, + list_show_url_newtarget BOOLEAN NULL, list_show_categories BOOLEAN NULL, list_show_creditcards BOOLEAN NULL, list_show_amenities BOOLEAN NULL, - + list_map_show_detaillink BOOLEAN NULL, + list_map_show_logo BOOLEAN NULL, + list_map_logo_size TINYTEXT NULL, + list_map_show_description BOOLEAN NULL, + list_map_show_short_description BOOLEAN NULL, + list_map_show_address BOOLEAN NULL, + list_map_show_street BOOLEAN NULL, + list_map_show_citystatezip BOOLEAN NULL, + list_map_show_country BOOLEAN NULL, + list_map_show_region BOOLEAN NULL, + list_map_show_phone BOOLEAN NULL, + list_map_show_tollfree BOOLEAN NULL, + list_map_show_url BOOLEAN NULL, + list_map_show_url_newtarget BOOLEAN NULL, + list_map_show_categories BOOLEAN NULL, + list_map_show_creditcards BOOLEAN NULL, + list_map_show_amenities BOOLEAN NULL, + detail_show_map BOOLEAN NULL, + detail_show_directions BOOLEAN NULL, + detail_show_logo BOOLEAN NULL, + detail_show_logo_size TINYTEXT NULL, + detail_show_description BOOLEAN NULL, + detail_show_short_description BOOLEAN NULL, + detail_show_address BOOLEAN NULL, + detail_show_street BOOLEAN NULL, + detail_show_citystatezip BOOLEAN NULL, + detail_show_country BOOLEAN NULL, + detail_show_region BOOLEAN NULL, + detail_show_phone BOOLEAN NULL, + detail_show_tollfree BOOLEAN NULL, + detail_show_url BOOLEAN NULL, + detail_show_url_newtarget BOOLEAN NULL, + detail_show_categories BOOLEAN NULL, + detail_show_creditcards BOOLEAN NULL, + detail_show_amenities BOOLEAN NULL, PRIMARY KEY (id) ); diff --git a/views/front/members/detail.html b/views/front/members/detail.html index 4112a27f..e3d90d45 100644 --- a/views/front/members/detail.html +++ b/views/front/members/detail.html @@ -69,7 +69,7 @@ {/if} {*list_show_address*} {if $member.phone && $detail_show_phone}
Phone: {$member.phone}{/if} {if $member.toll_free && $detail_show_tollfree}
Toll Free: {$member.toll_free}{/if} - {if $member.url && $detail_show_url}
Web site: {$member.url}{/if} + {if $member.url && $detail_show_url}
Web site: {$member.url}{/if} {if $member.region.value && $detail_show_region}
Region: {$member.region.name}{/if} diff --git a/views/front/members/list.html b/views/front/members/list.html index 8ffd3b69..b16ab950 100644 --- a/views/front/members/list.html +++ b/views/front/members/list.html @@ -86,7 +86,7 @@ {/if} {*list_show_address*} {if $m.phone && $list_show_phone}
Phone: {$m.phone}{/if} {if $m.toll_free && $list_show_tollfree}
Toll Free: {$m.toll_free}{/if} - {if $m.url && $list_show_url}
Web site: {$m.url}{/if} + {if $m.url && $list_show_url}
Web site: {$m.url}{/if} {if $m.region.value && $list_show_region}

Region: {$m.region.name}{/if} @@ -161,7 +161,7 @@

{if $m.phone && $list_map_show_phone}Phone: {$m.phone}
{/if} {if $m.toll_free && $list_map_show_tollfree}Toll Free: {$m.toll_free}
{/if} - {if $m.url && $list_map_show_url}Web site: {$m.url}
{/if} + {if $m.url && $list_map_show_url}Web site: {$m.url}
{/if} {if $m.region.value && $list_map_show_region}

Region: {$m.region.name}

{/if}

{if $m.descr && $list_map_show_description}{$m.descr}
{/if} -- 2.17.1