Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: PaperseraNet on December 04, 2018, 09:31:50 AM

Title: How to show who is answering a topic?
Post by: PaperseraNet on December 04, 2018, 09:31:50 AM
Hello,

I's now almost an year my forum moved from YaBB to SMF, and I'm really happy with it.

Trying to customize some stuff, I'd like to have some help in knowing if it is possible to show on the Display page who is answering the topic, just after the list of persons who are viewing it.

Maybe I'll explain myself better by code...

In Display.template.php I have the following lines (slightly edited for readability):


if (!empty($settings['display_who_viewing'])) {
echo '<p id="whoisviewing" class="smalltext">';
[...]
echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');

echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '</p>';
}


Besides $context['view_members_list'] is there something like this to show the users who are answering to the topic?

Thank you,

  - Paolo
Title: Re: How to show who is answering a topic?
Post by: live627 on December 04, 2018, 12:18:00 PM
Would Active Members In Topic (http://custom.simplemachines.org/mods/index.php?mod=355) be close to what you seek?
Title: Re: How to show who is answering a topic?
Post by: Arantor on December 04, 2018, 01:32:55 PM
No, because there's no way to see who is typing, unless it sent that back to the server every few seconds, and then updated you every few seconds. Unless on a very large server, the extra load would be a huge problem.
Title: Re: How to show who is answering a topic?
Post by: Gwenwyfar on December 04, 2018, 04:43:52 PM
Quote from: Arantor on December 04, 2018, 01:32:55 PM
No, because there's no way to see who is typing, unless it sent that back to the server every few seconds, and then updated you every few seconds. Unless on a very large server, the extra load would be a huge problem.
What about those viewing the reply page? Wouldn't be accurate depending on the situation, but neither is the viewing list for some.
Title: Re: How to show who is answering a topic?
Post by: vbgamer45 on December 04, 2018, 04:44:28 PM
Fairly unless they are using quick reply. Like I am doing now.
Title: Re: How to show who is answering a topic?
Post by: PaperseraNet on December 04, 2018, 04:51:12 PM
First of all thanks for your replies!

Quote from: Gwenwyfar on December 04, 2018, 04:43:52 PMWhat about those viewing the reply page? Wouldn't be accurate depending on the situation, but neither is the viewing list for some.

Good idea.... but...

Quote from: vbgamer45 on December 04, 2018, 04:44:28 PMFairly unless they are using quick reply. Like I am doing now.

soon "destroyed" by vbgamer45 ;D

BTW, maybe I'll use it at the same. Its goal is to avoid moderatros moving topics while users are writing their replies, so I think this could be an acceptable solution: it gives more information than nothing at all...

Thanks,

  - Paolo
Title: Re: How to show who is answering a topic?
Post by: Gwenwyfar on December 05, 2018, 02:42:36 AM
Quote from: vbgamer45 on December 04, 2018, 04:44:28 PM
Fairly unless they are using quick reply. Like I am doing now.
Yep. And viewing list also doesn't help for people who open more than one tab. Both depend on how users use it to be of any use. Probably quick reply would be a more common offender though :P