Hi, I've updated to the latest version of this mod and phpbb but the codes changed, can you tell me which code needs altering/deleting so everypage shows the recent topics from the hole forum again?nickvergessen wrote:this is how its supposed to be.bigwookie wrote:I've got this mod working on the index, viewtopic & viewforum and it all works apart from on the viewtopic & viewforum it shows recent topics from that category only and not the whole forums, I've checked and redone my edits but I cant work out why it doing this or what I've done or missed.
This is the site http://www.soe-squad.com its running on and any help would be appreciated
if you dont want that, simply open includes/functions_recenttopics.php
find and delete:Code: Select all
if ($spec_forum_id) { $spec_forum_ary = array($spec_forum_id); $sql = 'SELECT parent_id, forum_id FROM ' . FORUMS_TABLE . ' WHERE ' . $db->sql_in_set('forum_id', $forum_ary) . ' ORDER BY left_id'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { if (in_array($row['parent_id'], $spec_forum_ary)) { $spec_forum_ary[] = $row['forum_id']; } } $db->sql_freeresult($result); }
Code: Select all
$spec_forum_ary = array();
if ($spec_forum_id)
{
// Only take a special-forum
if (!$include_subforums)
{
if (!in_array($spec_forum_id, $forum_ids))
{
return;
}
$forum_ids = array();
$sql = 'SELECT 1 as display_forum
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $spec_forum_id . '
AND forum_recent_topics = 1';
$result = $db->sql_query_limit($sql, 1);
$display_forum = (bool) $db->sql_fetchfield('display_forum');
$db->sql_freeresult($result);
if ($display_forum)
{
$forum_ids = array($spec_forum_id);
}
}
else
{
// ... and it's subforums
$sql = 'SELECT f2.forum_id
FROM ' . FORUMS_TABLE . ' f1
LEFT JOIN ' . FORUMS_TABLE . " f2
ON (f2.left_id BETWEEN f1.left_id AND f1.right_id
AND f2.forum_recent_topics = 1)
WHERE f1.forum_id = $spec_forum_id
AND f1.forum_recent_topics = 1
ORDER BY f2.left_id DESC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$spec_forum_ary[] = $row['forum_id'];
}
$db->sql_freeresult($result);
$forum_ids = array_intersect($forum_ids, $spec_forum_ary);
if (!sizeof($forum_ids))
{
return;
}
}
}
else
{
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
AND forum_recent_topics = 1';
$result = $db->sql_query($sql);
$forum_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = $row['forum_id'];
}
$db->sql_freeresult($result);
}
Code: Select all
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
AND forum_recent_topics = 1';
$result = $db->sql_query($sql);
$forum_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = $row['forum_id'];
}
$db->sql_freeresult($result);
Ephemeraboy wrote:hi nick
can i just use the specified forum..
not global forum...
if can, how to do..??
thx so much nick