From: Leif Hanson Date: Fri, 7 Jun 2013 15:53:28 +0000 (+0000) Subject: Styled Members list, members detail, photo gallery, and video gallery. X-Git-Tag: v1.0~130 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=a1bdbeb0925782b38d7bf977083a13cac2f01b05;p=web%2FMichiganTrailMaps.git Styled Members list, members detail, photo gallery, and video gallery. --- diff --git a/.htaccess b/.htaccess index 8fccc5c..acd7267 100644 --- a/.htaccess +++ b/.htaccess @@ -14,13 +14,13 @@ ErrorDocument 404 /404.html RewriteEngine On AddDefaultCharset utf-8 -RewriteBase /www.michigantrailmaps.com/ +RewriteBase /~leif/www.michigantrailmaps.com/ # Redirect non-www to www -RewriteCond %{ENV:GLM_HOST_ID} PRODUCTION -RewriteCond %{HTTP_HOST} !^www\. [NC] -RewriteCond %{HTTP_HOST} !^demo\. [NC] -RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] +#RewriteCond %{ENV:GLM_HOST_ID} PRODUCTION +#RewriteCond %{HTTP_HOST} !^www\. [NC] +#RewriteCond %{HTTP_HOST} !^demo\. [NC] +#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # CacheBusting RewriteCond %{REQUEST_URI} v/[0-9\.]+/ diff --git a/Toolkit/Members/ProfilePage.php b/Toolkit/Members/ProfilePage.php index e8b9346..0ef216d 100644 --- a/Toolkit/Members/ProfilePage.php +++ b/Toolkit/Members/ProfilePage.php @@ -626,6 +626,12 @@ class Toolkit_Members_ProfilePage } $page->photos = !empty($images) ? $images : false; + if ($page->photos) { + $baseUrl = ($_SERVER['HTTPS'] == "on") + ? BASE_SECURE_URL + : BASE_URL; + $GLOBALS['bottomScripts'][] = $baseUrl . 'libjs/photoGallery.js'; + } } catch (PDOException $e) { return Toolkit_Common::handleError($e); } diff --git a/Toolkit/Members/css/member.css b/Toolkit/Members/css/member.css index 9e7cc92..3fd9ede 100755 --- a/Toolkit/Members/css/member.css +++ b/Toolkit/Members/css/member.css @@ -70,21 +70,30 @@ background-color: #ffffff; /* Member List */ .search-result-item { + float: left; + clear: both; + width: 100%; padding: 15px 20px; - background-color: #eee; - height: 1%; - margin-bottom: 5px; - overflow: hidden; - position: relative; - background-color: #ffffff; - background-image: -moz-linear-gradient(top, #ffffff, #E9F0F7); /* FF3.6 */ - background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #ffffff),color-stop(1, #E9F0F7)); /* Saf4+, Chrome */ - filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#E9F0F7'); /* IE6,IE7 */ - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#E9F0F7')"; /* IE8 */ + background-color: #eee; + height: 1%; + margin-bottom: 12px; + overflow: hidden; + position: relative; + /*background-color: #ffffff; + background-image: -moz-linear-gradient(top, #ffffff, #E9F0F7); + background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #ffffff),color-stop(1, #E9F0F7)); + filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#E9F0F7'); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#E9F0F7')"; border: 1px solid #95B1CD; -moz-border-radius: 5px; -webkit-border-radius: 5px; - border-radius: 5px; + border-radius: 5px;*/ + background: url(../../../assets/bg_2.jpg) 0 0 repeat; + border: 1px solid #B0A487; + border-radius: 8px; + -webkit-box-shadow: inset 0 0 10px rgba(176,164,135,.7); + -moz-box-shadow: inset 0 0 10px rgba(176,164,135,.7); + box-shadow: inset 0 0 10px rgba(176,164,135,.7); } .search-result-item-on { border: 1px solid #726646 !important; @@ -92,21 +101,97 @@ background-color: #ffffff; .memberSR { float: right; } +#member-detail .list-add-link { + display: block; + float: right; + clear: right; + width: 270px; + height: 30px; + background: #736357 url(../../../assets/plus.png) 60px 8px no-repeat; + border-radius: 6px; + color: #FFF; + font-family: Arial, Helvetica, sans-serif; + font-weight: normal; + padding: 6px 0 0 88px; +} +#member-detail .list-add-link:hover { + color: #F7931E; +} +.search-result-item .list-add-link { + display: block; + float: right; + clear: right; + width: 160px; + height: 30px; + background: #736357 url(../../../assets/plus.png) 14px 8px no-repeat; + border-radius: 6px; + color: #FFF; + font-family: Arial, Helvetica, sans-serif; + font-weight: normal; + padding: 6px 0 0 34px; + margin: 8px 0 0 0; +} +.search-result-item .list-add-link:hover { + color: #F7931E; +} +#member-detail .list-view-link { + display: block; + float: right; + clear: right; + width: 270px; + height: 30px; + background: #736357 url(../../../assets/search.png) 70px 8px no-repeat; + border-radius: 6px; + color: #FFF; + font-family: Arial, Helvetica, sans-serif; + font-weight: normal; + padding: 6px 0 0 98px; +} +#member-detail .list-view-link:hover { + color: #F7931E; +} +.search-result-item .list-view-link { + display: block; + float: right; + clear: right; + width: 160px; + height: 30px; + background: #736357 url(../../../assets/search.png) 18px 8px no-repeat; + border-radius: 6px; + color: #FFF; + font-family: Arial, Helvetica, sans-serif; + font-weight: normal; + padding: 6px 0 0 38px; + margin: 8px 0 0 0; +} +.search-result-item .list-view-link:hover { + color: #F7931E; +} .list-add-link img, .list-view-link img { margin-bottom: 10px; } .search-result-img { - clear: right; + float: right; + /*clear: right;*/ + border-radius: 6px; + border: 1px solid #B0A487; } .search-result-item h2 { padding: 0; margin: 0 0 0.5em 0; } -.search-result-item h2 a:link {color: #00456C;} -.search-result-item h2 a:visited {color: #00456C;} -.search-result-item h2 a:hover {color: #3D8D3A;} -.search-result-item h2 a:active {color: #00456C;} - +.search-result-item h2 a:link {/*color: #00456C;*/} +.search-result-item h2 a:visited {/*color: #00456C;*/} +.search-result-item h2 a:hover {/*color: #3D8D3A;*/} +.search-result-item h2 a:active {/*color: #00456C;*/} +.results_output { + display: block; + clear: right; + width: 100%; + padding-top: 20px; + padding-bottom: 4px; + border-bottom: 1px solid #CCC; +} .search-result-location { float: left; } @@ -163,11 +248,30 @@ div.search-result-more-div a:active { #member-detail { clear: left; padding-top: 10px; + padding-bottom: 20px; + width: 100%; + overflow: hidden; } #home #member-detail, #inside #member-detail { clear: none; } -#member-img-1 { padding-right:10px; } +#top_wrapper { + padding: 20px; + margin: 0; + width: 100%; + overflow: hidden; + background: url(../../../assets/bg_2.jpg) 0 0 repeat; + border: 1px solid #B0A487; + border-radius: 8px; + -webkit-box-shadow: inset 0 0 10px rgba(176,164,135,.7); + -moz-box-shadow: inset 0 0 10px rgba(176,164,135,.7); + box-shadow: inset 0 0 10px rgba(176,164,135,.7); +} +#member-img-1 { + padding-right:0; + border-radius: 6px; + border: 1px solid #B0A487; + } #business-list-contacts {clear: left;} #business-list-contacts h2 {margin-bottom: 0;} #member-detail .vcard { @@ -178,11 +282,13 @@ div.search-result-more-div a:active { float: left; clear: right; position: relative; - margin: 15px 5px 15px 0; + margin: 15px 5px 0 0; } .business-contact {display: list-item; margin-left: 20px;} .vcard h1 { font-size: 18px; + margin-top: 0px; + padding-top: 0px; } #image-box { float: right; @@ -637,42 +743,50 @@ ul#plannerNav a:hover { } .pages { - padding: 1em 0; - clear: left; + /*padding: 1em 0; + clear: left;*/ + float: right; } .pages a, .pages b { color: #003366; display: block; float: left; padding: 0.2em 0.5em; - margin-right: 0.1em; + margin-right: 2px; border: 1px solid #fff; background: #fff; } .pages b, .business-first-letter a.curr { - border: 1px solid #2E6AB1; + border: 1px solid #736357; font-weight: bold; - background: #2E6AB1; + background: #736357; color: #fff; + padding: 0.1em 0.4em; } .pages a { - border: 1px solid #9AAFE5; + margin-right: 2px; + color: #8A1E03; + padding: 0.1em 0.4em; + border: 1px solid #736357; text-decoration: none; } .pages a:hover, .business-first-letter a:hover { border-color: #2E6AB1; } .business-first-letter { - margin: 1em 0; + float: left; + width: 46%; + min-height: 100px; + padding-top: 10px; } .business-first-letter > div { margin-bottom: 1em; } .business-first-letter a { - margin-right: 0.1em; - color: #003366; + margin-right: 2px; + color: #8A1E03; padding: 0.1em 0.4em; - border: 1px solid #9AAFE5; + border: 1px solid #736357; text-decoration: none; } /* member db category search result, numbered icons */ @@ -683,3 +797,13 @@ ul#plannerNav a:hover { div.thumb { margin: 2px 3px; } +#paging_wrapper { + float: right; + width: 50%; + min-height: 100px; + padding-top: 10px; + text-align: right; +} +#paging_wrapper > div { + margin-bottom: 1em; +} \ No newline at end of file diff --git a/Toolkit/Members/templates/memberDetail.tpl b/Toolkit/Members/templates/memberDetail.tpl index 70d92ad..7475eac 100644 --- a/Toolkit/Members/templates/memberDetail.tpl +++ b/Toolkit/Members/templates/memberDetail.tpl @@ -6,109 +6,129 @@ >
-
-
- Member Logo Image -
-
+
+
+
+ Member Logo Image +
+
+ +
+

