@@ -163,13 +163,13 @@ discard block |
||
| 163 | 163 | $topic_tracking_info = $this->forum->get_topic_tracking_info($forum_id); |
| 164 | 164 | $block_fields = $this->get_block_fields($entity->get_field_types()); |
| 165 | 165 | |
| 166 | - $this->fields->prepare_to_show($entity, array_keys($topics_data), $block_fields, $this->settings['block_tpl'], 'block', $block_id . '_block'); |
|
| 166 | + $this->fields->prepare_to_show($entity, array_keys($topics_data), $block_fields, $this->settings['block_tpl'], 'block', $block_id.'_block'); |
|
| 167 | 167 | |
| 168 | 168 | $update_count = array(); |
| 169 | 169 | foreach ($posts_data as $topic_id => $posts) |
| 170 | 170 | { |
| 171 | - $post_data = array_shift($posts); |
|
| 172 | - $topic_data = $topics_data[$topic_id]; |
|
| 171 | + $post_data = array_shift($posts); |
|
| 172 | + $topic_data = $topics_data[$topic_id]; |
|
| 173 | 173 | $this->ptemplate->assign_block_vars('topicrow', $this->fields->show($type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info)); |
| 174 | 174 | } |
| 175 | 175 | unset($topics_data, $posts_data, $users_cache, $attachments, $topic_tracking_info); |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | POST_STICKY => 'CONTENT_STICKY_POSTS', |
| 197 | 197 | ); |
| 198 | 198 | |
| 199 | - return (isset($topic_types[$this->settings['topic_type']])) ? $topic_types[$this->settings['topic_types']] : $this->language->lang('CONTENT_' . $this->sort_options[$this->settings['sort_key']], $content_langname); |
|
| 199 | + return (isset($topic_types[$this->settings['topic_type']])) ? $topic_types[$this->settings['topic_types']] : $this->language->lang('CONTENT_'.$this->sort_options[$this->settings['sort_key']], $content_langname); |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | /** |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | foreach ($content_types as $value => $title) |
| 264 | 264 | { |
| 265 | 265 | $selected = ($type == $value) ? ' selected="selected"' : ''; |
| 266 | - $html .= '<option value="' . $value . '"' . $selected . ' data-toggle-setting="#fields-col-' . $value . '">' . $title . '</option>'; |
|
| 266 | + $html .= '<option value="'.$value.'"'.$selected.' data-toggle-setting="#fields-col-'.$value.'">'.$title.'</option>'; |
|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | return $html; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | // Let's create the new BBCode |
| 43 | 43 | $configurator->BBCodes->addCustom( |
| 44 | 44 | '[pagebreak title={SIMPLETEXT;optional;postFilter=ucwords}]', |
| 45 | - '<p><!-- pagebreak --></p>' . |
|
| 45 | + '<p><!-- pagebreak --></p>'. |
|
| 46 | 46 | '<xsl:if test="@title"><h4>{SIMPLETEXT}</h4><br /></xsl:if>' |
| 47 | 47 | ); |
| 48 | 48 | } |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | // smcf = sitemaker content field (hopefully unique enough) |
| 65 | 65 | $configurator->BBCodes->addCustom( |
| 66 | 66 | '[smcf={IDENTIFIER}]{TEXT}[/smcf]', |
| 67 | - "<!-- begin field -->\n" . |
|
| 68 | - "<div data-field=\"{IDENTIFIER}\">{TEXT}</div><br />\n" . |
|
| 67 | + "<!-- begin field -->\n". |
|
| 68 | + "<div data-field=\"{IDENTIFIER}\">{TEXT}</div><br />\n". |
|
| 69 | 69 | "<!-- end field -->\n" |
| 70 | 70 | ); |
| 71 | 71 | } |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | 'count' => $row['total'], |
| 80 | 80 | 'url' => $this->helper->route($info['route_name'], $info['route_params'] + array( |
| 81 | 81 | 'filter_type' => 'archive', |
| 82 | - 'filter_value' => $row['year'] . '-' . $row['month'], |
|
| 82 | + 'filter_value' => $row['year'].'-'.$row['month'], |
|
| 83 | 83 | )), |
| 84 | 84 | ); |
| 85 | 85 | } |
@@ -106,8 +106,7 @@ |
||
| 106 | 106 | 'route_name' => 'blitze_content_type_filter', |
| 107 | 107 | 'route_params' => array('type' => $this->content_types->get_forum_type($settings['forum_id'])), |
| 108 | 108 | ); |
| 109 | - } |
|
| 110 | - else |
|
| 109 | + } else |
|
| 111 | 110 | { |
| 112 | 111 | return array( |
| 113 | 112 | 'forum_ids' => array_keys($this->content_types->get_forum_types()), |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param \phpbb\language\language $language Language object |
| 34 | 34 | * @param \blitze\content\services\types $content_types Content types object |
| 35 | 35 | * @param string $php_ext php file extension |
| 36 | - */ |
|
| 36 | + */ |
|
| 37 | 37 | public function __construct(\phpbb\controller\helper $helper, \phpbb\language\language $language, \blitze\content\services\types $content_types, $php_ext) |
| 38 | 38 | { |
| 39 | 39 | $this->helper = $helper; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function add_viewonline_location(\phpbb\event\data $event) |
| 87 | 87 | { |
| 88 | - if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/content/') === 0) |
|
| 88 | + if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.'.$this->php_ext.'/content/') === 0) |
|
| 89 | 89 | { |
| 90 | 90 | $types = join('|', $this->content_types->get_forum_types()); |
| 91 | 91 | preg_match("/\/content\/($types)(\/[0-9]\/.*)?/is", $event['row']['session_page'], $match); |
@@ -125,12 +125,12 @@ discard block |
||
| 125 | 125 | { |
| 126 | 126 | $list = $this->content_types->get_all_types(); |
| 127 | 127 | |
| 128 | - $text = $this->language->lang('CONTENT_TYPES') . '|' . $this->helper->route('blitze_content_types', array(), false, '', UrlGeneratorInterface::RELATIVE_PATH) . "\n"; |
|
| 128 | + $text = $this->language->lang('CONTENT_TYPES').'|'.$this->helper->route('blitze_content_types', array(), false, '', UrlGeneratorInterface::RELATIVE_PATH)."\n"; |
|
| 129 | 129 | |
| 130 | 130 | foreach ($list as $type => $entity) |
| 131 | 131 | { |
| 132 | - $text .= "\t" . $entity->get_content_langname() . '|'; |
|
| 133 | - $text .= $this->helper->route('blitze_content_type', array('type' => $type), false, '', UrlGeneratorInterface::RELATIVE_PATH) . "\n"; |
|
| 132 | + $text .= "\t".$entity->get_content_langname().'|'; |
|
| 133 | + $text .= $this->helper->route('blitze_content_type', array('type' => $type), false, '', UrlGeneratorInterface::RELATIVE_PATH)."\n"; |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | return trim($text); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $this->ptemplate->assign_vars($data); |
| 63 | 63 | |
| 64 | 64 | $tpl_name = ($data['field_type'] === 'select') ? 'select' : 'pickem'; |
| 65 | - return $this->ptemplate->render_view('blitze/content', "fields/$tpl_name.html", $data['field_type'] . '_field'); |
|
| 65 | + return $this->ptemplate->render_view('blitze/content', "fields/$tpl_name.html", $data['field_type'].'_field'); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | foreach ($choices as $value => $option) |
| 86 | 86 | { |
| 87 | 87 | $options[] = array( |
| 88 | - 'id' => 'smc-'. $name . '-' . $count, |
|
| 88 | + 'id' => 'smc-'.$name.'-'.$count, |
|
| 89 | 89 | 'label' => $this->language->lang($option), |
| 90 | 90 | 'selected' => (int) (in_array($value, $selected)), |
| 91 | 91 | 'value' => $value, |
@@ -58,21 +58,21 @@ |
||
| 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 | - '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 | + 'style="font-size: '.$props['size'].'px"', |
|
| 73 | 73 | ]; |
| 74 | 74 | |
| 75 | - return '<div ' . join(' ', $attributes) . '></div>'; |
|
| 75 | + return '<div '.join(' ', $attributes).'></div>'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $this->util->add_assets(array( |
| 85 | 85 | 'js' => array( |
| 86 | 86 | 100 => '@blitze_content/assets/fields/form.min.js', |
| 87 | - 101 => '//maps.googleapis.com/maps/api/js?key=' . $this->google_api_key . '&libraries=places&callback=initMap&language=' . $this->language->get_used_language() . '" async defer charset="UTF-8', |
|
| 87 | + 101 => '//maps.googleapis.com/maps/api/js?key='.$this->google_api_key.'&libraries=places&callback=initMap&language='.$this->language->get_used_language().'" async defer charset="UTF-8', |
|
| 88 | 88 | ) |
| 89 | 89 | )); |
| 90 | 90 | $data['show_input'] = true; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | $data['field_value'] = $this->get_field_value($data); |
| 106 | - $callable = 'display_' . $data['field_props']['disp_type']; |
|
| 106 | + $callable = 'display_'.$data['field_props']['disp_type']; |
|
| 107 | 107 | |
| 108 | 108 | return $this->$callable($data); |
| 109 | 109 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | protected function display_address(array $data) |
| 116 | 116 | { |
| 117 | - return $this->get_location_title($data['field_value']['place'], $data['field_value']['address']) . $data['field_value']['address']; |
|
| 117 | + return $this->get_location_title($data['field_value']['place'], $data['field_value']['address']).$data['field_value']['address']; |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | protected function display_coordinates(array $data) |
| 125 | 125 | { |
| 126 | - return $this->get_location_title($data['field_value']['place'], $data['field_value']['address']) . |
|
| 127 | - $data['field_value']['latitude'] . ', ' . $data['field_value']['longitude']; |
|
| 126 | + return $this->get_location_title($data['field_value']['place'], $data['field_value']['address']). |
|
| 127 | + $data['field_value']['latitude'].', '.$data['field_value']['longitude']; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | { |
| 139 | 139 | $this->util->add_assets(array( |
| 140 | 140 | 'js' => array( |
| 141 | - '//maps.googleapis.com/maps/api/js?key=' . $this->google_api_key . '&callback=initMap&language=' . $this->language->get_used_language() . '" async defer charset="UTF-8', |
|
| 141 | + '//maps.googleapis.com/maps/api/js?key='.$this->google_api_key.'&callback=initMap&language='.$this->language->get_used_language().'" async defer charset="UTF-8', |
|
| 142 | 142 | '@blitze_content/assets/fields/display.min.js', |
| 143 | 143 | ) |
| 144 | 144 | )); |
@@ -157,18 +157,18 @@ discard block |
||
| 157 | 157 | $info = $data['field_value']; |
| 158 | 158 | $settings = $data['field_props']; |
| 159 | 159 | $map_types = $settings['options'] ?: ['roadmap']; |
| 160 | - $coordinates = $info['latitude'] . ',' . $info['longitude']; |
|
| 160 | + $coordinates = $info['latitude'].','.$info['longitude']; |
|
| 161 | 161 | |
| 162 | 162 | $params = array( |
| 163 | 163 | 'center' => $coordinates, |
| 164 | 164 | 'zoom' => $settings['map_zoom'] ?: $info['zoom'], |
| 165 | - 'size' => $settings['map_width'] . 'x' . $settings['map_height'], |
|
| 165 | + 'size' => $settings['map_width'].'x'.$settings['map_height'], |
|
| 166 | 166 | 'maptype' => $info['map_type'] ?: $map_types[0], |
| 167 | 167 | 'markers' => $coordinates, |
| 168 | 168 | 'key' => $this->google_api_key, |
| 169 | 169 | ); |
| 170 | 170 | |
| 171 | - return '<img src="https://maps.googleapis.com/maps/api/staticmap?' . http_build_query($params) . '" alt="' . $info['address'] . '" title="' . $info['place'] . '" />'; |
|
| 171 | + return '<img src="https://maps.googleapis.com/maps/api/staticmap?'.http_build_query($params).'" alt="'.$info['address'].'" title="'.$info['place'].'" />'; |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -178,6 +178,6 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | protected function get_location_title($place, $address) |
| 180 | 180 | { |
| 181 | - return (strpos($address, $place) === false) ? '<strong>' . $place . '</strong><br />' : ''; |
|
| 181 | + return (strpos($address, $place) === false) ? '<strong>'.$place.'</strong><br />' : ''; |
|
| 182 | 182 | } |
| 183 | 183 | } |
@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | $toc_pattern = '(<h4>(.*?)</h4>)?'; |
| 96 | 96 | $pages_pattern = '<p><!-- pagebreak --></p>'; |
| 97 | - $split_pattern = $pages_pattern . (($view_mode !== 'detail') ? $toc_pattern : ''); |
|
| 97 | + $split_pattern = $pages_pattern.(($view_mode !== 'detail') ? $toc_pattern : ''); |
|
| 98 | 98 | |
| 99 | - $pages = array_filter(preg_split('#' . $split_pattern . '#s', $data['field_value'])); |
|
| 99 | + $pages = array_filter(preg_split('#'.$split_pattern.'#s', $data['field_value'])); |
|
| 100 | 100 | |
| 101 | 101 | if ($view_mode !== 'detail') |
| 102 | 102 | { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // get page titles to generate TOC |
| 107 | - preg_match_all('#' . $pages_pattern . $toc_pattern . '#s', $data['field_value'], $matches); |
|
| 107 | + preg_match_all('#'.$pages_pattern.$toc_pattern.'#s', $data['field_value'], $matches); |
|
| 108 | 108 | |
| 109 | 109 | return $this->get_detail_value($pages, $matches[2], $data); |
| 110 | 110 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $asset_path = $this->util->get_web_path(); |
| 120 | 120 | $this->util->add_assets(array( |
| 121 | 121 | 'js' => array( |
| 122 | - $asset_path . 'assets/javascript/editor.js', |
|
| 122 | + $asset_path.'assets/javascript/editor.js', |
|
| 123 | 123 | '@blitze_content/assets/fields/textarea.min.js' |
| 124 | 124 | ) |
| 125 | 125 | )); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $this->template->assign_block_vars('toc', array( |
| 228 | 228 | 'TITLE' => ($title) ? $title : $this->language->lang('CONTENT_TOC_UNTITLED'), |
| 229 | 229 | 'S_PAGE' => ($page === $start), |
| 230 | - 'U_VIEW' => append_sid($topic_url, ($page) ? 'page=' . $page : false), |
|
| 230 | + 'U_VIEW' => append_sid($topic_url, ($page) ? 'page='.$page : false), |
|
| 231 | 231 | )); |
| 232 | 232 | } |
| 233 | 233 | } |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | // Assigning custom bbcodes |
| 280 | 280 | if (!function_exists('display_custom_bbcodes')) |
| 281 | 281 | { |
| 282 | - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
|
| 282 | + include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext); |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | display_custom_bbcodes(); |
@@ -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 | |
@@ -136,14 +136,14 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | private function get_image_html($image, $mode, array $field_props) |
| 138 | 138 | { |
| 139 | - $image = $image ?: '<img src="' . $field_props['default'] . '" class="postimage" alt="Image" />'; |
|
| 139 | + $image = $image ?: '<img src="'.$field_props['default'].'" class="postimage" alt="Image" />'; |
|
| 140 | 140 | |
| 141 | - $html = '<figure class="img-ui">' . $image . '</figure>'; |
|
| 141 | + $html = '<figure class="img-ui">'.$image.'</figure>'; |
|
| 142 | 142 | if ($mode !== 'block') |
| 143 | 143 | { |
| 144 | - $view_props = array_fill_keys(array($mode . '_size', $mode . '_align'), ''); |
|
| 144 | + $view_props = array_fill_keys(array($mode.'_size', $mode.'_align'), ''); |
|
| 145 | 145 | $image_props = array_filter(array_intersect_key($field_props, $view_props)); |
| 146 | - $html = '<div class="' . join(' ', $image_props) . '">' . $html . '</div>'; |
|
| 146 | + $html = '<div class="'.join(' ', $image_props).'">'.$html.'</div>'; |
|
| 147 | 147 | } |
| 148 | 148 | return $html; |
| 149 | 149 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | { |
| 159 | 159 | $data['filemanager_path'] = append_sid("{$this->phpbb_root_path}ResponsiveFilemanager/filemanager/dialog.$this->php_ext", array( |
| 160 | 160 | 'type' => 1, |
| 161 | - 'field_id' => 'smc-' . $data['field_name'], |
|
| 161 | + 'field_id' => 'smc-'.$data['field_name'], |
|
| 162 | 162 | 'akey' => $this->filemanager->get_access_key(), |
| 163 | 163 | )); |
| 164 | 164 | } |