update member profile pages
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 8 Jul 2013 15:49:36 +0000 (15:49 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 8 Jul 2013 15:49:36 +0000 (15:49 +0000)
Adding fancybox to the logo.
Adding lat lon to profile page.
Removing uneeded js files

Toolkit/Members.php
Toolkit/Members/ProfilePage.php
Toolkit/Members/ProfileWriter.php
Toolkit/Members/templates/memberDetail.tpl
Toolkit/Membersonly.php
Toolkit/Page.php

index 65591eb..3a91e93 100644 (file)
@@ -342,16 +342,16 @@ class Toolkit_Members
                 . 'libjs/jqueryui/1.8.13/js/jquery-ui-1.8.13.custom.min.js';
                        $GLOBALS['bottomScripts'][]
                                = BASE_URL . 'Toolkit/Members/libjs/edit-member.js';
-                       $GLOBALS['bottomScripts'][]
-                               = GLM_APP_BASE_URL . 'gallery/thickbox-3.1.1.js';
+//                     $GLOBALS['bottomScripts'][]
+//                             = GLM_APP_BASE_URL . 'gallery/thickbox-3.1.1.js';
                        $GLOBALS['bottomScripts'][]
                                = GLM_APP_BASE_URL . 'libjs/cluetip/jquery.cluetip.js';
                        $GLOBALS['bottomScripts'][]
                                = GLM_APP_BASE_URL . 'libjs/cluetip/lib/jquery.hoverIntent.js';
                        $GLOBALS['bottomScripts'][]
                                = GLM_APP_BASE_URL . 'libjs/cluetip/lib/jquery.bgiframe.min.js';
-                       $GLOBALS['styleSheets'][]
-                               = GLM_APP_BASE_URL . 'gallery/thickbox.css';
+//                     $GLOBALS['styleSheets'][]
+//                             = GLM_APP_BASE_URL . 'gallery/thickbox.css';
                        $GLOBALS['styleSheets'][]
                                = GLM_APP_BASE_URL . 'libjs/cluetip/jquery.cluetip.css';
             $GLOBALS['topScripts'][]
index 5984a21..18b4d66 100644 (file)
@@ -383,6 +383,7 @@ class Toolkit_Members_ProfilePage
                $this->profile =& $page;
 
                $page->image_path   = $this->imagePath;
+        $page->full_image   = ORIGINAL;
                $page->base_url     = BASE_URL;
         $page->glm_base_url = GLM_APP_BASE_URL;
 
@@ -496,6 +497,14 @@ class Toolkit_Members_ProfilePage
             } else {
                 $page->city = $row['city'];
             }
+            if ($row['lat']) {
+                $latitude = Toolkit_Common::f2LatLon($row['lat'], 'Lat', 'DMS', 2);
+                $page->lat = $latitude['text'];
+            }
+            if ($row['lon']) {
+                $longitude = Toolkit_Common::f2LatLon($row['lon'], 'Lat', 'DMS', 2);
+                $page->lon = $longitude['text'];
+            }
             $page->county_name = $row['county_name'];
             $page->state_name  = $row['state_name'];
             $page->state_abbr  = $row['state_abbr'];