{member_name:h}

+
+
Street Address
+
{street:h}
+
+ {city:h}, + + {state_abbr:h} + + {zip:h} +
+
+ {county_name:h} County +
+
+
+
Distance: {distance:h}
+
TrailType: {trailtype:h}
+
Terrain: {terrain:h}
+
Dogs: {dogs:h}
+
Difficulty: {difficulty:h}
+
{paypal:h}
+
+
+ Phone: + {phone:h} +
+
+ Toll Free: + {toll_free:h} +
+
+ Fax: + {fax:h} +
+ + Website +
+
+
+

Get Driving Directions:

+
+ + + +
+
+
+
+
+ {if:addToLink} + + Add to Trip Planner + + + {else:} + + View Trip Planner + + + {end:} +
+
{description:h}
+
+

Trail Guide:

{guide:h} +
+
+

Facilities:

{facilities:h} +
+
+

Directions:

{directions:h} +
+
+

Information:

{information:h} +
-
-

{member_name:h}

-
-
Street Address
-
{street:h}
-
- {city:h}, - - {state_abbr:h} - - {zip:h} -
-
- {county_name:h} County -
-
-
-
Distance: {distance:h}
-
TrailType: {trailtype:h}
-
Terrain: {terrain:h}
-
Dogs: {dogs:h}
-
Difficulty: {difficulty:h}
-
{paypal:h}
-
-
- Phone: - {phone:h} -
-
- Toll Free: - {toll_free:h} -
-
- Fax: - {fax:h} -
- - Website -
-
-
-

