adding new fields for trails
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 5 Jun 2013 20:10:55 +0000 (20:10 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 5 Jun 2013 20:10:55 +0000 (20:10 +0000)
Toolkit/Members/Database/tables/member.sql
Toolkit/Members/EditMemberInfo.php
Toolkit/Members/ProfilePage.php
Toolkit/Members/libjs/edit-member.js
Toolkit/Members/templates/memberDetail.tpl

index c72352b..7b686f1 100644 (file)
@@ -72,6 +72,11 @@ CREATE TABLE members.member
  dogs TEXT,
  difficulty TEXT,
  county INTEGER,
+ guide TEXT,
+ facilities TEXT,
+ hours TEXT,
+ directions TEXT,
+ information TEXT,
  PRIMARY KEY (member_id)
 );
 
index ba4344f..4f4cd0c 100644 (file)
@@ -831,45 +831,7 @@ class Toolkit_Members_EditMemberInfo
                        'display' => "$singularType Name",
                        'opts'    => array('class' => 'text')
                );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'primary_contact_fname',
-//                     'display' => 'Primary Contact First Name',
-//                     'opts'    => array('class' => 'text')
-//             );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'primary_contact_lname',
-//                     'display' => 'Primary Contact Last Name',
-//                     'opts'    => array('class' => 'text')
-//             );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'process_email',
-//                     'display' => 'Primary Contact Email',
-//                     'opts'    => array('class' => 'text')
-//             );
-//             $e[] = array(
-//                     'type'    => 'date',
-//                     'req'     => false,
-//                     'name'    => 'join_date',
-//                     'display' => "$singularType Since",
-//                     'opts'    => array(
-//                             'format'           => 'm / d / Y',
-//                             'minYear'          => $dateStartYear,
-//                             'maxYear'          => date('Y'),
-//                             'addEmptyOption'   => true,
-//                             'emptyOptionValue' => '',
-//                             'emptyOptionText'  => array(
-//                                     'm' => 'mm',
-//                                     'd' => 'dd',
-//                                     'Y' => 'yyyy',
-//                             )
-//                     )
-//             );
+
                $e[] = array(
                        'type'    => 'text',
                        'req'     => false,
@@ -877,27 +839,7 @@ class Toolkit_Members_EditMemberInfo
                        'display' => 'Primary Phone',
                        'opts'    => array('class' => 'text')
                );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'toll_free',
