From: Chuck Scott Date: Wed, 3 Jun 2015 15:53:17 +0000 (-0400) Subject: Fixed current url definition X-Git-Tag: v1.0.0~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=971774c3bd7b23053322dff96e877ef73401931b;p=WP-Plugins%2Fglm-member-db.git Fixed current url definition --- diff --git a/defines.php b/defines.php index 569d8f65..38e1ff91 100644 --- a/defines.php +++ b/defines.php @@ -26,13 +26,16 @@ define('GLM_MEMBERS_PLUGIN_HTTP_PROTOCOL', $pageProtocol); define('GLM_MEMBERS_PLUGIN_VERSION', 0.1); define('GLM_MEMBERS_PLUGIN_DB_VERSION', 0.1); +// Get various pieces of the URL +$urlParts = parse_url(get_bloginfo('url')); +$pageUri = explode('?', $_SERVER['REQUEST_URI']); // Bust this up to access URL path and script name only + // URLs $adminURL = admin_url('admin.php'); define('GLM_MEMBERS_PLUGIN_ADMIN_URL', $adminURL); define('GLM_MEMBERS_PLUGIN_URL', plugin_dir_url(__FILE__)); -$pageUri = explode('?', $_SERVER['REQUEST_URI']); // Bust this up to access URL path and script name only define('GLM_MEMBERS_PLUGIN_BASE_URL', WP_PLUGIN_URL.'/'.GLM_MEMBERS_PLUGIN_DIR); -define('GLM_MEMBERS_PLUGIN_CURRENT_URL', get_bloginfo('url').$pageUri[0]); +define('GLM_MEMBERS_PLUGIN_CURRENT_URL', $urlParts['scheme'].'://'.$urlParts['host'].$pageUri[0]); define('GLM_MEMBERS_PLUGIN_MEDIA_URL', WP_CONTENT_URL.'/plugins/'.GLM_MEMBERS_PLUGIN_DIR.'/media'); // Directories diff --git a/views/front/members/list.html b/views/front/members/list.html index 68552bc9..8ffd3b69 100644 --- a/views/front/members/list.html +++ b/views/front/members/list.html @@ -4,7 +4,7 @@ {if $list_show_map} -
(map loads here)
+
(map loads here)
{/if} {if $list_show_search} @@ -61,7 +61,9 @@
{if $m.logo && $list_show_logo} -
+
+ +
{/if}
@@ -211,7 +213,7 @@ */ // Create a Google Map object - var map = new google.maps.Map(document.getElementById('locationMap'), { + var map = new google.maps.Map(document.getElementById('glm-locationMap'), { center: new google.maps.LatLng({$mapDefaultLat}, {$mapDefaultLon}), zoom: {$mapDefaultZoom}, disableDefaultUI: false,