Topic: How show info "This topic is subscribe by" for all?

Hi,

how can i show the infoline in the footer...
"This topic is subscribe by: user1, user2, etc."
...for _all_ users?

Or where can i find the specific code fragment?

Thanks in advance,
punner


ps. sorry for my english if its wrong smile

Re: How show info "This topic is subscribe by" for all?

There is no such option in the core. This code outputs the list of topic subscribers:

$query_subscriptions = array(
    'SELECT' => 'u.id, u.username',
    'FROM'   => 'users as u',
    'JOINS'        => array(
        array(
            'LEFT JOIN'        => 'subscriptions AS s',
            'ON'            => 's.user_id = u.id'
        )
    ),
    'WHERE' => 's.topic_id = ' . $id
);

$result = $forum_db->query_build($query_subscriptions) or error(__FILE__, __LINE__);
$sub_users = array();
while ($cur_user = $forum_db->fetch_assoc($result))
    $sub_users[] = ($forum_user['g_view_users'] == '1') ? '<a href="'.forum_link($forum_url['user'], $cur_user['id']).'">'.forum_htmlencode($cur_user['username']).'</a>' : forum_htmlencode($cur_user['username']);
echo implode(' ', $sub_users);
unset($sub_users);

Re: How show info "This topic is subscribe by" for all?

Hi Salvok,

thank you for your code.

But the "Forum-Admin" allready see this footer infoline, where is this code fragment?
Can i change this for all?

Best regards,
punner

Re: How show info "This topic is subscribe by" for all?

You need to add this code to the "<FORUM_ROOT>/viewtopic.php" file after the 560th line.

Re: How show info "This topic is subscribe by" for all?

Hi Salvok,

OK, thank you. smile

punner