-//                     'display' => 'Phone 2',
-//                     'opts'    => array('class' => 'text')
-//             );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'fax',
-//                     'display' => 'Fax Number',
-//                     'opts'    => array('class' => 'text')
-//             );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'member_contact_email',
-//                     'display' => 'Email on Website',
-//                     'opts'    => array('class' => 'text')
-//             );
+
                /*
                $e[] = array(
                        'type'    => 'select',
@@ -987,45 +929,6 @@ class Toolkit_Members_EditMemberInfo
                );
 
                //      }}}
-
-               //      {{{ Mailing Address
-
-//             $e[] = array(
-//                     'type'    => 'header',
-//                     'req'     => false,
-//                     'name'    => 'MailingAddressHdrRmv',
-//                     'display' => 'Mailing Address (if different than physical address)',
-//             );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'mailing_address',
-//                     'display' => 'Mailing Address',
-//                     'opts'    => array('class' => 'text')
-//             );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'mailing_city',
-//                     'display' => 'City',
-//                     'opts'    => array('class' => 'text')
-//             );
-//             $e[] = array(
-//                     'type'    => 'select',
-//                     'req'     => false,
-//                     'name'    => 'mailing_state_id',
-//                     'display' => 'State / Province',
-//                     'opts'    => array('' => '-- Select --') + $this->states
-//             );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'mailing_zip',
-//                     'display' => 'Zip / Postal Code',
-//                     'opts'    => array('class' => 'text')
-//             );
-
-        //  }}}
                //      {{{ Member Description
 
                $e[] = array(
@@ -1049,6 +952,102 @@ class Toolkit_Members_EditMemberInfo
                );
 
         //  }}}
+
+        $e[] = array(
+                       'type'    => 'header',
+                       'req'     => false,
+                       'name'    => 'memberGuideHdr',
+                       'display' => "$singularType Guide",
+                       'col1'    => true
+               );
+               $e[] = array(
+                       'type'    => 'textarea',
+                       'req'     => false,
+                       'name'    => 'guide',
+                       'display' => null,
+                       'opts'    => array(
+                'id' => 'guide',
+                               'rows' => 8,
+                               'cols' => 43
+                       ),
+            'noCharLimit' => true
+               );
+        $e[] = array(
+                       'type'    => 'header',
+                       'req'     => false,
+                       'name'    => 'memberFacilityHdr',
+                       'display' => "Facilities",
+                       'col1'    => true
+               );
+               $e[] = array(
+                       'type'    => 'textarea',
+                       'req'     => false,
+                       'name'    => 'facilities',
+                       'display' => null,
+                       'opts'    => array(
+                'id' => 'facilities',
+                               'rows' => 8,
+                               'cols' => 43
+                       ),
+            'noCharLimit' => true
+               );
+        $e[] = array(
+                       'type'    => 'header',
+                       'req'     => false,
+                       'name'    => 'memberHoursHdr',
+                       'display' => "Hours & Fees",
+                       'col1'    => true
+               );
+               $e[] = array(
+                       'type'    => 'textarea',
+                       'req'     => false,
+                       'name'    => 'hours',
+                       'display' => null,
+                       'opts'    => array(
+                'id' => 'hours',
+                               'rows' => 8,
+                               'cols' => 43
+                       ),
+            'noCharLimit' => true
+               );
+        $e[] = array(
+                       'type'    => 'header',
+                       'req'     => false,
+                       'name'    => 'memberDirectionsHdr',
+                       'display' => "Directions",
+                       'col1'    => true
+               );
+               $e[] = array(
+                       'type'    => 'textarea',
+                       'req'     => false,
+                       'name'    => 'directions',
+                       'display' => null,
+                       'opts'    => array(
+                'id' => 'directions',
+                               'rows' => 8,
+                               'cols' => 43
+                       ),
+            'noCharLimit' => true
+               );
+        $e[] = array(
+                       'type'    => 'header',
+                       'req'     => false,
+                       'name'    => 'memberInfomationHdr',
+                       'display' => "Information",
+                       'col1'    => true
+               );
+               $e[] = array(
+                       'type'    => 'textarea',
+                       'req'     => false,
+                       'name'    => 'information',
+                       'display' => null,
+                       'opts'    => array(
+                'id' => 'information',
+                               'rows' => 8,
+                               'cols' => 43
+                       ),
+            'noCharLimit' => true
+               );
                //      {{{ Account Info
 
         $e[] = array(
@@ -1060,12 +1059,6 @@ class Toolkit_Members_EditMemberInfo
         );
         //  {{{ Physical Address
 
-//             $e[] = array(
-//                     'type'    => 'header',
-//                     'req'     => false,
-//                     'name'    => 'physicalAddressHdr',
-//                     'display' => 'Street Address',
-//             );
                $e[] = array(
                        'type'    => 'text',
                        'req'     => false,
@@ -1135,23 +1128,6 @@ class Toolkit_Members_EditMemberInfo
             'opts' => array('class' => 'text')
         );
 
-        //  }}}
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'member_login',
-//                     'display' => 'Username',
-//                     'opts'    => array('class' => 'text')
-//             );
-//             $e[] = array(
-//                     'type'    => 'text',
-//                     'req'     => false,
-//                     'name'    => 'member_passwd',
-//                     'display' => 'Password',
-//                     'opts'    => array('class' => 'text')
-//             );
-
-        //  }}}
                //      {{{ Main Image
 
                $e[] = array(
@@ -1189,334 +1165,6 @@ class Toolkit_Members_EditMemberInfo
                        'opts'    => array('class' => 'file')
                );
 
-        //  }}}
-               //      {{{ Payment Type Accepted
-
-//             $e[] = array(
-//                     'type'    => 'header',
-//                     'req'     => false,
-//                     'name'    => 'CreditCardsHdr',
-//                     'display' => 'Payment Type Accepted',
-//                     'col2'    => true
-//             );
-//             $e[] = array(
-//                     'type'    => 'checkbox',
-//                     'req'     => false,
-//                     'name'    => 'creditCards[American Express]',
-//                     'display' => 'American Express'
-//             );
-//             $e[] = array(
-//                     'type'    => 'checkbox',
-//                     'req'     => false,
-//                     'name'    => 'creditCards[Discover]',
-//                     'display' => 'Discover'
-//             );
-//             $e[] = array(
-//                     'type'    => 'checkbox',
-//                     'req'     => false,
-//                     'name'    => 'creditCards[Master Card]',
-//                     'display' => 'Master Card'
-//             );
-//             $e[] = array(
-//                     'type'    => 'checkbox',
-//                     'req'     => false,
-//                     'name'    => 'creditCards[Visa]',
-//                     'display' => 'Visa'
-//             );
-//        $e[] = array(
-//                     'type'    => 'checkbox',
-//                     'req'     => false,
-//                     'name'    => 'creditCards[Diners]',
-//                     'display' => 'Diners'
-//             );
-
-        //  }}}
-               //      {{{ Accommodations Information
-
-               if ($this->accommodations) {
-//                     $e[] = array(
-//                             'type'    => 'header',
-//                             'req'     => false,
-//                             'name'    => 'AccommodationsHdr',
-//                             'display' => 'Accommodations Information',
-//                             'col2'    => true
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'reservation_url',
-//                             'display' => 'Reservation Url',
-//                             'opts'    => array('class' => 'text')
-//                     );
-//                     if ($usesGlmReservations) {
-//                             $e[] = array(
-//                                     'type'    => 'text',
-//                                     'req'     => false,
-//                                     'name'    => 'reservation_id',
-//                                     'display' => 'Reservation Id',
-//                                     'opts'    => array('class' => 'text')
-//                             );
-//                     }
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'num_rooms',
-//                             'display' => 'Number of Rooms',
-//                             'opts'    => array('class' => 'text')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'advcheckbox',
-//                             'req'     => false,
-//                             'name'    => 'year_round',
-//                             'display' => 'Open all Year',
-//                             'val'     => array(0, 1)
-//                     );
-               }
-
-        //  }}}
-               //      {{{ Restaurant Information
-
-               if ($this->restaurant) {
-//                     $e[] = array(
-//                             'type'    => 'header',
-//                             'req'     => false,
-//                             'name'    => 'RestaurantHdr',
-//                             'display' => 'Restaurant Information',
-//                             'col2'    => true
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'advcheckbox',
-//                             'req'     => false,
-//                             'name'    => 'breakfast',
-//                             'display' => 'Breakfast',
-//                             'att'     => array('id'  => 'breakfast'),
-//                             'val'     => array(0, 1)
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'breakfast_from',
-//                             'display' => 'From',
-//                             'opts'    => array('class' => 'priceFrom')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'breakfast_to',
-//                             'display' => 'To',
-//                             'opts'    => array('class' => 'priceTo')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'advcheckbox',
-//                             'req'     => false,
-//                             'name'    => 'brunch',
-//                             'display' => 'Brunch',
-//                             'att'     => array('id' => 'brunch'),
-//                             'val'     => array(0, 1)
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'brunch_from',
-//                             'display' => 'From',
-//                             'opts'    => array('class' => 'priceFrom')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'brunch_to',
-//                             'display' => 'To',
-//                             'opts'    => array('class' => 'priceTo')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'advcheckbox',
-//                             'req'     => false,
-//                             'name'    => 'lunch',
-//                             'display' => 'Lunch',
-//                             'att'     => array('id' => 'lunch'),
-//                             'val'     => array(0, 1)
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'lunch_from',
-//                             'display' => 'From',
-//                             'opts'    => array('class' => 'priceFrom')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'lunch_to',
-//                             'display' => 'To',
-//                             'opts'    => array('class' => 'priceTo')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'advcheckbox',
-//                             'req'     => false,
-//                             'name'    => 'dinner',
-//                             'display' => 'Dinner',
-//                             'att'     => array('id' => 'dinner'),
-//                             'val'     => array(0, 1)
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'dinner_from',
-//                             'display' => 'From',
-//                             'opts'    => array('class' => 'priceFrom')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'dinner_to',
-//                             'display' => 'To',
-//                             'opts'    => array('class' => 'priceTo')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'advcheckbox',
-//                             'req'     => false,
-//                             'name'    => 'alcohol',
-//                             'display' => 'Alcohol',
-//                             'val'     => array(0, 1)
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'advcheckbox',
-//                             'req'     => false,
-//                             'name'    => 'non_smoking',
-//                             'display' => 'Non-Smoking',
-//                             'val'     => array(0, 1)
-//                     );
-               }
-
-        //  }}}
-               //      {{{ Golf Information
-
-               if ($this->golf) {
-//                     $e[] = array(
-//                             'type' => 'header',
-//                             'req' => false,
-//                             'name' => 'GolfingHdr',
-//                             'display' => 'Golf Course Information',
-//                             'col2' => true
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'par',
-//                             'display' => 'Par',
-//                             'opts'    => array('class' => 'text')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'yardage',
-//                             'display' => 'Yardage',
-//                             'opts'    => array('class' => 'text')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'course_rating',
-//                             'display' => 'Course Rating',
-//                             'opts'    => array('class' => 'text')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'slope_rating',
-//                             'display' => 'Slope Rating',
-//                             'opts'    => array('class' => 'text')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'advcheckbox',
-//                             'req'     => false,
-//                             'name'    => 'walking_course',
-//                             'display' => 'Walking Course',
-//                             'val'     => array(0, 1)
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'holes18',
-//                             'display' => '18 Holes',
-//                             'opts'    => array('class' => 'text')
-//                     );
-//                     $e[] = array(
-//                             'type'    => 'text',
-//                             'req'     => false,
-//                             'name'    => 'holes9',
-//                             'display' => '9 Holes',
-//                             'opts'    => array('class' => 'text')
-//                     );
-               }
-
-        //  }}}
-        //  {{{ Social Media Links
-
-        $e[] = array(
-            'type' => 'header',
-            'req' => false,
-            'name' => 'SocialMediaHdr',
-            'display' => 'Social Media Links',
-            'col2' => true,
-        );
-        $e[] = array(
-            'type' => 'text',
-            'req' => false,
-            'name' => 'facebook',
-            'display' => 'Facebook',
-            'col2' => true,
-            'noCharLimit' => true
-        );
-        $e[] = array(
-            'type' => 'text',
-            'req' => false,
-            'name' => 'twitter',
-            'display' => 'Twitter',
-            'col2' => true,
-            'noCharLimit' => true
-        );
-        $e[] = array(
-            'type' => 'text',
-            'req' => false,
-            'name' => 'myspace',
-            'display' => 'MySpace',
-            'col2' => true,
-            'noCharLimit' => true
-        );
-        $e[] = array(
-            'type' => 'text',
-            'req' => false,
-            'name' => 'linkedin',
-            'display' => 'LinkedIn',
-            'col2' => true,
-            'noCharLimit' => true
-        );
-        $e[] = array(
-            'type' => 'text',
-            'req' => false,
-            'name' => 'blog',
-            'display' => 'Blog',
-            'col2' => true,
-            'noCharLimit' => true
-        );
-        $e[] = array(
-            'type' => 'text',
-            'req' => false,
-            'name' => 'youtube',
-            'display' => 'YouTube',
-            'col2' => true,
-            'noCharLimit' => true
-        );
-        $e[] = array(
-            'type' => 'text',
-            'req' => false,
-            'name' => 'pinterest',
-            'display' => 'Pinterest',
-            'col2' => true,
-            'noCharLimit' => true
-        );
-
         //  }}}
 
                $this->setupElements($e);
@@ -1540,50 +1188,13 @@ class Toolkit_Members_EditMemberInfo
                        'filter' => 'trim'
                );
         $f[] = array(
-            'element' => 'reservation_url',
-            'filter' => array('Toolkit_Common', 'filterURI')
-        );
-        $f[] = array(
-            'element' => 'facebook',
-            'filter' => array('Toolkit_Common', 'filterURI')
-        );
-        $f[] = array(
-            'element' => 'twitter',
-            'filter' => array('Toolkit_Common', 'filterURI')
-        );
-        $f[] = array(
-            'element' => 'myspace',
-            'filter' => array('Toolkit_Common', 'filterURI')
-        );
-        $f[] = array(
-            'element' => 'linkedin',
-            'filter' => array('Toolkit_Common', 'filterURI')
-        );
-        $f[] = array(
-            'element' => 'blog',
-            'filter' => array('Toolkit_Common', 'filterURI')
-        );
-        $f[] = array(
-            'element' => 'youtube',
+            'element' => 'paypal',
             'filter' => array('Toolkit_Common', 'filterURI')
         );
         $f[] = array(
             'element' => 'url',
             'filter' => array('Toolkit_Common', 'filterURI')
         );
-//        $f[] = array(
-//            'element' => 'phone',
-//            'filter' => array('Toolkit_Common', 'filterPhone')
-//        );
-//        $f[] = array(
-//            'element' => 'fax',
-//            'filter' => array('Toolkit_Common', 'filterPhone')
-//        );
-//        $f[] = array(
-//            'element' => 'toll_free',
-//            'filter' => array('Toolkit_Common', 'filterPhone')
-//        );
-
                $this->setupFilters($f);
        }
 
@@ -1704,19 +1315,7 @@ class Toolkit_Members_EditMemberInfo
                        'force'      => false
                );
                $r[] = array(
-                       'element'    => 'url',
-                       'message'    => 'ERROR: Invalid URL format',
-                       'type'       => 'checkURI',
-                       'format'     => array(
-                               'allowed_schemes' => array('http', 'https'),
-                               'strict' => false
-                       ),
-                       'validation' => $this->validationType,
-                       'reset'      => false,
-                       'force'      => false
-               );
-               $r[] = array(
-                       'element'    => 'reservation_url',
+                       'element'    => 'paypal',
                        'message'    => 'ERROR: Invalid URL format',
                        'type'       => 'checkURI',
                        'format'     => array(
@@ -1727,15 +1326,6 @@ class Toolkit_Members_EditMemberInfo
                        'reset'      => false,
                        'force'      => false
                );
-               $r[] = array(
-                       'element'    => 'num_rooms',
-                       'message'    => 'ERROR: Must be an integer!',
-                       'type'       => 'numeric',
-                       'format'     => null,
-                       'validation' => $this->validationType,
-                       'reset'      => false,
-                       'force'      => false
-               );
         $r[] = array(
             'element'    => 'lat',
             'message'    => 'ERROR: Must be a numeric!',
@@ -1788,15 +1378,6 @@ class Toolkit_Members_EditMemberInfo
                 'force'      => false
             );
         }
-               $r[] = array(
-                       'element'    => 'member_login',
-                       'message'    => 'ERROR: Sorry, but this username has already been taken!',
-                       'type'       => 'callback',
-                       'format'     => array($this, 'checkUName'),
-                       'validation' => $this->validationType,
-                       'reset'      => false,
-                       'force'      => false
-               );
                $r[] = array(
                        'element'    => 'state_id',
                        'message'    => 'ERROR: Invalid State!',
@@ -1851,60 +1432,6 @@ class Toolkit_Members_EditMemberInfo
                        'reset'      => false,
                        'force'      => false
                );
-        $r[] = array(
-            'element'    => 'facebook',
-            'message'    => 'ERROR: 200 characters max!',
-            'type'       => 'maxlength',
-            'format'     => 200,
-            'validatios' => $this->validationType,
-            'reset'      => false,
-            'force'      => false
-        );
-        $r[] = array(
-            'element'    => 'twitter',
-            'message'    => 'ERROR: 200 characters max!',
-            'type'       => 'maxlength',
-            'format'     => 200,
-            'validatios' => $this->validationType,
-            'reset'      => false,
-            'force'      => false
-        );
-        $r[] = array(
-            'element'    => 'myspace',
-            'message'    => 'ERROR: 200 characters max!',
-            'type'       => 'maxlength',
-            'format'     => 200,
-            'validatios' => $this->validationType,
-            'reset'      => false,
-            'force'      => false
-        );
-        $r[] = array(
-            'element'    => 'linkedin',
-            'message'    => 'ERROR: 200 characters max!',
-            'type'       => 'maxlength',
-            'format'     => 200,
-            'validatios' => $this->validationType,
-            'reset'      => false,
-            'force'      => false
-        );
-        $r[] = array(
-            'element'    => 'blog',
-            'message'    => 'ERROR: 200 characters max!',
-            'type'       => 'maxlength',
-            'format'     => 200,
-            'validatios' => $this->validationType,
-            'reset'      => false,
-            'force'      => false
-        );
-        $r[] = array(
-            'element'    => 'youtube',
-            'message'    => 'ERROR: 200 characters max!',
-            'type'       => 'maxlength',
-            'format'     => 200,
-            'validatios' => $this->validationType,
-            'reset'      => false,
-            'force'      => false
-        );
 
                $this->setupRules($r);
        }
index b666875..631fdc9 100644 (file)
@@ -545,10 +545,13 @@ class Toolkit_Members_ProfilePage
                try {
                        $sql = "
                 SELECT m.*, c.city_name, s.state_name,
+                       ct.county_name,
                        s.state_abb AS state_abbr
-                  FROM member m JOIN city c USING (city_id), state s
+                  FROM member m
+                    JOIN city c USING (city_id), state s, county ct
                  WHERE m.member_id = :mid
-                   AND m.state_id  = s.state_id";
+                   AND m.state_id  = s.state_id
+                   AND m.county = ct.county_id";
 
                        $stmt = $this->dbh->prepare($sql);
                        $stmt->bindParam(':mid', $this->_mid, PDO::PARAM_INT);
@@ -569,6 +572,7 @@ class Toolkit_Members_ProfilePage
             } else {
                 $page->city = $row['city'];
             }
+            $page->county_name = $row['county_name'];
             $page->state_name  = $row['state_name'];
             $page->state_abbr  = $row['state_abbr'];
             $page->zip         = $row['zip'];
@@ -576,6 +580,18 @@ class Toolkit_Members_ProfilePage
             $page->toll_free   = $row['toll_free'];
             $page->fax         = $row['fax'];
             $page->email       = $row['member_contact_email'];
+            $page->paypal      = $row['paypal'];
+            $page->reviewed    = $row['reviewed'];
+            $page->distance    = $row['discance'];
+            $page->trailtype   = $row['trailtype'];
+            $page->terrain     = $row['terrain'];
+            $page->dogs        = $row['dogs'];
+            $page->guide       = $row['guide'];
+            $page->facilities  = $row['facilities'];
+            $page->hours       = $row['hours'];
+            $page->directions  = $row['directions'];
+            $page->information = $row['information'];
+
             if (strpos($row['url'], 'http://') === false) {
                 $row['url'] = 'http://' . $row['url'];
             }
index 9ef4468..ed02c1d 100755 (executable)
@@ -48,6 +48,56 @@ var Member =
                     });
             }
                }
+        if ($('#guide').is('textarea')) {
+            //  Only try to replace the textarea if the
+            //  CKEditor is compatible w/ the browser.
+            if (CKEDITOR.env.isCompatible) {
+                CKEDITOR.replace('guide',
+                    {
+                        toolbar : 'LimitedToolset'
+                    });
+            }
+               }
+        if ($('#facilities').is('textarea')) {
+            //  Only try to replace the textarea if the
+            //  CKEditor is compatible w/ the browser.
+            if (CKEDITOR.env.isCompatible) {
+                CKEDITOR.replace('facilities',
+                    {
+                        toolbar : 'LimitedToolset'
+                    });
+            }
+               }
+        if ($('#hours').is('textarea')) {
+            //  Only try to replace the textarea if the
+            //  CKEditor is compatible w/ the browser.
+            if (CKEDITOR.env.isCompatible) {
+                CKEDITOR.replace('hours',
+                    {
+                        toolbar : 'LimitedToolset'
+                    });
+            }
+               }
+        if ($('#directions').is('textarea')) {
+            //  Only try to replace the textarea if the
+            //  CKEditor is compatible w/ the browser.
+            if (CKEDITOR.env.isCompatible) {
+                CKEDITOR.replace('directions',
+                    {
+                        toolbar : 'LimitedToolset'
+                    });
+            }
+               }
+        if ($('#information').is('textarea')) {
+            //  Only try to replace the textarea if the
+            //  CKEditor is compatible w/ the browser.
+            if (CKEDITOR.env.isCompatible) {
+                CKEDITOR.replace('information',
+                    {
+                        toolbar : 'LimitedToolset'
+                    });
+            }
+               }
         $("#edit_member").submit(function(){
             var member_cats = Member.requireMemberCategory();
             //alert(member_cats);
index 19a5830..1e86d69 100644 (file)
@@ -28,7 +28,18 @@ catid="catid"
                                </span>
                                <span class="postal-code">{zip:h}</span>
                        </div>
+            <div>
+                <span class="county">{county_name:h} County</span>
+            </div>
                </div><!-- /.adr -->
+        <div>
+            <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 flexy:if="paypal">{paypal:h}</div>
+        </div>
                <div flexy:if="hasMailingAddy" class="adr">
                        <div class="type">Mailing Address</div>
                        <div class="street-address">{mailing_address:h}</div>
@@ -68,60 +79,6 @@ catid="catid"
                </div><!-- /#google-div -->
        </div><!-- /.vcard -->
 
-       <div flexy:if="show_attributes" id="mColumn">
-               <h2 flexy:if="has_accommodations">Accommodations Info</h2>
-               <ul flexy:if="has_accommodations" id="mColumnAcc">
-                       <li>
-                               <ul>
-                                       <li flexy:if="year_round"> Open Year Round </li>
-                                       <li flexy:if="lists_number_of_rooms">
-{num_rooms:h} Rooms
-                                       </li>
-{if:does_online_reservations}
-                                       <li flexy:if="reservation_id">
-                                               <a href="{base_url:h}index.php?catid=50&amp;set_property={reservation_id:h}">Reservations</a>
-                                       </li>
-                                       <li flexy:if="reservation_url">
-                                               <a class="external" href="{reservation_url:h}">Reservations</a>
-                                       </li>
-{end:}
-                               </ul>
-                       </li>
-               </ul>
-               <h2 flexy:if="has_social_media">Social Media Links</h2>
-               <ul flexy:if="has_social_media" id="mColumnSoc">
-                       <li flexy:if="facebook" class="mFacebook">
-                               <a class="external" href="{facebook:h}">Facebook</a>
-                       </li>
-                       <li flexy:if="twitter" class="mTwitter">
-                               <a class="external" href="{twitter:h}">Twitter</a>
-                       </li>
-                       <li flexy:if="pinterest" class="mPinterest">
-                               <a class="external" href="{pinterest:h}">Pinterest</a>
-                       </li>
-                       <li flexy:if="linkedin" class="mLinkedIn">
-                               <a class="external" href="{linkedin:h}">LinkedIn</a>
-                       </li>
-                       <li flexy:if="youtube" class="mYouTube">
-                               <a class="external" href="{youtube:h}">YouTube</a>
-                       </li>
-                       <li flexy:if="blog" class="mBlog">
-                               <a class="external" href="{blog:h}">Blog</a>
-                       </li>
-                       <li flexy:if="myspace" class="mMyspace">
-                               <a class="external" href="{myspace:h}">MySpace</a>
-                       </li>
-               </ul>
-               <h2 flexy:if="ccards">Payment Types Accepted</h2>
-               <ul flexy:if="ccards">
-                       <li>
-                               <ul>
-                                       <li flexy:foreach="ccards,v">{v:h}</li>
-                               </ul>
-                       </li>
-               </ul>
-       </div><!-- /#mColumn -->
-
 {if:addToLink}
        <a id="add-{member_id}" class="list-add-link" rel="{member_id}" flexy:if="plink" href="{plink:h}">
                <img alt="Add to Your Travel List" class="list-add-link" rel="{member_id}" title="Add to Your Travel List" src="{base_url:h}assets/addto.gif" style="float: right; margin: 10px;clear: right;">
@@ -134,6 +91,10 @@ catid="catid"
 {end:}
 
        <div style="clear: left; text-align: justify;">{description:h}</div>
+    <div style="clear: left; text-align: justify;">{guide:h}</div>
+    <div style="clear: left; text-align: justify;">{facilities:h}</div>
+    <div style="clear: left; text-align: justify;">{directions:h}</div>
+    <div style="clear: left; text-align: justify;">{information:h}</div>
 
        <div flexy:if="amenities" class="business-list-amenities">
                <ul>
@@ -146,20 +107,6 @@ catid="catid"
                <a flexy:foreach="files,k,v" class="file-download pdf external" href="{v[href]:h}">{v[name]:h}</a>
        </div>
 
-       <div flexy:if="packages" class="member-travel-item">
-               <h2>Packages</h2>
-               {foreach:packages,v}
-                       <h3 flexy:if="v[title]">{v[title]:h}</h3>
-                       {if:v[image]}
-                               <img alt="{v[image]:h}" src="{v[image]:h}">
-                       {end:}
-
-                       {if:v[description]}
-                               {v[description]:h}
-                       {end:}
-               {end:}
-       </div>
-
        <div flexy:if="photos" id="photo-gallery">
                <h2>Photo Gallery</h2>
                <div flexy:foreach="photos,v" class="thumb {v[class]:h}">
@@ -169,53 +116,4 @@ catid="catid"
                </div>
        </div>
 
-       <div flexy:if="golf_info" class="member-golf-result">
-               <h2>Course Information</h2>
-               <table class="member-golf-stats">
-                       <tbody>
-                               <tr>
-                                       <th flexy:if="par">Par</th>
-                                       <th flexy:if="yardage">Yardage</th>
-                                       <th flexy:if="course_rating">Course Rating</th>
-                                       <th flexy:if="slope_rating">Slope Rating</th>
-                    <th flexy:if="holes9">9 Holes</th>
-                    <th flexy:if="holes18">18 Holes</th>
-                               </tr>
-                               <tr>
-                                       <td flexy:if="par">{par:h}</td>
-                                       <td flexy:if="yardage">{yardage:h}</td>
-                                       <td flexy:if="course_rating">{course_rating:h}</td>
-                                       <td flexy:if="slope_rating">{slope_rating:h}</td>
-                    <td flexy:if="holes9">{holes9:h}</td>
-                    <td flexy:if="holes18">{holes18:h}</td>
-                               </tr>
-                       </tbody>
-               </table>
-               <div class="member-golf-walking">
-                       <strong>Walking Course:</strong>
-                       {walking_course:h}
-               </div>
-       </div>
-
-       <div flexy:if="restaurant_info" class="member-restaurant-item">
-               <h2>Restaurant Information</h2>
-               <table>
-                       <tbody>
-                               <tr>
-                                       <th>Breakfast</th>
-                                       <th>Brunch</th>
-                                       <th>Lunch</th>
-                                       <th>Dinner</th>
-                                       <th>Alcohol</th>
-                               </tr>
-                               <tr>
-                                       <td>{breakfast:h}</td>
-                                       <td>{brunch:h}</td>
-                                       <td>{lunch:h}</td>
-                                       <td>{dinner:h}</td>
-                                       <td>{alcohol:h}</td>
-                               </tr>
-                       </tbody>
-               </table>
-       </div>
 </div>