Hey Senky, first of all thank you for Relative Dates and User Recent Activity - these are both great exts that I'm using on my forum
viewforum.php
, around line 626:
Code: Select all
$sql_ary = array(
'SELECT' => 't.topic_id',
'FROM' => array(
TOPICS_TABLE => 't',
),
'WHERE' => "$sql_where
AND t.topic_type IN (" . POST_NORMAL . ', ' . POST_STICKY . ")
$sql_approved
$sql_limit_time",
'ORDER_BY' => 't.topic_type ' . ((!$store_reverse) ? 'DESC' : 'ASC') . ', ' . $sql_sort_order,
);
$sql_where
is constructed in condition above the query. You should alter this condition by adding your forum_id to it (in all 3 cases).viewforum_body.html
near line 133:
Code: Select all
<!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
viewforum.php
where it starts pulling topic data:
Code: Select all
foreach ($topic_list as $topic_id)
Senky wrote: ↑Thu Nov 22, 2018 12:59 pmOkay so there is an SQL query inviewforum.php
, around line 626:See thatCode: Select all
$sql_ary = array( 'SELECT' => 't.topic_id', 'FROM' => array( TOPICS_TABLE => 't', ), 'WHERE' => "$sql_where AND t.topic_type IN (" . POST_NORMAL . ', ' . POST_STICKY . ") $sql_approved $sql_limit_time", 'ORDER_BY' => 't.topic_type ' . ((!$store_reverse) ? 'DESC' : 'ASC') . ', ' . $sql_sort_order, );
$sql_where
is constructed in condition above the query. You should alter this condition by adding your forum_id to it (in all 3 cases).
So now you have topics from multiple forums, but you need to sort them. This is quite difficult. Depending on the use case, maybe it could be enough to add a condition toviewforum_body.html
near line 133:this code is what divides announcements from other topics. So you can divide different forums in the same way. But maybe you need to sort topics by forum first must be done before line 864 inCode: Select all
<!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
viewforum.php
where it starts pulling topic data:Code: Select all
foreach ($topic_list as $topic_id)
Code: Select all
'WHERE' => '(t.forum_id = ' . 7 . ' OR (t.forum_id = ' . 9 . ') OR (t.forum_id = ' . 5 . '),
Code: Select all
<!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
</ul>
</div>
</div>
<!-- ENDIF -->