@@ -6,104 +6,104 @@ |
||
6 | 6 | final class PeriodListController extends DefaultLogListController |
7 | 7 | { |
8 | 8 | |
9 | - private static $DEFAULT_TITLE = '%s Hiking Stories, Page %d of %d'; |
|
10 | - private static $DEFAULT_DESCRIPTION = 'Page %d of %d of epic %s hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan'; |
|
11 | - private static $DEFAULT_HEADER = 'Page %d of Awesome %s Waterfall Hiking Stories'; |
|
9 | + private static $DEFAULT_TITLE = '%s Hiking Stories, Page %d of %d'; |
|
10 | + private static $DEFAULT_DESCRIPTION = 'Page %d of %d of epic %s hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan'; |
|
11 | + private static $DEFAULT_HEADER = 'Page %d of Awesome %s Waterfall Hiking Stories'; |
|
12 | 12 | |
13 | - private static $KEYWORD_ARRAY = array( |
|
14 | - 'journal', |
|
15 | - 'stories', |
|
16 | - 'blog', |
|
17 | - 'waterfalls'); |
|
13 | + private static $KEYWORD_ARRAY = array( |
|
14 | + 'journal', |
|
15 | + 'stories', |
|
16 | + 'blog', |
|
17 | + 'waterfalls'); |
|
18 | 18 | |
19 | - private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d %PERIOD% journal entries'; |
|
20 | - private static $LINK_ROOT = '/period/%s/'; |
|
19 | + private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d %PERIOD% journal entries'; |
|
20 | + private static $LINK_ROOT = '/period/%s/'; |
|
21 | 21 | |
22 | - private $period; |
|
22 | + private $period; |
|
23 | 23 | |
24 | - public function __construct() |
|
25 | - { |
|
26 | - $alias = URLDecode::getPiece(2); |
|
27 | - $this->period = PeriodCollector::getByAlias($alias); |
|
24 | + public function __construct() |
|
25 | + { |
|
26 | + $alias = URLDecode::getPiece(2); |
|
27 | + $this->period = PeriodCollector::getByAlias($alias); |
|
28 | 28 | |
29 | - if(!$this->period) |
|
30 | - $this->eject(); |
|
29 | + if(!$this->period) |
|
30 | + $this->eject(); |
|
31 | 31 | |
32 | - parent::__construct(); |
|
33 | - } |
|
32 | + parent::__construct(); |
|
33 | + } |
|
34 | 34 | |
35 | - protected function get_initial_meta() |
|
36 | - { |
|
37 | - $meta_array = array(); |
|
35 | + protected function get_initial_meta() |
|
36 | + { |
|
37 | + $meta_array = array(); |
|
38 | 38 | |
39 | - $meta_array['title'] = "Hiking Stories - {$this->period->name} | " . self::$WEBSITE_TITLE; |
|
40 | - $meta_array['description'] = $this->period->description; |
|
41 | - $meta_array['keywords'] = $this->get_keyword_array(); |
|
39 | + $meta_array['title'] = "Hiking Stories - {$this->period->name} | " . self::$WEBSITE_TITLE; |
|
40 | + $meta_array['description'] = $this->period->description; |
|
41 | + $meta_array['keywords'] = $this->get_keyword_array(); |
|
42 | 42 | |
43 | - return $meta_array; |
|
44 | - } |
|
43 | + return $meta_array; |
|
44 | + } |
|
45 | 45 | |
46 | - protected function get_subsequent_meta() |
|
47 | - { |
|
48 | - $meta_array = array(); |
|
46 | + protected function get_subsequent_meta() |
|
47 | + { |
|
48 | + $meta_array = array(); |
|
49 | 49 | |
50 | - $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->period->name, $this->page, $this->page_count); |
|
51 | - $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->period->name); |
|
52 | - $meta_array['keywords'] = $this->get_keyword_array(); |
|
50 | + $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->period->name, $this->page, $this->page_count); |
|
51 | + $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->period->name); |
|
52 | + $meta_array['keywords'] = $this->get_keyword_array(); |
|
53 | 53 | |
54 | - return $meta_array; |
|
55 | - } |
|
56 | - |
|
57 | - private function get_keyword_array() |
|
58 | - { |
|
59 | - $keyword_array = self::$KEYWORD_ARRAY; |
|
60 | - array_unshift($keyword_array, strtolower($this->period->name)); |
|
61 | - return $keyword_array; |
|
62 | - } |
|
63 | - |
|
64 | - protected function get_initial_introduction() |
|
65 | - { |
|
66 | - $introduction = array(); |
|
54 | + return $meta_array; |
|
55 | + } |
|
56 | + |
|
57 | + private function get_keyword_array() |
|
58 | + { |
|
59 | + $keyword_array = self::$KEYWORD_ARRAY; |
|
60 | + array_unshift($keyword_array, strtolower($this->period->name)); |
|
61 | + return $keyword_array; |
|
62 | + } |
|
63 | + |
|
64 | + protected function get_initial_introduction() |
|
65 | + { |
|
66 | + $introduction = array(); |
|
67 | 67 | |
68 | - $introduction['title'] = $this->period->title; |
|
69 | - $introduction['description'] = Content::instance('FixInternalLink', $this->period->introduction)->activate(); |
|
70 | - $introduction['image'] = $this->get_image_element($this->period->photo_category, $this->period->photo, $this->period->photo_description, 'medium'); |
|
68 | + $introduction['title'] = $this->period->title; |
|
69 | + $introduction['description'] = Content::instance('FixInternalLink', $this->period->introduction)->activate(); |
|
70 | + $introduction['image'] = $this->get_image_element($this->period->photo_category, $this->period->photo, $this->period->photo_description, 'medium'); |
|
71 | 71 | |
72 | - return $introduction; |
|
73 | - } |
|
74 | - |
|
75 | - protected function get_subsequent_introduction() |
|
76 | - { |
|
77 | - return array( |
|
78 | - 'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->period->name)); |
|
79 | - } |
|
80 | - |
|
81 | - protected function get_page_number_piece() |
|
82 | - { |
|
83 | - return URLDecode::getPiece(3); |
|
84 | - } |
|
85 | - |
|
86 | - protected function get_item_result($total, $offset) |
|
87 | - { |
|
88 | - return PeriodCollector::getLogListForPeriod($this->period->id, $total, $offset); |
|
89 | - } |
|
90 | - |
|
91 | - protected function get_item_count_result() |
|
92 | - { |
|
93 | - return PeriodCollector::getLogCountForPeriod($this->period->id); |
|
94 | - } |
|
95 | - |
|
96 | - protected function get_list_description_pattern() |
|
97 | - { |
|
98 | - $period = $this->period->name; |
|
99 | - $period = strtolower($period); |
|
100 | - $navigation_description = str_replace('%PERIOD%', $period, self::$NAVIGATION_DESCRIPTION); |
|
101 | - return $navigation_description; |
|
102 | - } |
|
103 | - |
|
104 | - protected function get_list_link_root() |
|
105 | - { |
|
106 | - return sprintf(self::$LINK_ROOT, $this->period->alias); |
|
107 | - } |
|
72 | + return $introduction; |
|
73 | + } |
|
74 | + |
|
75 | + protected function get_subsequent_introduction() |
|
76 | + { |
|
77 | + return array( |
|
78 | + 'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->period->name)); |
|
79 | + } |
|
80 | + |
|
81 | + protected function get_page_number_piece() |
|
82 | + { |
|
83 | + return URLDecode::getPiece(3); |
|
84 | + } |
|
85 | + |
|
86 | + protected function get_item_result($total, $offset) |
|
87 | + { |
|
88 | + return PeriodCollector::getLogListForPeriod($this->period->id, $total, $offset); |
|
89 | + } |
|
90 | + |
|
91 | + protected function get_item_count_result() |
|
92 | + { |
|
93 | + return PeriodCollector::getLogCountForPeriod($this->period->id); |
|
94 | + } |
|
95 | + |
|
96 | + protected function get_list_description_pattern() |
|
97 | + { |
|
98 | + $period = $this->period->name; |
|
99 | + $period = strtolower($period); |
|
100 | + $navigation_description = str_replace('%PERIOD%', $period, self::$NAVIGATION_DESCRIPTION); |
|
101 | + return $navigation_description; |
|
102 | + } |
|
103 | + |
|
104 | + protected function get_list_link_root() |
|
105 | + { |
|
106 | + return sprintf(self::$LINK_ROOT, $this->period->alias); |
|
107 | + } |
|
108 | 108 | |
109 | 109 | } |
110 | 110 | \ No newline at end of file |
@@ -6,102 +6,102 @@ |
||
6 | 6 | final class CompanionListController extends DefaultLogListController |
7 | 7 | { |
8 | 8 | |
9 | - private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d'; |
|
10 | - private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan'; |
|
11 | - private static $DEFAULT_HEADER = 'Page %d of Legendary Hiking Stories with %s'; |
|
12 | - |
|
13 | - private static $KEYWORD_ARRAY = array( |
|
14 | - 'hiking companions', |
|
15 | - 'journal', |
|
16 | - 'stories', |
|
17 | - 'blog', |
|
18 | - 'waterfalls'); |
|
19 | - |
|
20 | - private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d journal entries with %COMPANION%'; |
|
21 | - private static $LINK_ROOT = '/companion/%s/'; |
|
22 | - |
|
23 | - private $companion; |
|
24 | - |
|
25 | - public function __construct() |
|
26 | - { |
|
27 | - $alias = URLDecode::getPiece(2); |
|
28 | - $this->companion = CompanionCollector::getByAlias($alias); |
|
9 | + private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d'; |
|
10 | + private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan'; |
|
11 | + private static $DEFAULT_HEADER = 'Page %d of Legendary Hiking Stories with %s'; |
|
12 | + |
|
13 | + private static $KEYWORD_ARRAY = array( |
|
14 | + 'hiking companions', |
|
15 | + 'journal', |
|
16 | + 'stories', |
|
17 | + 'blog', |
|
18 | + 'waterfalls'); |
|
19 | + |
|
20 | + private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d journal entries with %COMPANION%'; |
|
21 | + private static $LINK_ROOT = '/companion/%s/'; |
|
22 | + |
|
23 | + private $companion; |
|
24 | + |
|
25 | + public function __construct() |
|
26 | + { |
|
27 | + $alias = URLDecode::getPiece(2); |
|
28 | + $this->companion = CompanionCollector::getByAlias($alias); |
|
29 | 29 | |
30 | - if(!$this->companion) |
|
31 | - $this->eject(); |
|
30 | + if(!$this->companion) |
|
31 | + $this->eject(); |
|
32 | 32 | |
33 | - parent::__construct(); |
|
34 | - } |
|
33 | + parent::__construct(); |
|
34 | + } |
|
35 | 35 | |
36 | - protected function get_initial_meta() |
|
37 | - { |
|
38 | - $meta_array = array(); |
|
36 | + protected function get_initial_meta() |
|
37 | + { |
|
38 | + $meta_array = array(); |
|
39 | 39 | |
40 | - $meta_array['title'] = "Hiking Stories with {$this->companion->name} | " . self::$WEBSITE_TITLE; |
|
41 | - $meta_array['description'] = $this->companion->description; |
|
42 | - $meta_array['keywords'] = $this->get_keyword_array(); |
|
40 | + $meta_array['title'] = "Hiking Stories with {$this->companion->name} | " . self::$WEBSITE_TITLE; |
|
41 | + $meta_array['description'] = $this->companion->description; |
|
42 | + $meta_array['keywords'] = $this->get_keyword_array(); |
|
43 | 43 | |
44 | - return $meta_array; |
|
45 | - } |
|
44 | + return $meta_array; |
|
45 | + } |
|
46 | 46 | |
47 | - protected function get_subsequent_meta() |
|
48 | - { |
|
49 | - $meta_array = array(); |
|
47 | + protected function get_subsequent_meta() |
|
48 | + { |
|
49 | + $meta_array = array(); |
|
50 | 50 | |
51 | - $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->companion->name, $this->page, $this->page_count); |
|
52 | - $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->companion->name); |
|
53 | - $meta_array['keywords'] = $this->get_keyword_array(); |
|
51 | + $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->companion->name, $this->page, $this->page_count); |
|
52 | + $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->companion->name); |
|
53 | + $meta_array['keywords'] = $this->get_keyword_array(); |
|
54 | 54 | |
55 | - return $meta_array; |
|
56 | - } |
|
57 | - |
|
58 | - private function get_keyword_array() |
|
59 | - { |
|
60 | - $keyword_array = self::$KEYWORD_ARRAY; |
|
61 | - array_unshift($keyword_array, strtolower($this->companion->name)); |
|
62 | - return $keyword_array; |
|
63 | - } |
|
64 | - |
|
65 | - protected function get_initial_introduction() |
|
66 | - { |
|
67 | - $introduction = array(); |
|
55 | + return $meta_array; |
|
56 | + } |
|
57 | + |
|
58 | + private function get_keyword_array() |
|
59 | + { |
|
60 | + $keyword_array = self::$KEYWORD_ARRAY; |
|
61 | + array_unshift($keyword_array, strtolower($this->companion->name)); |
|
62 | + return $keyword_array; |
|
63 | + } |
|
64 | + |
|
65 | + protected function get_initial_introduction() |
|
66 | + { |
|
67 | + $introduction = array(); |
|
68 | 68 | |
69 | - $introduction['title'] = $this->companion->title; |
|
70 | - $introduction['description'] = Content::instance('FixInternalLink', $this->companion->introduction)->activate(); |
|
71 | - $introduction['image'] = $this->get_image_element($this->companion->photo_category, $this->companion->photo, $this->companion->photo_description, 'medium'); |
|
69 | + $introduction['title'] = $this->companion->title; |
|
70 | + $introduction['description'] = Content::instance('FixInternalLink', $this->companion->introduction)->activate(); |
|
71 | + $introduction['image'] = $this->get_image_element($this->companion->photo_category, $this->companion->photo, $this->companion->photo_description, 'medium'); |
|
72 | 72 | |
73 | - return $introduction; |
|
74 | - } |
|
75 | - |
|
76 | - protected function get_subsequent_introduction() |
|
77 | - { |
|
78 | - return array( |
|
79 | - 'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->companion->name)); |
|
80 | - } |
|
81 | - |
|
82 | - protected function get_page_number_piece() |
|
83 | - { |
|
84 | - return URLDecode::getPiece(3); |
|
85 | - } |
|
86 | - |
|
87 | - protected function get_item_result($total, $offset) |
|
88 | - { |
|
89 | - return CompanionCollector::getLogListForCompanion($this->companion->id, $total, $offset); |
|
90 | - } |
|
91 | - |
|
92 | - protected function get_item_count_result() |
|
93 | - { |
|
94 | - return CompanionCollector::getLogCountForCompanion($this->companion->id); |
|
95 | - } |
|
96 | - |
|
97 | - protected function get_list_description_pattern() |
|
98 | - { |
|
99 | - return str_replace('%COMPANION%', $this->companion->name, self::$NAVIGATION_DESCRIPTION); |
|
100 | - } |
|
101 | - |
|
102 | - protected function get_list_link_root() |
|
103 | - { |
|
104 | - return sprintf(self::$LINK_ROOT, $this->companion->alias); |
|
105 | - } |
|
73 | + return $introduction; |
|
74 | + } |
|
75 | + |
|
76 | + protected function get_subsequent_introduction() |
|
77 | + { |
|
78 | + return array( |
|
79 | + 'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->companion->name)); |
|
80 | + } |
|
81 | + |
|
82 | + protected function get_page_number_piece() |
|
83 | + { |
|
84 | + return URLDecode::getPiece(3); |
|
85 | + } |
|
86 | + |
|
87 | + protected function get_item_result($total, $offset) |
|
88 | + { |
|
89 | + return CompanionCollector::getLogListForCompanion($this->companion->id, $total, $offset); |
|
90 | + } |
|
91 | + |
|
92 | + protected function get_item_count_result() |
|
93 | + { |
|
94 | + return CompanionCollector::getLogCountForCompanion($this->companion->id); |
|
95 | + } |
|
96 | + |
|
97 | + protected function get_list_description_pattern() |
|
98 | + { |
|
99 | + return str_replace('%COMPANION%', $this->companion->name, self::$NAVIGATION_DESCRIPTION); |
|
100 | + } |
|
101 | + |
|
102 | + protected function get_list_link_root() |
|
103 | + { |
|
104 | + return sprintf(self::$LINK_ROOT, $this->companion->alias); |
|
105 | + } |
|
106 | 106 | |
107 | 107 | } |
108 | 108 | \ No newline at end of file |
@@ -1,97 +1,97 @@ |
||
1 | 1 | <? |
2 | 2 | |
3 | 3 | Loader::load('collector', array( |
4 | - 'image/PhotoCollector', |
|
5 | - 'waterfall/LogCollector')); |
|
4 | + 'image/PhotoCollector', |
|
5 | + 'waterfall/LogCollector')); |
|
6 | 6 | Loader::load('controller', 'waterfalls/DefaultLogListController'); |
7 | 7 | |
8 | 8 | final class LogListController extends DefaultLogListController |
9 | 9 | { |
10 | 10 | |
11 | - private static $PRIMARY_TITLE = 'Journal from Waterfall Hikes'; |
|
12 | - private static $PRIMARY_DESCRIPTION = 'Stories written by Jacob Emerick about his epic waterfall adventures in the general Keweenaw, Ontonagon, and Marquette areas.'; |
|
13 | - private static $PRIMARY_INTRODUCTION_HEADER = 'Journal of Waterfall Adventuring'; |
|
14 | - private static $PRIMARY_INTRODUCTION_IMAGE = 707; |
|
15 | - private static $PRIMARY_INTRODUCTION_DESCRIPTION = 'Whether he is hiking alone through the woods, with Logan running ahead to chase down deer, or with a group of friends, every hike that Jacob sets out turns into an adventure. Hopping from slick rock to rock along a small creek in the city, splashing through deep water over an uncertain riverbed, or pushing thick branches out of the way in thick brush, every journey turns into a little story of discovery.'; |
|
16 | - |
|
17 | - private static $SECONDARY_TITLE = 'Journal Entries - Page %d'; |
|
18 | - private static $SECONDARY_DESCRIPTION = 'Page %d of %d of epic hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan'; |
|
19 | - private static $SECONDARY_INTRODUCTION_HEADER = 'Waterfall Adventure Journal, Page %d of %d'; |
|
20 | - |
|
21 | - private static $KEYWORD_ARRAY = array( |
|
22 | - 'journal', |
|
23 | - 'travel log', |
|
24 | - 'blog', |
|
25 | - 'waterfalls', |
|
26 | - 'hiking companions'); |
|
27 | - |
|
28 | - private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d total journal entries'; |
|
29 | - private static $LINK_ROOT = '/journal/'; |
|
30 | - |
|
31 | - protected function get_initial_meta() |
|
32 | - { |
|
33 | - $meta_array = array(); |
|
11 | + private static $PRIMARY_TITLE = 'Journal from Waterfall Hikes'; |
|
12 | + private static $PRIMARY_DESCRIPTION = 'Stories written by Jacob Emerick about his epic waterfall adventures in the general Keweenaw, Ontonagon, and Marquette areas.'; |
|
13 | + private static $PRIMARY_INTRODUCTION_HEADER = 'Journal of Waterfall Adventuring'; |
|
14 | + private static $PRIMARY_INTRODUCTION_IMAGE = 707; |
|
15 | + private static $PRIMARY_INTRODUCTION_DESCRIPTION = 'Whether he is hiking alone through the woods, with Logan running ahead to chase down deer, or with a group of friends, every hike that Jacob sets out turns into an adventure. Hopping from slick rock to rock along a small creek in the city, splashing through deep water over an uncertain riverbed, or pushing thick branches out of the way in thick brush, every journey turns into a little story of discovery.'; |
|
16 | + |
|
17 | + private static $SECONDARY_TITLE = 'Journal Entries - Page %d'; |
|
18 | + private static $SECONDARY_DESCRIPTION = 'Page %d of %d of epic hiking stories written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan'; |
|
19 | + private static $SECONDARY_INTRODUCTION_HEADER = 'Waterfall Adventure Journal, Page %d of %d'; |
|
20 | + |
|
21 | + private static $KEYWORD_ARRAY = array( |
|
22 | + 'journal', |
|
23 | + 'travel log', |
|
24 | + 'blog', |
|
25 | + 'waterfalls', |
|
26 | + 'hiking companions'); |
|
27 | + |
|
28 | + private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d total journal entries'; |
|
29 | + private static $LINK_ROOT = '/journal/'; |
|
30 | + |
|
31 | + protected function get_initial_meta() |
|
32 | + { |
|
33 | + $meta_array = array(); |
|
34 | 34 | |
35 | - $meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE; |
|
36 | - $meta_array['description'] = self::$PRIMARY_DESCRIPTION; |
|
37 | - $meta_array['keywords'] = self::$KEYWORD_ARRAY; |
|
35 | + $meta_array['title'] = self::$PRIMARY_TITLE . ' | ' . self::$WEBSITE_TITLE; |
|
36 | + $meta_array['description'] = self::$PRIMARY_DESCRIPTION; |
|
37 | + $meta_array['keywords'] = self::$KEYWORD_ARRAY; |
|
38 | 38 | |
39 | - return $meta_array; |
|
40 | - } |
|
39 | + return $meta_array; |
|
40 | + } |
|
41 | 41 | |
42 | - protected function get_subsequent_meta() |
|
43 | - { |
|
44 | - $meta_array = array(); |
|
42 | + protected function get_subsequent_meta() |
|
43 | + { |
|
44 | + $meta_array = array(); |
|
45 | 45 | |
46 | - $meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page); |
|
47 | - $meta_array['description'] = sprintf(self::$SECONDARY_DESCRIPTION, $this->page, $this->page_count); |
|
48 | - $meta_array['keywords'] = self::$KEYWORD_ARRAY; |
|
46 | + $meta_array['title'] = sprintf(self::$SECONDARY_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->page); |
|
47 | + $meta_array['description'] = sprintf(self::$SECONDARY_DESCRIPTION, $this->page, $this->page_count); |
|
48 | + $meta_array['keywords'] = self::$KEYWORD_ARRAY; |
|
49 | 49 | |
50 | - return $meta_array; |
|
51 | - } |
|
50 | + return $meta_array; |
|
51 | + } |
|
52 | 52 | |
53 | - protected function get_initial_introduction() |
|
54 | - { |
|
55 | - $introduction = array(); |
|
53 | + protected function get_initial_introduction() |
|
54 | + { |
|
55 | + $introduction = array(); |
|
56 | 56 | |
57 | - $introduction['title'] = self::$PRIMARY_INTRODUCTION_HEADER; |
|
58 | - $introduction['description'] = self::$PRIMARY_INTRODUCTION_DESCRIPTION; |
|
57 | + $introduction['title'] = self::$PRIMARY_INTRODUCTION_HEADER; |
|
58 | + $introduction['description'] = self::$PRIMARY_INTRODUCTION_DESCRIPTION; |
|
59 | 59 | |
60 | - $image = PhotoCollector::getRow(self::$PRIMARY_INTRODUCTION_IMAGE); |
|
61 | - $introduction['image'] = $this->get_image_element($image->category, $image->name, $image->description, 'medium'); |
|
60 | + $image = PhotoCollector::getRow(self::$PRIMARY_INTRODUCTION_IMAGE); |
|
61 | + $introduction['image'] = $this->get_image_element($image->category, $image->name, $image->description, 'medium'); |
|
62 | 62 | |
63 | - return $introduction; |
|
64 | - } |
|
65 | - |
|
66 | - protected function get_subsequent_introduction() |
|
67 | - { |
|
68 | - return array( |
|
69 | - 'title' => sprintf(self::$SECONDARY_INTRODUCTION_HEADER, $this->page, $this->page_count)); |
|
70 | - } |
|
71 | - |
|
72 | - protected function get_page_number_piece() |
|
73 | - { |
|
74 | - return URLDecode::getPiece(2); |
|
75 | - } |
|
76 | - |
|
77 | - protected function get_item_result($total, $offset) |
|
78 | - { |
|
79 | - return LogCollector::getList($total, $offset); |
|
80 | - } |
|
81 | - |
|
82 | - protected function get_item_count_result() |
|
83 | - { |
|
84 | - return LogCollector::getListCount(); |
|
85 | - } |
|
86 | - |
|
87 | - protected function get_list_description_pattern() |
|
88 | - { |
|
89 | - return self::$NAVIGATION_DESCRIPTION; |
|
90 | - } |
|
91 | - |
|
92 | - protected function get_list_link_root() |
|
93 | - { |
|
94 | - return self::$LINK_ROOT; |
|
95 | - } |
|
63 | + return $introduction; |
|
64 | + } |
|
65 | + |
|
66 | + protected function get_subsequent_introduction() |
|
67 | + { |
|
68 | + return array( |
|
69 | + 'title' => sprintf(self::$SECONDARY_INTRODUCTION_HEADER, $this->page, $this->page_count)); |
|
70 | + } |
|
71 | + |
|
72 | + protected function get_page_number_piece() |
|
73 | + { |
|
74 | + return URLDecode::getPiece(2); |
|
75 | + } |
|
76 | + |
|
77 | + protected function get_item_result($total, $offset) |
|
78 | + { |
|
79 | + return LogCollector::getList($total, $offset); |
|
80 | + } |
|
81 | + |
|
82 | + protected function get_item_count_result() |
|
83 | + { |
|
84 | + return LogCollector::getListCount(); |
|
85 | + } |
|
86 | + |
|
87 | + protected function get_list_description_pattern() |
|
88 | + { |
|
89 | + return self::$NAVIGATION_DESCRIPTION; |
|
90 | + } |
|
91 | + |
|
92 | + protected function get_list_link_root() |
|
93 | + { |
|
94 | + return self::$LINK_ROOT; |
|
95 | + } |
|
96 | 96 | |
97 | 97 | } |
98 | 98 | \ No newline at end of file |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | $this->waterfall = WaterfallCollector::getByAlias($path_watercourse, $path_fall); |
29 | 29 | if (!$this->waterfall) { |
30 | - $this->eject(); |
|
30 | + $this->eject(); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | $this->handle_comment_submit( |
@@ -141,18 +141,18 @@ discard block |
||
141 | 141 | return $album; |
142 | 142 | } |
143 | 143 | |
144 | - private function get_sidebar($waterfall) |
|
145 | - { |
|
146 | - $sidebar_data = array(); |
|
147 | - $sidebar_data['name'] = $waterfall->name; |
|
148 | - $sidebar_data['watercourse'] = $waterfall->watercourse; |
|
144 | + private function get_sidebar($waterfall) |
|
145 | + { |
|
146 | + $sidebar_data = array(); |
|
147 | + $sidebar_data['name'] = $waterfall->name; |
|
148 | + $sidebar_data['watercourse'] = $waterfall->watercourse; |
|
149 | 149 | $sidebar_data['main_watercourse'] = $this->get_main_watercourse($waterfall->watercourse_alias); |
150 | - $sidebar_data['rating_display'] = ($waterfall->rating / 2) . '/5'; |
|
150 | + $sidebar_data['rating_display'] = ($waterfall->rating / 2) . '/5'; |
|
151 | 151 | $sidebar_data['rating'] = $waterfall->rating; |
152 | - $sidebar_data['height'] = Content::instance('ImperialUnit', $waterfall->height)->activate('inches'); |
|
153 | - $sidebar_data['width'] = Content::instance('ImperialUnit', $waterfall->width)->activate('inches'); |
|
154 | - $sidebar_data['drop_height'] = Content::instance('ImperialUnit', $waterfall->drop_height)->activate('inches'); |
|
155 | - $sidebar_data['drop_count'] = $waterfall->drop_count; |
|
152 | + $sidebar_data['height'] = Content::instance('ImperialUnit', $waterfall->height)->activate('inches'); |
|
153 | + $sidebar_data['width'] = Content::instance('ImperialUnit', $waterfall->width)->activate('inches'); |
|
154 | + $sidebar_data['drop_height'] = Content::instance('ImperialUnit', $waterfall->drop_height)->activate('inches'); |
|
155 | + $sidebar_data['drop_count'] = $waterfall->drop_count; |
|
156 | 156 | |
157 | 157 | $sidebar_data['county'] = (object) array ( |
158 | 158 | 'name' => $waterfall->county, |
@@ -160,10 +160,10 @@ discard block |
||
160 | 160 | 'title' => $waterfall->county_title, |
161 | 161 | ); |
162 | 162 | |
163 | - $sidebar_data['nearest_town'] = $waterfall->nearest_town; |
|
164 | - $sidebar_data['latitude'] = round($waterfall->latitude, 5); |
|
165 | - $sidebar_data['longitude'] = round($waterfall->longitude, 5); |
|
166 | - $sidebar_data['elevation'] = Content::instance('ImperialUnit', $waterfall->elevation)->activate('feet'); |
|
163 | + $sidebar_data['nearest_town'] = $waterfall->nearest_town; |
|
164 | + $sidebar_data['latitude'] = round($waterfall->latitude, 5); |
|
165 | + $sidebar_data['longitude'] = round($waterfall->longitude, 5); |
|
166 | + $sidebar_data['elevation'] = Content::instance('ImperialUnit', $waterfall->elevation)->activate('feet'); |
|
167 | 167 | |
168 | 168 | $sidebar_data['map'] = $this->get_map_piece($waterfall); |
169 | 169 | |
@@ -171,8 +171,8 @@ discard block |
||
171 | 171 | |
172 | 172 | $sidebar_data['nearby_list'] = $this->get_nearby_list($waterfall->id); |
173 | 173 | |
174 | - return $sidebar_data; |
|
175 | - } |
|
174 | + return $sidebar_data; |
|
175 | + } |
|
176 | 176 | |
177 | 177 | private function get_journal_list($waterfall) |
178 | 178 | { |
@@ -5,19 +5,19 @@ discard block |
||
5 | 5 | abstract class DefaultPageController extends PageController |
6 | 6 | { |
7 | 7 | |
8 | - protected static $WEBSITE_TITLE = 'Waterfalls of the Keweenaw'; |
|
9 | - protected static $PAGE_DESCRIPTION_LIMIT = 250; |
|
8 | + protected static $WEBSITE_TITLE = 'Waterfalls of the Keweenaw'; |
|
9 | + protected static $PAGE_DESCRIPTION_LIMIT = 250; |
|
10 | 10 | |
11 | - protected static $WATERFALL_SITE_ID = 5; |
|
11 | + protected static $WATERFALL_SITE_ID = 5; |
|
12 | 12 | |
13 | 13 | protected $parent_navigation_item = ''; |
14 | 14 | |
15 | - protected function set_head_data() |
|
16 | - { |
|
17 | - $this->set_head('google_verification', 'm9ua4n8lp4FUYYa2UOh51UyZYfdivl-kRTtXKwaH0-s'); |
|
18 | - $this->add_css('normalize'); |
|
19 | - $this->add_css('waterfalls'); |
|
20 | - } |
|
15 | + protected function set_head_data() |
|
16 | + { |
|
17 | + $this->set_head('google_verification', 'm9ua4n8lp4FUYYa2UOh51UyZYfdivl-kRTtXKwaH0-s'); |
|
18 | + $this->add_css('normalize'); |
|
19 | + $this->add_css('waterfalls'); |
|
20 | + } |
|
21 | 21 | |
22 | 22 | protected function add_waterfall_js() |
23 | 23 | { |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | $this->add_js('waterfalls'); |
27 | 27 | } |
28 | 28 | |
29 | - protected function set_body_data($page_type = 'normal') |
|
30 | - { |
|
31 | - $this->set_body('activity_array', $this->get_recent_activity()); |
|
29 | + protected function set_body_data($page_type = 'normal') |
|
30 | + { |
|
31 | + $this->set_body('activity_array', $this->get_recent_activity()); |
|
32 | 32 | |
33 | 33 | $this->set_body('main_navigation', array( |
34 | 34 | (object) array( |
@@ -6,109 +6,109 @@ |
||
6 | 6 | final class WatercourseListController extends DefaultWaterfallListController |
7 | 7 | { |
8 | 8 | |
9 | - private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d'; |
|
10 | - private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan'; |
|
11 | - private static $DEFAULT_HEADER = 'Page %d of Legendary Hiking Stories with %s'; |
|
9 | + private static $DEFAULT_TITLE = 'Hiking with %s, Page %d of %d'; |
|
10 | + private static $DEFAULT_DESCRIPTION = 'Page %d of %d of legendary hiking stories with %s written by Jacob Emerick, all about his adventures hunting waterfalls in the Upper Peninsula of Michigan'; |
|
11 | + private static $DEFAULT_HEADER = 'Page %d of Legendary Hiking Stories with %s'; |
|
12 | 12 | |
13 | - private static $KEYWORD_ARRAY = array( |
|
14 | - 'hiking companions', |
|
15 | - 'journal', |
|
16 | - 'stories', |
|
17 | - 'blog', |
|
18 | - 'waterfalls'); |
|
13 | + private static $KEYWORD_ARRAY = array( |
|
14 | + 'hiking companions', |
|
15 | + 'journal', |
|
16 | + 'stories', |
|
17 | + 'blog', |
|
18 | + 'waterfalls'); |
|
19 | 19 | |
20 | - private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d waterfalls in %COUNTY%'; |
|
21 | - private static $LINK_ROOT = '/%s/'; |
|
20 | + private static $NAVIGATION_DESCRIPTION = 'displaying %d ~ %d of %d waterfalls in %COUNTY%'; |
|
21 | + private static $LINK_ROOT = '/%s/'; |
|
22 | 22 | |
23 | - protected static $ITEM_COUNT_PER_PAGE = 12; |
|
23 | + protected static $ITEM_COUNT_PER_PAGE = 12; |
|
24 | 24 | |
25 | - private $watercourse; |
|
25 | + private $watercourse; |
|
26 | 26 | |
27 | - public function __construct() |
|
28 | - { |
|
29 | - $path = URLDecode::getPiece(1); |
|
30 | - $this->watercourse = WatercourseCollector::getByAlias($path); |
|
27 | + public function __construct() |
|
28 | + { |
|
29 | + $path = URLDecode::getPiece(1); |
|
30 | + $this->watercourse = WatercourseCollector::getByAlias($path); |
|
31 | 31 | |
32 | - if(!$this->watercourse) |
|
33 | - $this->eject(); |
|
32 | + if(!$this->watercourse) |
|
33 | + $this->eject(); |
|
34 | 34 | |
35 | - parent::__construct(); |
|
36 | - } |
|
35 | + parent::__construct(); |
|
36 | + } |
|
37 | 37 | |
38 | - protected function get_initial_meta() |
|
39 | - { |
|
40 | - $meta_array = array(); |
|
38 | + protected function get_initial_meta() |
|
39 | + { |
|
40 | + $meta_array = array(); |
|
41 | 41 | |
42 | - $meta_array['title'] = "{$this->watercourse->name} | " . self::$WEBSITE_TITLE; |
|
43 | - $meta_array['description'] = $this->watercourse->description; |
|
44 | - $meta_array['keywords'] = $this->get_keyword_array(); |
|
42 | + $meta_array['title'] = "{$this->watercourse->name} | " . self::$WEBSITE_TITLE; |
|
43 | + $meta_array['description'] = $this->watercourse->description; |
|
44 | + $meta_array['keywords'] = $this->get_keyword_array(); |
|
45 | 45 | |
46 | - return $meta_array; |
|
47 | - } |
|
46 | + return $meta_array; |
|
47 | + } |
|
48 | 48 | |
49 | - protected function get_subsequent_meta() |
|
50 | - { |
|
51 | - $meta_array = array(); |
|
49 | + protected function get_subsequent_meta() |
|
50 | + { |
|
51 | + $meta_array = array(); |
|
52 | 52 | |
53 | - $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->watercourse->name, $this->page, $this->page_count); |
|
54 | - $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->watercourse->name); |
|
55 | - $meta_array['keywords'] = $this->get_keyword_array(); |
|
53 | + $meta_array['title'] = sprintf(self::$DEFAULT_TITLE . ' | ' . self::$WEBSITE_TITLE, $this->watercourse->name, $this->page, $this->page_count); |
|
54 | + $meta_array['description'] = sprintf(self::$DEFAULT_DESCRIPTION, $this->page, $this->page_count, $this->watercourse->name); |
|
55 | + $meta_array['keywords'] = $this->get_keyword_array(); |
|
56 | 56 | |
57 | - return $meta_array; |
|
58 | - } |
|
59 | - |
|
60 | - private function get_keyword_array() |
|
61 | - { |
|
62 | - $keyword_array = self::$KEYWORD_ARRAY; |
|
63 | - array_unshift($keyword_array, strtolower($this->watercourse->name)); |
|
64 | - return $keyword_array; |
|
65 | - } |
|
66 | - |
|
67 | - protected function get_initial_introduction() |
|
68 | - { |
|
69 | - $introduction = array(); |
|
57 | + return $meta_array; |
|
58 | + } |
|
59 | + |
|
60 | + private function get_keyword_array() |
|
61 | + { |
|
62 | + $keyword_array = self::$KEYWORD_ARRAY; |
|
63 | + array_unshift($keyword_array, strtolower($this->watercourse->name)); |
|
64 | + return $keyword_array; |
|
65 | + } |
|
66 | + |
|
67 | + protected function get_initial_introduction() |
|
68 | + { |
|
69 | + $introduction = array(); |
|
70 | 70 | |
71 | - $introduction['title'] = $this->watercourse->header; |
|
72 | - $introduction['description'] = Content::instance('FixInternalLink', $this->watercourse->introduction)->activate(); |
|
73 | - $introduction['image'] = $this->get_image_element($this->watercourse->photo_category, $this->watercourse->photo, $this->watercourse->photo_description, 'medium'); |
|
71 | + $introduction['title'] = $this->watercourse->header; |
|
72 | + $introduction['description'] = Content::instance('FixInternalLink', $this->watercourse->introduction)->activate(); |
|
73 | + $introduction['image'] = $this->get_image_element($this->watercourse->photo_category, $this->watercourse->photo, $this->watercourse->photo_description, 'medium'); |
|
74 | 74 | |
75 | - return $introduction; |
|
76 | - } |
|
77 | - |
|
78 | - protected function get_subsequent_introduction() |
|
79 | - { |
|
80 | - return array( |
|
81 | - 'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->watercourse->name)); |
|
82 | - } |
|
83 | - |
|
84 | - protected function get_item_count_per_page() |
|
85 | - { |
|
86 | - return self::$ITEM_COUNT_PER_PAGE; |
|
87 | - } |
|
88 | - |
|
89 | - protected function get_page_number_piece() |
|
90 | - { |
|
91 | - return URLDecode::getPiece(2); |
|
92 | - } |
|
93 | - |
|
94 | - protected function get_item_result($total, $offset) |
|
95 | - { |
|
96 | - return WatercourseCollector::getLogListForWatercourse($this->watercourse->id, $total, $offset); |
|
97 | - } |
|
98 | - |
|
99 | - protected function get_item_count_result() |
|
100 | - { |
|
101 | - return WatercourseCollector::getLogCountForWatercourse($this->watercourse->id); |
|
102 | - } |
|
103 | - |
|
104 | - protected function get_list_description_pattern() |
|
105 | - { |
|
106 | - return str_replace('%COUNTY%', $this->watercourse->name, self::$NAVIGATION_DESCRIPTION); |
|
107 | - } |
|
108 | - |
|
109 | - protected function get_list_link_root() |
|
110 | - { |
|
111 | - return sprintf(self::$LINK_ROOT, $this->watercourse->alias); |
|
112 | - } |
|
75 | + return $introduction; |
|
76 | + } |
|
77 | + |
|
78 | + protected function get_subsequent_introduction() |
|
79 | + { |
|
80 | + return array( |
|
81 | + 'title' => sprintf(self::$DEFAULT_HEADER, $this->page, $this->watercourse->name)); |
|
82 | + } |
|
83 | + |
|
84 | + protected function get_item_count_per_page() |
|
85 | + { |
|
86 | + return self::$ITEM_COUNT_PER_PAGE; |
|
87 | + } |
|
88 | + |
|
89 | + protected function get_page_number_piece() |
|
90 | + { |
|
91 | + return URLDecode::getPiece(2); |
|
92 | + } |
|
93 | + |
|
94 | + protected function get_item_result($total, $offset) |
|
95 | + { |
|
96 | + return WatercourseCollector::getLogListForWatercourse($this->watercourse->id, $total, $offset); |
|
97 | + } |
|
98 | + |
|
99 | + protected function get_item_count_result() |
|
100 | + { |
|
101 | + return WatercourseCollector::getLogCountForWatercourse($this->watercourse->id); |
|
102 | + } |
|
103 | + |
|
104 | + protected function get_list_description_pattern() |
|
105 | + { |
|
106 | + return str_replace('%COUNTY%', $this->watercourse->name, self::$NAVIGATION_DESCRIPTION); |
|
107 | + } |
|
108 | + |
|
109 | + protected function get_list_link_root() |
|
110 | + { |
|
111 | + return sprintf(self::$LINK_ROOT, $this->watercourse->alias); |
|
112 | + } |
|
113 | 113 | |
114 | 114 | } |
115 | 115 | \ No newline at end of file |
@@ -5,71 +5,71 @@ |
||
5 | 5 | final class ContactController extends DefaultPageController |
6 | 6 | { |
7 | 7 | |
8 | - private static $TITLE = 'Contact Jacob Emerick | Waterfalls of the Keweenaw'; |
|
9 | - private static $DESCRIPTION = 'Contact page to reach Jacob Emerick by email or social networks'; |
|
8 | + private static $TITLE = 'Contact Jacob Emerick | Waterfalls of the Keweenaw'; |
|
9 | + private static $DESCRIPTION = 'Contact page to reach Jacob Emerick by email or social networks'; |
|
10 | 10 | |
11 | - private static $KEYWORD_ARRAY = array( |
|
12 | - 'contact', |
|
13 | - 'email', |
|
14 | - 'waterfalls', |
|
15 | - 'Jacob Emerick'); |
|
11 | + private static $KEYWORD_ARRAY = array( |
|
12 | + 'contact', |
|
13 | + 'email', |
|
14 | + 'waterfalls', |
|
15 | + 'Jacob Emerick'); |
|
16 | 16 | |
17 | - protected function set_head_data() |
|
18 | - { |
|
19 | - $this->set_title(self::$TITLE); |
|
20 | - $this->set_description(self::$DESCRIPTION); |
|
21 | - $this->set_keywords(self::$KEYWORD_ARRAY); |
|
17 | + protected function set_head_data() |
|
18 | + { |
|
19 | + $this->set_title(self::$TITLE); |
|
20 | + $this->set_description(self::$DESCRIPTION); |
|
21 | + $this->set_keywords(self::$KEYWORD_ARRAY); |
|
22 | 22 | |
23 | - parent::set_head_data(); |
|
24 | - } |
|
23 | + parent::set_head_data(); |
|
24 | + } |
|
25 | 25 | |
26 | - protected function set_body_data() |
|
27 | - { |
|
28 | - $this->set_body('form_container', $this->process_form()); |
|
29 | - $this->set_body('view', 'Contact'); |
|
26 | + protected function set_body_data() |
|
27 | + { |
|
28 | + $this->set_body('form_container', $this->process_form()); |
|
29 | + $this->set_body('view', 'Contact'); |
|
30 | 30 | |
31 | - parent::set_body_data(); |
|
32 | - } |
|
31 | + parent::set_body_data(); |
|
32 | + } |
|
33 | 33 | |
34 | - private function process_form() |
|
35 | - { |
|
36 | - if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!') |
|
37 | - return (object) array('display' => 'normal'); |
|
34 | + private function process_form() |
|
35 | + { |
|
36 | + if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!') |
|
37 | + return (object) array('display' => 'normal'); |
|
38 | 38 | |
39 | - Loader::load('utility', 'Validate'); |
|
40 | - $error_result = array(); |
|
41 | - if(!Validate::checkRequest('post', 'name', 'string')) |
|
42 | - $error_result['name'] = 'please enter your name'; |
|
43 | - if(!Validate::checkRequest('post', 'email', 'string')) |
|
44 | - $error_result['email'] = 'please enter a valid email'; |
|
45 | - if(!Validate::checkRequest('post', 'message', 'string')) |
|
46 | - $error_result['message'] = 'please write a message'; |
|
39 | + Loader::load('utility', 'Validate'); |
|
40 | + $error_result = array(); |
|
41 | + if(!Validate::checkRequest('post', 'name', 'string')) |
|
42 | + $error_result['name'] = 'please enter your name'; |
|
43 | + if(!Validate::checkRequest('post', 'email', 'string')) |
|
44 | + $error_result['email'] = 'please enter a valid email'; |
|
45 | + if(!Validate::checkRequest('post', 'message', 'string')) |
|
46 | + $error_result['message'] = 'please write a message'; |
|
47 | 47 | |
48 | - $values = (object) array( |
|
49 | - 'name' => Request::getPost('name'), |
|
50 | - 'email' => Request::getPost('email'), |
|
51 | - 'message' => Request::getPost('message')); |
|
48 | + $values = (object) array( |
|
49 | + 'name' => Request::getPost('name'), |
|
50 | + 'email' => Request::getPost('email'), |
|
51 | + 'message' => Request::getPost('message')); |
|
52 | 52 | |
53 | - if(count($error_result) > 0) |
|
54 | - { |
|
55 | - return (object) array( |
|
56 | - 'display' => 'error', |
|
57 | - 'messages' => $error_result, |
|
58 | - 'values' => $values); |
|
59 | - } |
|
53 | + if(count($error_result) > 0) |
|
54 | + { |
|
55 | + return (object) array( |
|
56 | + 'display' => 'error', |
|
57 | + 'messages' => $error_result, |
|
58 | + 'values' => $values); |
|
59 | + } |
|
60 | 60 | |
61 | 61 | global $container; |
62 | 62 | $sent = $container['mail'] |
63 | - ->addTo($container['config']->admin_email) |
|
64 | - ->setSubject('Waterfall Site Contact') |
|
65 | - ->setPlainMessage( |
|
63 | + ->addTo($container['config']->admin_email) |
|
64 | + ->setSubject('Waterfall Site Contact') |
|
65 | + ->setPlainMessage( |
|
66 | 66 | "Name: {$values->name}\n" . |
67 | 67 | "Email: {$values->email}\n" . |
68 | 68 | "Message: {$values->message}" |
69 | - ) |
|
70 | - ->send(); |
|
69 | + ) |
|
70 | + ->send(); |
|
71 | 71 | |
72 | - return (object) array('display' => 'success'); |
|
73 | - } |
|
72 | + return (object) array('display' => 'success'); |
|
73 | + } |
|
74 | 74 | |
75 | 75 | } |
@@ -5,62 +5,62 @@ |
||
5 | 5 | final class SearchListController extends DefaultListController |
6 | 6 | { |
7 | 7 | |
8 | - private static $TITLE = 'Search Listing'; |
|
9 | - private static $DESCRIPTION = ''; |
|
8 | + private static $TITLE = 'Search Listing'; |
|
9 | + private static $DESCRIPTION = ''; |
|
10 | 10 | |
11 | - private static $KEYWORD_ARRAY = array(); |
|
11 | + private static $KEYWORD_ARRAY = array(); |
|
12 | 12 | |
13 | - protected function set_head_data() |
|
14 | - { |
|
15 | - parent::set_head_data(); |
|
13 | + protected function set_head_data() |
|
14 | + { |
|
15 | + parent::set_head_data(); |
|
16 | 16 | |
17 | - $this->set_title(self::$TITLE); |
|
18 | - $this->set_description(self::$DESCRIPTION); |
|
19 | - $this->set_keywords(self::$KEYWORD_ARRAY); |
|
20 | - } |
|
17 | + $this->set_title(self::$TITLE); |
|
18 | + $this->set_description(self::$DESCRIPTION); |
|
19 | + $this->set_keywords(self::$KEYWORD_ARRAY); |
|
20 | + } |
|
21 | 21 | |
22 | - protected function get_introduction() |
|
23 | - { |
|
24 | - return; |
|
25 | - } |
|
22 | + protected function get_introduction() |
|
23 | + { |
|
24 | + return; |
|
25 | + } |
|
26 | 26 | |
27 | - protected function get_page_number() |
|
28 | - { |
|
29 | - $page = URLDecode::getPiece(2); |
|
30 | - if(isset($page) && is_numeric($page)) |
|
31 | - return $page; |
|
32 | - return 1; |
|
33 | - } |
|
27 | + protected function get_page_number() |
|
28 | + { |
|
29 | + $page = URLDecode::getPiece(2); |
|
30 | + if(isset($page) && is_numeric($page)) |
|
31 | + return $page; |
|
32 | + return 1; |
|
33 | + } |
|
34 | 34 | |
35 | - protected function get_items() |
|
36 | - { |
|
37 | - return array(); |
|
38 | - } |
|
35 | + protected function get_items() |
|
36 | + { |
|
37 | + return array(); |
|
38 | + } |
|
39 | 39 | |
40 | - protected function get_list_description() |
|
41 | - { |
|
42 | - return 'yay cloud'; |
|
43 | - } |
|
40 | + protected function get_list_description() |
|
41 | + { |
|
42 | + return 'yay cloud'; |
|
43 | + } |
|
44 | 44 | |
45 | - protected function get_list_next_link() |
|
46 | - { |
|
47 | - return '/'; |
|
48 | - } |
|
45 | + protected function get_list_next_link() |
|
46 | + { |
|
47 | + return '/'; |
|
48 | + } |
|
49 | 49 | |
50 | - protected function get_list_prev_link() |
|
51 | - { |
|
52 | - return '/'; |
|
53 | - } |
|
50 | + protected function get_list_prev_link() |
|
51 | + { |
|
52 | + return '/'; |
|
53 | + } |
|
54 | 54 | |
55 | - private $total_post_count; |
|
56 | - protected function get_item_count() |
|
57 | - { |
|
58 | - return 20; |
|
59 | - } |
|
55 | + private $total_post_count; |
|
56 | + protected function get_item_count() |
|
57 | + { |
|
58 | + return 20; |
|
59 | + } |
|
60 | 60 | |
61 | - protected function get_item_count_per_page() |
|
62 | - { |
|
63 | - return 20; |
|
64 | - } |
|
61 | + protected function get_item_count_per_page() |
|
62 | + { |
|
63 | + return 20; |
|
64 | + } |
|
65 | 65 | |
66 | 66 | } |
67 | 67 | \ No newline at end of file |
@@ -1,72 +1,72 @@ |
||
1 | 1 | <? |
2 | 2 | |
3 | 3 | Loader::load('collector', array( |
4 | - 'comment/CommentCollector', |
|
5 | - 'waterfall/CountyCollector', |
|
6 | - 'waterfall/WatercourseCollector', |
|
7 | - 'waterfall/WaterfallCollector')); |
|
4 | + 'comment/CommentCollector', |
|
5 | + 'waterfall/CountyCollector', |
|
6 | + 'waterfall/WatercourseCollector', |
|
7 | + 'waterfall/WaterfallCollector')); |
|
8 | 8 | Loader::load('controller', 'waterfalls/DefaultListController'); |
9 | 9 | |
10 | 10 | abstract class DefaultWaterfallListController extends DefaultListController |
11 | 11 | { |
12 | 12 | |
13 | - protected static $ITEM_COUNT_PER_PAGE = 24; |
|
13 | + protected static $ITEM_COUNT_PER_PAGE = 24; |
|
14 | 14 | |
15 | - final protected function get_list_view() |
|
16 | - { |
|
17 | - return 'FallListing'; |
|
18 | - } |
|
15 | + final protected function get_list_view() |
|
16 | + { |
|
17 | + return 'FallListing'; |
|
18 | + } |
|
19 | 19 | |
20 | - protected function get_item_count_per_page() |
|
21 | - { |
|
22 | - return self::$ITEM_COUNT_PER_PAGE; |
|
23 | - } |
|
20 | + protected function get_item_count_per_page() |
|
21 | + { |
|
22 | + return self::$ITEM_COUNT_PER_PAGE; |
|
23 | + } |
|
24 | 24 | |
25 | - final protected function format_item($item) |
|
26 | - { |
|
27 | - $item_array = array(); |
|
25 | + final protected function format_item($item) |
|
26 | + { |
|
27 | + $item_array = array(); |
|
28 | 28 | |
29 | - $item_array['name'] = $item->name; |
|
30 | - $item_array['watercourse'] = $item->watercourse; |
|
31 | - $item_array['county'] = $item->county; |
|
32 | - $item_array['image'] = $this->get_image_element($item->photo_category, $item->photo, $item->photo_description, 'medium'); |
|
33 | - $item_array['path'] = "/{$item->watercourse_alias}/{$item->waterfall_alias}/"; |
|
34 | - $item_array['comment_count'] = CommentCollector::getCommentCountForURL(self::$WATERFALL_SITE_ID, "/{$item->watercourse_alias}/{$item->waterfall_alias}/"); |
|
29 | + $item_array['name'] = $item->name; |
|
30 | + $item_array['watercourse'] = $item->watercourse; |
|
31 | + $item_array['county'] = $item->county; |
|
32 | + $item_array['image'] = $this->get_image_element($item->photo_category, $item->photo, $item->photo_description, 'medium'); |
|
33 | + $item_array['path'] = "/{$item->watercourse_alias}/{$item->waterfall_alias}/"; |
|
34 | + $item_array['comment_count'] = CommentCollector::getCommentCountForURL(self::$WATERFALL_SITE_ID, "/{$item->watercourse_alias}/{$item->waterfall_alias}/"); |
|
35 | 35 | |
36 | - return $item_array; |
|
37 | - } |
|
36 | + return $item_array; |
|
37 | + } |
|
38 | 38 | |
39 | - final protected function get_sidebar() |
|
40 | - { |
|
41 | - $county_result = CountyCollector::getCountyList(); |
|
42 | - $county_list = array(); |
|
39 | + final protected function get_sidebar() |
|
40 | + { |
|
41 | + $county_result = CountyCollector::getCountyList(); |
|
42 | + $county_list = array(); |
|
43 | 43 | |
44 | - foreach($county_result as $county_row) |
|
45 | - { |
|
46 | - $county = new stdclass(); |
|
47 | - $county->name = $county_row->name; |
|
48 | - $county->uri = "/{$county_row->alias}/"; |
|
49 | - $county->count = $county_row->count; |
|
44 | + foreach($county_result as $county_row) |
|
45 | + { |
|
46 | + $county = new stdclass(); |
|
47 | + $county->name = $county_row->name; |
|
48 | + $county->uri = "/{$county_row->alias}/"; |
|
49 | + $county->count = $county_row->count; |
|
50 | 50 | |
51 | - $county_list[] = $county; |
|
52 | - } |
|
51 | + $county_list[] = $county; |
|
52 | + } |
|
53 | 53 | |
54 | - $watercourse_result = WatercourseCollector::getWatercourseList(); |
|
55 | - $watercourse_list = array(); |
|
54 | + $watercourse_result = WatercourseCollector::getWatercourseList(); |
|
55 | + $watercourse_list = array(); |
|
56 | 56 | |
57 | - foreach($watercourse_result as $watercourse_row) |
|
58 | - { |
|
59 | - $watercourse = new stdclass(); |
|
60 | - $watercourse->name = $watercourse_row->name; |
|
61 | - $watercourse->uri = "/{$watercourse_row->alias}/"; |
|
62 | - $watercourse->count = $watercourse_row->count; |
|
57 | + foreach($watercourse_result as $watercourse_row) |
|
58 | + { |
|
59 | + $watercourse = new stdclass(); |
|
60 | + $watercourse->name = $watercourse_row->name; |
|
61 | + $watercourse->uri = "/{$watercourse_row->alias}/"; |
|
62 | + $watercourse->count = $watercourse_row->count; |
|
63 | 63 | |
64 | - $watercourse_list[] = $watercourse; |
|
65 | - } |
|
64 | + $watercourse_list[] = $watercourse; |
|
65 | + } |
|
66 | 66 | |
67 | - return array( |
|
68 | - 'county_list' => $county_list, |
|
69 | - 'watercourse_list' => $watercourse_list); |
|
70 | - } |
|
67 | + return array( |
|
68 | + 'county_list' => $county_list, |
|
69 | + 'watercourse_list' => $watercourse_list); |
|
70 | + } |
|
71 | 71 | |
72 | 72 | } |
73 | 73 | \ No newline at end of file |