Fixed current url definition
authorChuck Scott <cscott@gaslightmedia.com>
Wed, 3 Jun 2015 15:53:17 +0000 (11:53 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Wed, 3 Jun 2015 15:53:17 +0000 (11:53 -0400)
defines.php
views/front/members/list.html

index 569d8f6..38e1ff9 100644 (file)
@@ -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
index 68552bc..8ffd3b6 100644 (file)
@@ -4,7 +4,7 @@
         <script src="http://maps.googleapis.com/maps/api/js?sensor=true&key={$googleMapsBrowserApiKey}"></script>
 
 {if $list_show_map}
-        <div id="locationMap" class="glm-map">(map loads here)</div>
+        <div id="glm-locationMap" class="glm-map">(map loads here)</div>
 {/if}
 
 {if $list_show_search}
@@ -61,7 +61,9 @@
                 <div class="row">
 <!-- Member Logo - Small -->                    
                 {if $m.logo && $list_show_logo}
-                    <div class="small-12 show-for-small-only columns"><img class="glm-member-list-image-left" src="{$glmPluginMediaURL}/images/{$list_logo_size}/{$m.logo}"></div>
+                    <div class="small-12 show-for-small-only columns">
+                        <img class="glm-member-list-image-left" src="{$glmPluginMediaURL}/images/{$list_logo_size}/{$m.logo}">
+                    </div>
                 {/if}
                     <div class="small-12 medium-8 columns">
 <!-- Member name, address, and basic information -->                    
                  */
                 
                 // 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,