Multiple blank replies added to several unrelated posts when any one replies.

Ben
Multiple blank replies added to several unrelated posts when any one replies.
Ben@49a5762e Wednesday 9th August 2023, 22:06:28

Noticed this happening in both my forum and this one as well. Whenever someone replies to a post, it adds the reply to that post, but also adds multiple blank replies to other posts on that page in the same forum directory. The photo shows what I mean, I would like to help fix this if someone could direct me to the file that is responsible for performing this action.

image

Last modified by Ben@49a5762e on Wednesday 16th August 2023, 21:12:00

Replies 4
SurveyBuilder-Admin
SurveyBuilder-Admin  Thursday 10th August 2023, 19:19:53

I am confused on what you mean.
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

Ben
Ben@49a5762e  Friday 11th August 2023, 16:40:01

SurveyBuilder, please take a close look at the photo I posted. Whenever anyone replies to a single topic with No Replies, the forum index shows that the user has added replies to multiple posts, When in fact there are Zero replies. Except for the post they replied to this will show a count of one or more depending on how many replies are in that post.

For an example of this go to this forum view: https://flatboard.org/view.php/forum/resources and look at the post that says you replied to MindReader when in fact that post has zero replies.


This is a strange bug, which only affects the first page of shown posts in the forum index.

It happens whenever someone adds the first reply to a post. Their names are shown across multiple topics as having replied when they really didn't.

Last modified by Ben@49a5762e on Friday 11th August 2023, 16:44:00

SurveyBuilder-Admin
SurveyBuilder-Admin  Monday 14th August 2023, 00:07:01

Ok, I get it now, it is confusing what that does it, my guess is because you started a topic and apparently counts a reply, but it's not, my thought it's used as a placeholder.
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

Ben
Ben@49a5762e  Wednesday 16th August 2023, 21:12:37

Kind of solved the Blank Phantom replies from showing up. While I could not figure out what was causing the issue with the phantom replies showing up on every post in the same page on the forum index whenever someone posted a valid reply. Here's a workaround that will hide them.

The valid reply which increases the reply count is still shown, the remaining duplicate are hidden and not shown in the forum view any longer.

Open your viewForum.tpl.php file inside your theme/bootstrap/ folder and replace the entire file with this code. It will filter out any replies that don't increase the reply count from being shown. This way you can tell at a glance which post the user actually replied to instead of seeing the same user name and time stamp on every post on that first page of the forum index as a reply when in fact they didn't.


<?php
$out['content'] .= '<div class="media text-muted pt-3">';
$out['content'] .= '<figure class="mw-10">' . Plugin::hook('profile', $topicEntry['trip']) . '</figure>';
$out['content'] .= '<div class="media-body ml-3 pb-3 mb-0 small lh-125 border-bottom border-gray">';
$out['content'] .= '<div class="d-flex w-100">';
$out['content'] .= '<h6>' . entryLink::manageTopic($topic) . Plugin::hook('titleTopic', $topic);
$out['content'] .= $tag . '<a href="view.php' . DS . 'topic' . DS . $topic . '">' . Parser::title($topicEntry['title']) . '</a>';
$out['content'] .= '</h6>';
$out['content'] .= '</div>';
$out['content'] .= '<div class="float-right">';
$out['content'] .= (isset($forumEntry['pinnedTopic'][$topic]) ? '<span class="badge badge-warning" data-toggle="tooltip" data-placement="top" title="' . $lang['pinned'] . '"><i class="fa fa-thumb-tack"></i></span> ' : '');
$out['content'] .= ($topicEntry['locked'] ? '<span class="badge badge-danger" data-toggle="tooltip" data-placement="top" title="' . $lang['locked'] . '"><i class="fa fa-lock"></i></span> ' : '') . '<br />';
$out['content'] .= Util::shortNum($topicEntry['view']) . '&nbsp;<i class="fa fa-eye" title="' . $lang['view'] . Util::pluralize($topicEntry['view'], $lang['plural']) . '"></i><br />';
if (count($topicEntry['reply']) > 0) {
$out['content'] .= Util::shortNum(count($topicEntry['reply'])) . '&nbsp;<i class="fa fa-comment-o" title="' . Util::pluralize(count($topicEntry['reply']), $lang['replies'], $lang['reply']) . '"></i>';
}
$out['content'] .= '</div>';
$out['content'] .= '<div class="d-block">';
if (count($topicEntry['reply']) > 0) {
$out['content'] .= '<span class="user ' . $topicEntry['role'] . '">' . Parser::title($topicEntry['trip']) . '</span>';
$out['content'] .= ' ' . $lang['started'] . ' ' . Util::toDate($topic, $config['date_format']);
$out['content'] .= (isset($lastReply) ? $lastReply : '');
$out['content'] .= $lastedited;
}
$out['content'] .= '</div>';
$out['content'] .= '</div>';
$out['content'] .= '</div>';
?>


Fred, please fix or remove auto favicons so it does not mess up the code.

In the code: The line with the favicon should read: $out['content'] .= $lastedited ;
(there should be no space between the final d in lastedited and ; [/b]
I had to add an extra space because, without it, this favicon is automatically added 😱 which breaks the actual code. )

Last modified by Ben@49a5762e on Wednesday 16th August 2023, 21:21:00

Suggested Topics
SurveyBuilder-Admin
SurveyBuilder-Admin started 🐞 fixed VPNDetect(PRO VERSION)
Resources
18.2K 3
SurveyBuilder-Admin
SurveyBuilder-Admin started plugin MindReader
Resources
15.7K 0
Want to read more? Browse all categories or view latest topics.