|
@@ -73,7 +73,7 @@ discard block |
|
|
block discarded – undo |
|
73
|
73
|
'core.display_forums_modify_forum_rows' => 'display_forums_modify_forum_rows', |
|
74
|
74
|
'core.display_forums_modify_category_template_vars' => 'display_forums_modify_category_template_vars', |
|
75
|
75
|
'core.generate_forum_nav' => 'generate_forum_nav', |
|
76
|
|
- 'core.make_jumpbox_modify_tpl_ary' => 'make_jumpbox_modify_tpl_ary', // Not in phpBB |
|
|
76
|
+ 'core.make_jumpbox_modify_tpl_ary' => 'make_jumpbox_modify_tpl_ary', // Not in phpBB |
|
77
|
77
|
'core.memberlist_view_profile' => 'memberlist_view_profile', |
|
78
|
78
|
'core.pagination_generate_page_link' => 'pagination_generate_page_link', |
|
79
|
79
|
'core.search_modify_tpl_ary' => 'search_modify_tpl_ary', |
|
@@ -96,9 +96,9 @@ discard block |
|
|
block discarded – undo |
|
96
|
96
|
*/ |
|
97
|
97
|
public function append_sid($event) |
|
98
|
98
|
{ |
|
99
|
|
- if ($this->in_viewtopic && preg_match('#./../viewtopic.' . $this->php_ext . '#', $event['url'])) |
|
|
99
|
+ if ($this->in_viewtopic && preg_match('#./../viewtopic.'.$this->php_ext.'#', $event['url'])) |
|
100
|
100
|
{ |
|
101
|
|
- $url = '../viewtopic.' . $this->php_ext ; |
|
|
101
|
+ $url = '../viewtopic.'.$this->php_ext; |
|
102
|
102
|
$event['url'] = $url; |
|
103
|
103
|
} |
|
104
|
104
|
if (isset($event['params']['redirect'])) |
|
@@ -139,9 +139,9 @@ discard block |
|
|
block discarded – undo |
|
139
|
139
|
$forum_rows = $event['forum_rows']; |
|
140
|
140
|
if ($event['row']['forum_last_post_time'] == $forum_rows[$event['parent_id']]['forum_last_post_time']) |
|
141
|
141
|
{ |
|
142
|
|
- $forum_rows[$event['parent_id']]['forum_name_last_post'] =$event['row']['forum_name']; |
|
143
|
|
- $forum_rows[$event['parent_id']]['topic_id_last_post'] =$event['row']['topic_id']; |
|
144
|
|
- $forum_rows[$event['parent_id']]['topic_title_last_post'] =$event['row']['topic_title']; |
|
|
142
|
+ $forum_rows[$event['parent_id']]['forum_name_last_post'] = $event['row']['forum_name']; |
|
|
143
|
+ $forum_rows[$event['parent_id']]['topic_id_last_post'] = $event['row']['topic_id']; |
|
|
144
|
+ $forum_rows[$event['parent_id']]['topic_title_last_post'] = $event['row']['topic_title']; |
|
145
|
145
|
$event['forum_rows'] = $forum_rows; |
|
146
|
146
|
} |
|
147
|
147
|
} |
|
@@ -170,14 +170,14 @@ discard block |
|
|
block discarded – undo |
|
170
|
170
|
|
|
171
|
171
|
// Update the image source in forums |
|
172
|
172
|
$img = $this->path_helper->update_web_root_path($forum_row['FORUM_IMAGE_SRC']); |
|
173
|
|
- $forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="' . $img . '" alt', $forum_row['FORUM_IMAGE']); |
|
|
173
|
+ $forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="'.$img.'" alt', $forum_row['FORUM_IMAGE']); |
|
174
|
174
|
|
|
175
|
175
|
// Rewrite links to topics, posts and forums |
|
176
|
176
|
$replies = $this->base->get_count('topic_posts', $event['row'], $event['row']['forum_id']) - 1; |
|
177
|
177
|
$url = $this->base->generate_topic_link($event['row']['forum_id_last_post'], $event['row']['forum_name_last_post'], $event['row']['topic_id_last_post'], $event['row']['topic_title_last_post']); |
|
178
|
|
- $forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url) . '#p' . $event['row']['forum_last_post_id']); |
|
|
178
|
+ $forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url).'#p'.$event['row']['forum_last_post_id']); |
|
179
|
179
|
$forum_row['U_VIEWFORUM'] = append_sid($this->base->generate_forum_link($forum_row['FORUM_ID'], $forum_row['FORUM_NAME'])); |
|
180
|
|
- $forum_row['U_NEWEST_POST'] = $url . '?view=unread#unread'; |
|
|
180
|
+ $forum_row['U_NEWEST_POST'] = $url.'?view=unread#unread'; |
|
181
|
181
|
|
|
182
|
182
|
$event['subforums_row'] = $subforums_row; |
|
183
|
183
|
$event['forum_row'] = $forum_row; |
|
@@ -213,7 +213,7 @@ discard block |
|
|
block discarded – undo |
|
213
|
213
|
|
|
214
|
214
|
foreach ($navlinks_parents as $id => $data) |
|
215
|
215
|
{ |
|
216
|
|
- $navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'] , $data['FORUM_NAME'])); |
|
|
216
|
+ $navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'], $data['FORUM_NAME'])); |
|
217
|
217
|
} |
|
218
|
218
|
|
|
219
|
219
|
$navlinks['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($forum_data['forum_id'], $forum_data['forum_name'])); |
|
@@ -228,7 +228,7 @@ discard block |
|
|
block discarded – undo |
|
228
|
228
|
$row = $event['row']; |
|
229
|
229
|
foreach ($tpl_ary as $id => $data) |
|
230
|
230
|
{ |
|
231
|
|
- $tpl_ary[$id]['LINK'] = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name'])); |
|
|
231
|
+ $tpl_ary[$id]['LINK'] = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name'])); |
|
232
|
232
|
} |
|
233
|
233
|
|
|
234
|
234
|
$event['tpl_ary'] = $tpl_ary; |
|
@@ -259,7 +259,7 @@ discard block |
|
|
block discarded – undo |
|
259
|
259
|
*/ |
|
260
|
260
|
public function pagination_generate_page_link($event) |
|
261
|
261
|
{ |
|
262
|
|
- if(!is_string($event['base_url'])) |
|
|
262
|
+ if (!is_string($event['base_url'])) |
|
263
|
263
|
{ |
|
264
|
264
|
return; |
|
265
|
265
|
} |
|
@@ -295,10 +295,10 @@ discard block |
|
|
block discarded – undo |
|
295
|
295
|
$u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']); |
|
296
|
296
|
|
|
297
|
297
|
$tpl_ary = $event['tpl_ary']; |
|
298
|
|
- $tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#p' . $event['row']['topic_last_post_id']); |
|
|
298
|
+ $tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic).'#p'.$event['row']['topic_last_post_id']); |
|
299
|
299
|
$tpl_ary['U_VIEW_TOPIC'] = append_sid($u_view_topic); |
|
300
|
300
|
$tpl_ary['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($event['row']['forum_id'], $event['row']['forum_name'])); |
|
301
|
|
- $tpl_ary['U_NEWEST_POST'] = $u_view_topic . '?view=unread#unread'; |
|
|
301
|
+ $tpl_ary['U_NEWEST_POST'] = $u_view_topic.'?view=unread#unread'; |
|
302
|
302
|
|
|
303
|
303
|
$event['tpl_ary'] = $tpl_ary; |
|
304
|
304
|
} |
|
@@ -325,8 +325,8 @@ discard block |
|
|
block discarded – undo |
|
325
|
325
|
$u_view_topic = $this->base->generate_topic_link($topic_row['FORUM_ID'], $topic_row['FORUM_NAME'], $topic_row['TOPIC_ID'], $topic_row['TOPIC_TITLE']); |
|
326
|
326
|
$topic_row['U_VIEW_TOPIC'] = append_sid($u_view_topic); |
|
327
|
327
|
$topic_row['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($topic_row['FORUM_ID'], $topic_row['FORUM_NAME'])); |
|
328
|
|
- $topic_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($event['topic_row']['REPLIES'], $u_view_topic) . '#p' . $event['row']['topic_last_post_id']); |
|
329
|
|
- $topic_row['U_NEWEST_POST'] = $u_view_topic . '?view=unread#unread'; |
|
|
328
|
+ $topic_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($event['topic_row']['REPLIES'], $u_view_topic).'#p'.$event['row']['topic_last_post_id']); |
|
|
329
|
+ $topic_row['U_NEWEST_POST'] = $u_view_topic.'?view=unread#unread'; |
|
330
|
330
|
|
|
331
|
331
|
$event['topic_row'] = $topic_row; |
|
332
|
332
|
} |
|
@@ -364,9 +364,9 @@ discard block |
|
|
block discarded – undo |
|
364
|
364
|
{ |
|
365
|
365
|
$data = $event['topic_data']; |
|
366
|
366
|
$this->template->assign_vars(array( |
|
367
|
|
- 'U_VIEW_TOPIC' => append_sid($this->base->generate_topic_link($event['forum_id'] , $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])), |
|
368
|
|
- 'U_VIEW_FORUM' => append_sid($this->base->generate_forum_link($event['forum_id'] , $data['forum_name'])), |
|
369
|
|
- 'S_POLL_ACTION' => append_sid($this->base->generate_topic_link($event['forum_id'] , $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])), |
|
|
367
|
+ 'U_VIEW_TOPIC' => append_sid($this->base->generate_topic_link($event['forum_id'], $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])), |
|
|
368
|
+ 'U_VIEW_FORUM' => append_sid($this->base->generate_forum_link($event['forum_id'], $data['forum_name'])), |
|
|
369
|
+ 'S_POLL_ACTION' => append_sid($this->base->generate_topic_link($event['forum_id'], $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])), |
|
370
|
370
|
)); |
|
371
|
371
|
} |
|
372
|
372
|
|
|
@@ -421,7 +421,7 @@ discard block |
|
|
block discarded – undo |
|
421
|
421
|
$row = $event['post_row']; |
|
422
|
422
|
$start = $this->request->variable('start', 0); |
|
423
|
423
|
$data = $event['topic_data']; |
|
424
|
|
- $row['U_MINI_POST'] = append_sid($this->base->generate_topic_link($data['forum_id'], $data['forum_name'], $data['topic_id'], $data['topic_title'], $start) . '#p' . $event['row']['post_id']); |
|
|
424
|
+ $row['U_MINI_POST'] = append_sid($this->base->generate_topic_link($data['forum_id'], $data['forum_name'], $data['topic_id'], $data['topic_title'], $start).'#p'.$event['row']['post_id']); |
|
425
|
425
|
$event['post_row'] = $row; |
|
426
|
426
|
} |
|
427
|
427
|
} |