Get Driving Directions:

-
- - - -
-
-
-
-
+
+
    +
  • {v:h}
  • +
+
- {if:addToLink} - - Add to Your Travel List - - - {else:} - - View Your Travel List - - {end:} +
+

Files Available for Download

+ {v[name]:h} +
-
{description:h}
-
-

Trail Guide:

{guide:h} -
-
-

Facilities:

{facilities:h} -
-
-

Directions:

{directions:h} -
-
-

Information:

{information:h} -
- -
-
    -
  • {v:h}
  • -
-
- -
-

Files Available for Download

- {v[name]:h} -
- - + + {end:} + +
+ \ No newline at end of file diff --git a/Toolkit/Members/templates/membersList.tpl b/Toolkit/Members/templates/membersList.tpl index 2e6501f..256274e 100644 --- a/Toolkit/Members/templates/membersList.tpl +++ b/Toolkit/Members/templates/membersList.tpl @@ -7,31 +7,38 @@ searchMapIconActive="searchMapIconActive" > + + +{if:numberedSet} +
{getResults(#Found %s Trails in %s page(s)#):h}
+
+
Showing records {firstRecord} to {lastRecord}
+{getPaging():h} +
+
Narrow result by letter:
{k}
-{if:numberedSet} -
{getResults(#Found %s Businesses in %s page(s)#):h}
-{getPaging():h} -

Showing records {firstRecord} to {lastRecord}

-
+ +{if:row[logo]} + {row[logo]} +{end:} {if:row[addToLink]} - Add to Your Travel List + Add To Trip Planner + {else:} - View Your Travel List + View Trip Planner + -{end:} -{if:row[logo]} - {row[logo]} {end:}

{row[member_name]:h}

@@ -81,10 +88,11 @@
{getPaging():h} -
+ +
{else:}
No Members matched your search criteria!
{end:} diff --git a/Toolkit/Page.php b/Toolkit/Page.php index 292a70b..6b8bd86 100755 --- a/Toolkit/Page.php +++ b/Toolkit/Page.php @@ -142,8 +142,14 @@ class Toolkit_Page // Resources needed for every page. $GLOBALS['styleSheets'] = array(); + $GLOBALS['styleSheets'][] = $this->glmAppBaseURL . 'libjs/plugins/photoswipe/photoswipe.css'; + $GLOBALS['styleSheets'][] = $this->baseURL . 'fancybox/jquery.fancybox.css'; // Resources needed for every page. $GLOBALS['topScripts'][] = JQUERY_CDN_JS; + $GLOBALS['bottomScripts'][] = $this->glmAppBaseURL . 'libjs/plugins/photoswipe/lib/klass.min.js'; + $GLOBALS['bottomScripts'][] = $this->glmAppBaseURL . 'libjs/plugins/photoswipe/code.photoswipe.jquery-3.0.5.js'; + $GLOBALS['bottomScripts'][] = $this->baseURL . "fancybox/jquery.fancybox.js"; + $GLOBALS['bottomScripts'][] = $this->glmAppBaseURL . 'libjs/external.js'; $GLOBALS['bottomScripts'][] = $this->baseURL . "libjs/pagefunctions.js"; } diff --git a/Toolkit/Photos/Display.php b/Toolkit/Photos/Display.php index b49e1c6..d7ac2df 100755 --- a/Toolkit/Photos/Display.php +++ b/Toolkit/Photos/Display.php @@ -35,7 +35,7 @@ class Toolkit_Photos_Display * @var PDO * @access private */ - private $_dbh; + private $_dbh; /** * Options for Flexy Templates @@ -92,9 +92,9 @@ class Toolkit_Photos_Display { $this->_dbh = $dbh; - $this->flexyOptions = $GLOBALS['flexyOptions']; - $this->flexyOptions['templateDir'] = BASE . 'Toolkit/Photos/templates/'; - $this->flexyOptions['compileDir'] = BASE . 'Toolkit/Photos/templates/compiled/'; + $this->flexyOptions = $GLOBALS['flexyOptions']; + $this->flexyOptions['templateDir'] = BASE . 'Toolkit/Photos/templates/'; + $this->flexyOptions['compileDir'] = BASE . 'Toolkit/Photos/templates/compiled/'; // the main display page for events to link to $this->pageName = BASE_URL.'index.php?catid='.$_REQUEST['catid']; } @@ -123,9 +123,9 @@ class Toolkit_Photos_Display AND pc.id IN (SELECT distinct(catid) FROM photo) ORDER BY pcb.pos"; try { - $stmt = $this->_dbh->prepare($sql); - $stmt->bindParam(':pageId', $pageId, PDO::PARAM_INT); - $stmt->execute(); + $stmt = $this->_dbh->prepare($sql); + $stmt->bindParam(':pageId', $pageId, PDO::PARAM_INT); + $stmt->execute(); $data = $stmt->fetchAll(PDO::FETCH_ASSOC); if (is_array($data)) { $i = 0; @@ -133,9 +133,9 @@ class Toolkit_Photos_Display unset($row['image']); // use the first one from its photos $sql = " - SELECT image - FROM photo - WHERE catid = :catid + SELECT image + FROM photo + WHERE catid = :catid AND image != '' ORDER BY pos LIMIT 1 @@ -174,7 +174,7 @@ class Toolkit_Photos_Display * listPhotos() * * Display Photos - * + * * @param int $photoCatId Photo Category ID * * @return mixed Return description (if any) ... @@ -187,9 +187,9 @@ class Toolkit_Photos_Display // grab photo album name for display try { $sql = " - SELECT category - FROM photo_category - WHERE id = :id"; + SELECT category + FROM photo_category + WHERE id = :id"; $stmt1 = $this->_dbh->prepare($sql); $stmt1->bindParam(":id", $photoCatId, PDO::PARAM_INT); $stmt1->execute(); @@ -201,8 +201,8 @@ class Toolkit_Photos_Display } // query $sql = " - SELECT * - FROM {$this->photoTable}"; + SELECT * + FROM {$this->photoTable}"; if (is_array($where)) { $sql .= " WHERE ".implode(" AND ", $where); } @@ -213,7 +213,7 @@ class Toolkit_Photos_Display $trueCount = 1; $num = count($data); foreach ($data as &$row) { - $row['firstInRow'] = ($count == 1); + $row['firstInRow'] = ($count == 1); if ($count == $this->rowCount || $trueCount == $num) { $row['lastInRow'] = true; $count = 0; @@ -256,15 +256,15 @@ class Toolkit_Photos_Display */ public function toHTML(array $photoCatIds) { - $GLOBALS['bottomScripts'][] = GLM_APP_BASE_URL . 'gallery/thickbox-3.1.1.js'; - $GLOBALS['styleSheets'][] = GLM_APP_BASE_URL . 'gallery/gallery.css'; - $GLOBALS['styleSheets'][] = GLM_APP_BASE_URL . 'gallery/thickbox.css'; - - if (count($photoCatIds) > 1) { + $baseUrl = ($_SERVER['HTTPS'] == "on") + ? BASE_SECURE_URL + : BASE_URL; + if (count($photoCatIds) > 1) { return $this->listPhotoCategories($_GET['catid']); - } else { + } else { + $GLOBALS['bottomScripts'][] = $baseUrl . 'libjs/photoGallery.js'; return $this->listPhotos($photoCatIds[0]); - } + } } // }}} diff --git a/Toolkit/Photos/templates/photoCats.html b/Toolkit/Photos/templates/photoCats.html index e877442..71d9c30 100755 --- a/Toolkit/Photos/templates/photoCats.html +++ b/Toolkit/Photos/templates/photoCats.html @@ -1,8 +1,16 @@ - - + +