@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $this->board_url = generate_board_url(true); |
99 | 99 | $this->display_mode = $view_mode; |
100 | - $this->tpl_name = ($custom_tpl) ? $tpl_name ?: $this->content_type . '_' . $view_mode : ''; |
|
100 | + $this->tpl_name = ($custom_tpl) ? $tpl_name ?: $this->content_type.'_'.$view_mode : ''; |
|
101 | 101 | $this->view_mode = (in_array($view_mode, array('summary', 'detail'))) ? $view_mode : 'summary'; |
102 | 102 | $this->db_fields = $db_fields; |
103 | 103 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function show($type, array $topic_data, array $post_data, array $users_cache, array &$attachments, array &$update_count, array $topic_tracking_info, array $topic_data_overwrite = array(), $mode = '') |
122 | 122 | { |
123 | - $callable = 'get_' . $this->view_mode . '_template_data'; |
|
123 | + $callable = 'get_'.$this->view_mode.'_template_data'; |
|
124 | 124 | $tpl_data = array_merge(array( |
125 | 125 | 'TOPIC_COMMENTS' => $this->comments->count($topic_data), |
126 | 126 | 'S_USER_LOGGED_IN' => $this->user->data['is_registered'], |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $topic_data_overwrite |
130 | 130 | ); |
131 | 131 | |
132 | - $tpl_data['PERMA_LINK'] = $this->board_url . parse_url($tpl_data['TOPIC_URL'], PHP_URL_PATH); |
|
132 | + $tpl_data['PERMA_LINK'] = $this->board_url.parse_url($tpl_data['TOPIC_URL'], PHP_URL_PATH); |
|
133 | 133 | |
134 | 134 | return $this->build_content($tpl_data); |
135 | 135 | } |
@@ -207,21 +207,21 @@ discard block |
||
207 | 207 | $field_data['field_props'] = array_replace_recursive($this->form_fields[$field_type]->get_default_props(), $field_data['field_props']); |
208 | 208 | $field_data['field_value'] = &$field_values[$field_name]; |
209 | 209 | |
210 | - $field_contents = $this->form_fields[$field_type]->display_field($field_data, $tpl_data, $this->display_mode); |
|
210 | + $field_contents = $this->form_fields[$field_type]->display_field($field_data, $tpl_data, $this->display_mode); |
|
211 | 211 | |
212 | 212 | // this essentially hides other fields if the field returns an array |
213 | 213 | if (is_array($field_contents)) |
214 | 214 | { |
215 | 215 | $display_data['all'] = $field_contents; |
216 | - $display_data[$field_data['field_' . $this->view_mode . '_show']] = $field_contents; |
|
216 | + $display_data[$field_data['field_'.$this->view_mode.'_show']] = $field_contents; |
|
217 | 217 | break; |
218 | 218 | } |
219 | 219 | |
220 | 220 | if (!empty($field_contents)) |
221 | 221 | { |
222 | - $field = $this->get_field_label($field_data['field_' . $this->view_mode . '_ldisp'], $field_data['field_label']) . $field_contents; |
|
222 | + $field = $this->get_field_label($field_data['field_'.$this->view_mode.'_ldisp'], $field_data['field_label']).$field_contents; |
|
223 | 223 | $display_data['all'][$field_name] = $field; |
224 | - $display_data[$field_data['field_' . $this->view_mode . '_show']][$field_name] = $field; |
|
224 | + $display_data[$field_data['field_'.$this->view_mode.'_show']][$field_name] = $field; |
|
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | $html = ''; |
239 | 239 | if ($label_type) |
240 | 240 | { |
241 | - $html = '<div class="field-label ' . $this->label[$label_type] . '">' . $label_text . $this->language->lang('COLON') . ' </div>'; |
|
241 | + $html = '<div class="field-label '.$this->label[$label_type].'">'.$label_text.$this->language->lang('COLON').' </div>'; |
|
242 | 242 | } |
243 | 243 | return $html; |
244 | 244 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function execute($u_action, $mode = '') |
92 | 92 | { |
93 | - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
|
93 | + include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext); |
|
94 | 94 | |
95 | 95 | $this->language->add_lang('viewforum'); |
96 | 96 | $this->template->assign_var('MODE', $mode); |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | $filter_topic_status = $this->apply_status_filter($sql_where_array); |
106 | 106 | $filter_content_type = $this->apply_content_type_filter(); |
107 | 107 | |
108 | - $callable = 'init_' . $mode . '_mode'; |
|
109 | - $this->base_url = $u_action . (sizeof($this->params) ? '&' : ''); |
|
108 | + $callable = 'init_'.$mode.'_mode'; |
|
109 | + $this->base_url = $u_action.(sizeof($this->params) ? '&' : ''); |
|
110 | 110 | $this->$callable($content_types, $sql_where_array); |
111 | 111 | |
112 | 112 | $this->forum->query(true, false) |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | { |
171 | 171 | return array( |
172 | 172 | 'ATTACH_ICON_IMG' => $this->get_attachment_icon($row), |
173 | - 'U_REVIEW_TOPIC' => $u_action . "&do=view&type=$content_type&t=" . $row['topic_id'], |
|
173 | + 'U_REVIEW_TOPIC' => $u_action."&do=view&type=$content_type&t=".$row['topic_id'], |
|
174 | 174 | ); |
175 | 175 | } |
176 | 176 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | 'S_CAN_MAKE_NORMAL' => ($s_can_make_sticky || $s_can_make_announce), |
196 | 196 | 'S_CAN_MAKE_STICKY' => $s_can_make_sticky, |
197 | 197 | 'S_CAN_MAKE_ANNOUNCE' => $s_can_make_announce, |
198 | - 'U_MCP_ACTION' => $this->base_url . '&do=moderate&redirect=' . $this->get_redirect_url($this->base_url), |
|
198 | + 'U_MCP_ACTION' => $this->base_url.'&do=moderate&redirect='.$this->get_redirect_url($this->base_url), |
|
199 | 199 | )); |
200 | 200 | } |
201 | 201 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | protected function init_ucp_mode(array $content_types, array &$sql_where_array) |
207 | 207 | { |
208 | - $sql_where_array[] = 't.topic_poster = ' . (int) $this->user->data['user_id']; |
|
208 | + $sql_where_array[] = 't.topic_poster = '.(int) $this->user->data['user_id']; |
|
209 | 209 | |
210 | 210 | // list all content types that the user can post in |
211 | 211 | $postable_forums = array_intersect_key($this->content_forums, $this->auth->acl_getf('f_post', true)); |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $this->template->assign_block_vars('postable', array( |
218 | 218 | 'TYPE' => $entity->get_content_langname(), |
219 | 219 | 'COLOUR' => $entity->get_content_colour(), |
220 | - 'U_POST' => append_sid("{$this->phpbb_root_path}posting." . $this->php_ext, 'mode=post&f=' . $entity->get_forum_id()), |
|
220 | + 'U_POST' => append_sid("{$this->phpbb_root_path}posting.".$this->php_ext, 'mode=post&f='.$entity->get_forum_id()), |
|
221 | 221 | )); |
222 | 222 | } |
223 | 223 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | 'CONTENT_TYPE' => $entity->get_content_langname(), |
236 | 236 | 'CONTENT_TYPE_COLOR' => $entity->get_content_colour(), |
237 | 237 | 'S_COMMENTS' => $entity->get_allow_comments(), |
238 | - 'U_CONTENT_TYPE' => $base_url . "&type=$type", |
|
238 | + 'U_CONTENT_TYPE' => $base_url."&type=$type", |
|
239 | 239 | ); |
240 | 240 | } |
241 | 241 | |
@@ -285,8 +285,8 @@ discard block |
||
285 | 285 | } |
286 | 286 | |
287 | 287 | return array( |
288 | - 'TOPIC_STATUS' => $this->language->lang('TOPIC_' . strtoupper($topic_status)), |
|
289 | - 'U_TOPIC_STATUS' => $base_url . "&status=$topic_status", |
|
288 | + 'TOPIC_STATUS' => $this->language->lang('TOPIC_'.strtoupper($topic_status)), |
|
289 | + 'U_TOPIC_STATUS' => $base_url."&status=$topic_status", |
|
290 | 290 | ); |
291 | 291 | } |
292 | 292 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | if ($mode === 'mcp') |
314 | 314 | { |
315 | 315 | $u_mcp_queue = $this->get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id); |
316 | - $u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=deleted_topics&t=' . $topic_id, true, $this->user->session_id) : $u_mcp_queue; |
|
316 | + $u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=deleted_topics&t='.$topic_id, true, $this->user->session_id) : $u_mcp_queue; |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | return array( |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | */ |
330 | 330 | protected function get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id) |
331 | 331 | { |
332 | - return ($topic_unapproved || $posts_unapproved) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id", true, $this->user->session_id) : ''; |
|
332 | + return ($topic_unapproved || $posts_unapproved) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode='.(($topic_unapproved) ? 'approve_details' : 'unapproved_posts')."&t=$topic_id", true, $this->user->session_id) : ''; |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | /** |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | if ($mode === 'mcp') |
347 | 347 | { |
348 | 348 | $redirect_url = $this->get_redirect_url($u_action); |
349 | - $u_delete = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'quickmod=1&action=delete_topic&t=' . $row['topic_id'] . '&redirect=' . $redirect_url, true, $this->user->session_id); |
|
349 | + $u_delete = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'quickmod=1&action=delete_topic&t='.$row['topic_id'].'&redirect='.$redirect_url, true, $this->user->session_id); |
|
350 | 350 | } |
351 | 351 | } |
352 | 352 | |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | */ |
360 | 360 | protected function get_redirect_url($base_url) |
361 | 361 | { |
362 | - $base_url .= (sizeof($this->params)) ? '&' . http_build_query($this->params) : ''; |
|
362 | + $base_url .= (sizeof($this->params)) ? '&'.http_build_query($this->params) : ''; |
|
363 | 363 | return urlencode(str_replace('&', '&', $base_url)); |
364 | 364 | } |
365 | 365 |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | 'TOPIC_BLOCK_OPS' => $this->topic_blocks_factory->get_all(), |
91 | 91 | 'ITEMS_PER_PAGE' => 10, |
92 | 92 | |
93 | - 'U_ACTION' => $u_action . "&do=save&type=$type", |
|
93 | + 'U_ACTION' => $u_action."&do=save&type=$type", |
|
94 | 94 | 'UA_AJAX_URL' => $this->controller_helper->route('blitze_content_field_settings', array(), false), |
95 | 95 | |
96 | 96 | 'S_TYPE_OPS' => $this->get_field_options(), |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $options = ''; |
112 | 112 | foreach ($fields as $field => $object) |
113 | 113 | { |
114 | - $options .= '<option value="' . $field . '">' . $this->language->lang($object->get_langname()) . '</option>'; |
|
114 | + $options .= '<option value="'.$field.'">'.$this->language->lang($object->get_langname()).'</option>'; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | return $options; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | ->fetch_forum($topic_data['forum_id']) |
69 | 69 | ->fetch_topic_poster($topic_data['topic_poster']) |
70 | 70 | ->fetch_custom(array( |
71 | - 'WHERE' => array('t.topic_id <> ' . (int) $topic_data['topic_id']) |
|
71 | + 'WHERE' => array('t.topic_id <> '.(int) $topic_data['topic_id']) |
|
72 | 72 | ))->build(true, true, false); |
73 | 73 | |
74 | 74 | $topics_data = $this->forum->get_topic_data(5); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | foreach ($posts_data as $topic_id => $posts) |
141 | 141 | { |
142 | - $post_data = array_shift($posts); |
|
142 | + $post_data = array_shift($posts); |
|
143 | 143 | $topic_data = $topics_data[$topic_id]; |
144 | 144 | $topic_data = array_merge( |
145 | 145 | $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info), |
@@ -253,8 +253,8 @@ discard block |
||
253 | 253 | $this->pagination->generate_template_pagination( |
254 | 254 | array( |
255 | 255 | 'routes' => array( |
256 | - 'blitze_content_' . $route_type, |
|
257 | - 'blitze_content_' . $route_type . '_page', |
|
256 | + 'blitze_content_'.$route_type, |
|
257 | + 'blitze_content_'.$route_type.'_page', |
|
258 | 258 | ), |
259 | 259 | 'params' => $params, |
260 | 260 | ), |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $value = $this->request->variable($data['field_name'], $data['field_value']); |
53 | 53 | $value = $this->get_image_src($value); |
54 | 54 | |
55 | - return ($value) ? '[img]' . $value . '[/img]' : ''; |
|
55 | + return ($value) ? '[img]'.$value.'[/img]' : ''; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | $this->set_filemanager($data); |
79 | 79 | $this->ptemplate->assign_vars($data); |
80 | - $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field . '_field'); |
|
80 | + $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field.'_field'); |
|
81 | 81 | |
82 | 82 | $data['field_value'] = $bbcode_value; |
83 | 83 | |
@@ -137,14 +137,14 @@ discard block |
||
137 | 137 | */ |
138 | 138 | private function get_image_html($image, $mode, $title, array $field_props) |
139 | 139 | { |
140 | - $image = $image ?: '<img src="' . $field_props['default'] . '" class="postimage" alt="' . $title . '" />'; |
|
140 | + $image = $image ?: '<img src="'.$field_props['default'].'" class="postimage" alt="'.$title.'" />'; |
|
141 | 141 | |
142 | - $html = '<figure class="img-ui">' . $image . '</figure>'; |
|
142 | + $html = '<figure class="img-ui">'.$image.'</figure>'; |
|
143 | 143 | if ($mode !== 'block') |
144 | 144 | { |
145 | - $view_props = array_fill_keys(array($mode . '_size', $mode . '_align'), ''); |
|
145 | + $view_props = array_fill_keys(array($mode.'_size', $mode.'_align'), ''); |
|
146 | 146 | $image_props = array_filter(array_intersect_key($field_props, $view_props)); |
147 | - $html = '<div class="' . join(' ', $image_props) . '">' . $html . '</div>'; |
|
147 | + $html = '<div class="'.join(' ', $image_props).'">'.$html.'</div>'; |
|
148 | 148 | } |
149 | 149 | return $html; |
150 | 150 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | { |
160 | 160 | $data['filemanager_path'] = append_sid("{$this->phpbb_root_path}ResponsiveFilemanager/filemanager/dialog.$this->php_ext", array( |
161 | 161 | 'type' => 1, |
162 | - 'field_id' => 'smc-' . $data['field_name'], |
|
162 | + 'field_id' => 'smc-'.$data['field_name'], |
|
163 | 163 | 'akey' => $this->filemanager->get_access_key(), |
164 | 164 | )); |
165 | 165 | } |
@@ -58,22 +58,22 @@ |
||
58 | 58 | '@blitze_content/assets/fields/display.min.js', |
59 | 59 | ), |
60 | 60 | 'css' => array( |
61 | - '@blitze_content/assets/fields/share/' . $props['theme'] . '.min.css', |
|
61 | + '@blitze_content/assets/fields/share/'.$props['theme'].'.min.css', |
|
62 | 62 | ) |
63 | 63 | )); |
64 | 64 | |
65 | 65 | $classes = ['social-share', $props['corners'], $props['placement']]; |
66 | 66 | $attributes = [ |
67 | - 'class="' . join(' ', array_filter($classes)) . '"', |
|
68 | - 'data-show-label="' . $props['show_label'] . '"', |
|
69 | - 'data-show-count="' . $props['show_count'] . '"', |
|
70 | - 'data-share-in="' . $props['sharein'] . '"', |
|
71 | - 'data-shares="' . join(',', $props['defaults']) . '"', |
|
72 | - 'data-url="' . $topic_data['PERMA_LINK'] . '"', |
|
73 | - 'style="font-size: ' . $props['size'] . 'px"', |
|
67 | + 'class="'.join(' ', array_filter($classes)).'"', |
|
68 | + 'data-show-label="'.$props['show_label'].'"', |
|
69 | + 'data-show-count="'.$props['show_count'].'"', |
|
70 | + 'data-share-in="'.$props['sharein'].'"', |
|
71 | + 'data-shares="'.join(',', $props['defaults']).'"', |
|
72 | + 'data-url="'.$topic_data['PERMA_LINK'].'"', |
|
73 | + 'style="font-size: '.$props['size'].'px"', |
|
74 | 74 | ]; |
75 | 75 | |
76 | - return '<div ' . join(' ', $attributes) . '></div>'; |
|
76 | + return '<div '.join(' ', $attributes).'></div>'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | public function display_field(array $data, array $topic_data, $view_mode) |
38 | 38 | { |
39 | - return $data['field_value'] ? '<a href="tel:' . $data['field_value'] . '">' . preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $data['field_value']) . '</a>' : ''; |
|
39 | + return $data['field_value'] ? '<a href="tel:'.$data['field_value'].'">'.preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $data['field_value']).'</a>' : ''; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -56,7 +56,7 @@ |
||
56 | 56 | 'pagination' => array('lang' => 'SWIPER_PAGINATION', 'validate' => 'string', 'type' => 'select', 'options' => $pagination_options, 'default' => 1), |
57 | 57 | 'effect' => array('lang' => 'SWIPER_EFFECT', 'validate' => 'string', 'type' => 'select', 'options' => $effect_options, 'default' => 'slide'), |
58 | 58 | 'parallax' => array('lang' => 'SWIPER_PARALLAX_IMAGE_URL', 'validate' => 'string', 'type' => 'text', 'default' => ''), |
59 | - 'direction' => array('lang' => 'SWIPER_DIRECTION', 'validate' => 'string', 'type' => 'select:1:0:direction', 'options' => $direction_options, 'default' => 'horizontal', 'append' => '<div id="direction-vertical" class="error small">' . $this->language->lang('SWIPER_HEIGHT_REQUIRED') . '</div>'), |
|
59 | + 'direction' => array('lang' => 'SWIPER_DIRECTION', 'validate' => 'string', 'type' => 'select:1:0:direction', 'options' => $direction_options, 'default' => 'horizontal', 'append' => '<div id="direction-vertical" class="error small">'.$this->language->lang('SWIPER_HEIGHT_REQUIRED').'</div>'), |
|
60 | 60 | 'height' => array('lang' => 'SWIPER_HEIGHT', 'validate' => 'int:0', 'type' => 'number:0', 'default' => 0, 'append' => 'PIXEL'), |
61 | 61 | 'thumbs' => array('lang' => 'SWIPER_THUMBNAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'default' => 0), |
62 | 62 | 'loop' => array('lang' => 'SWIPER_LOOP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'default' => 1), |