index 32d84ca..d7b2fa1 100644 (file)
@@ -199,14 +199,10 @@ class Toolkit_Members_ProfileWriter implements SplSubject
      */
        public function toHtml(Toolkit_Members_ProfilePage $profile)
        {
-               $GLOBALS['bottomScripts'][]
-                       = GLM_APP_BASE_URL . 'gallery/thickbox-3.1.1.js';
                $GLOBALS['bottomScripts'][]
                        = BASE_URL . 'Toolkit/Members/libjs/business-detail.js';
 
                $GLOBALS['styleSheets'][] = BASE_URL . 'Toolkit/Members/css/member.css';
-               $GLOBALS['styleSheets'][] = GLM_APP_BASE_URL . 'gallery/gallery.css';
-               $GLOBALS['styleSheets'][] = GLM_APP_BASE_URL . 'gallery/thickbox.css';
 
                $profileCache = "Member-{$profile->getMemberId()}";
                $out = $this->_cache->get($profileCache, 'Profile');
index be1b5f2..d655cb3 100644 (file)
@@ -9,9 +9,15 @@
        <div id="top_wrapper">
                <div id="image-box" style="height: 1%; overflow: hidden;">
                        <div flexy:if="logo" id="logo-spot">
+                <a
+                    class="thickbox"
+                    title="{member_name}"
+                    id="member-logo1"
+                    href="{full_image:h}{logo:h}">
                                <img id="member-img-1"
                                         alt="Member Logo Image"
                                         src="{image_path:h}{logo:h}">
+                </a>
                        </div>
                </div>
 
@@ -21,6 +27,8 @@
                                <div flexy:if="hasMailingAddy" class="type">Street Address</div>
                                <div class="street-address">{street:h}</div>
                                <div>
+                    <div flexy:if="lat">Lat: {lat:h}</div>
+                    <div flexy:if="lon">Lon: {lon:h}</div>
                     <!--
                                        <span class="locality" flexy:if="city">{city:h},</span>
                                        <span class="region" title="{state_name:h}">
@@ -37,7 +45,6 @@
                                <div flexy:if="distance"><b>Distance:</b> {distance:h}</div>
                                <div flexy:if="trailtype"><b>TrailType:</b> {trailtype:h}</div>
                                <div flexy:if="terrain"><b>Terrain:</b> {terrain:h}</div>
-                               <div flexy:if="dogs"><b>Dogs:</b> {dogs:h}</div>
                                <div flexy:if="difficulty"><b>Difficulty:</b> {difficulty:h}</div>
 
                        </div>
                <a flexy:foreach="files,k,v" class="file-download pdf external" href="{v[href]:h}">{v[name]:h}</a>
        </div>
 
-       <!--<div flexy:if="photos" id="photo-gallery">
-               <h2>Photo Gallery</h2>
-               <ul id="Gallery" class="gallery">
-            {foreach:photos,photo}
-            <li>
-            {if:photo[alt]}
-                <a
-                    href="{photo[id]:h}"
-                    title="{photo[alt]}"
-                    class="phototitle"
-                    id="phototitle">
-                    {photo[alt]}
-                </a>
-            {end:}
-            <a
-                href="{photo[id]:h}"
-                title="{photo[alt]}"
-                class="photoimg">
-                <img
-                    src="{photo[src]}"
-                    title="{photo[alt]}">
-            </a>
-
-            </li>
-            {end:}
-                       </a>
-       </div>-->
        <div flexy:if="photos" id="photo-gallery">
        <ul id="Gallery" class="gallery">
                {foreach:photos,photo}
                {end:}
        </ul>
        </div>
-</div>
\ No newline at end of file
+</div>
+<script type="text/javascript">
+       $(document).ready(function() {
+               $("#member-logo1").fancybox({
+            helpers: {
+                title: {
+                    type: 'float'
+                }
+            }
+        });
+       });
+</script>
\ No newline at end of file
index 01cb174..ecb5541 100644 (file)
@@ -262,10 +262,10 @@ class Toolkit_Membersonly
                                = GLM_APP_BASE_URL . 'ckeditor/current/ckeditor.js';
                        $GLOBALS['bottomScripts'][]
                                = BASE_URL . 'Toolkit/Members/libjs/edit-member.js';
-                       $GLOBALS['bottomScripts'][]
-                               = GLM_APP_BASE_URL . 'gallery/thickbox-3.1.1.js';
-                       $GLOBALS['styleSheets'][]
-                               = GLM_APP_BASE_URL . 'gallery/thickbox.css';
+//                     $GLOBALS['bottomScripts'][]
+//                             = GLM_APP_BASE_URL . 'gallery/thickbox-3.1.1.js';
+//                     $GLOBALS['styleSheets'][]
+//                             = GLM_APP_BASE_URL . 'gallery/thickbox.css';
 
                        $mr = new Toolkit_Members_EditMemberOnlyInfo(
                                $dbh,
index 64830bc..dab6f3a 100755 (executable)
@@ -146,7 +146,7 @@ class Toolkit_Page
         $GLOBALS['styleSheets'][]  = $this->baseURL . 'fancybox/jquery.fancybox.css';
         // Resources needed for every page.
         //$GLOBALS['topScripts'][] = JQUERY_CDN_JS;
-        $GLOBALS['bottomScripts'][] = $this->glmAppBaseURL . 'libjs/jquery/jquery-1.7.2.min.js';
+        $GLOBALS['topScripts'][] = $this->glmAppBaseURL . 'libjs/jquery/jquery-1.7.2.min.js';
         $GLOBALS['bottomScripts'][] = $this->baseURL . 'photoswipe/lib/klass.min.js';
         $GLOBALS['bottomScripts'][] = $this->baseURL . 'photoswipe/code.photoswipe.jquery-3.0.5.js';
         $GLOBALS['bottomScripts'][] = $this->baseURL . "fancybox/jquery.fancybox.js";