Skip to content

Conversation

@rxchun
Copy link

@rxchun rxchun commented May 22, 2024

This adds an Answer Counter to the Related Questions widget, on the sidebar.
Screenshot: https://i.ibb.co/vsYqgtZ/z496.jpg

If people don't want to display stats, they can simply comment out the new added line in:
qa-include/plugins/qa-widget-related-qs.php

Line to comment out:
rxchun@f0ddb7f#diff-49b7248c15fca491a6271afeff134615cc8323afbe63706402ae6369ea32c6adR75

This adds an Answer Counter to the Related Questions widget, on the sidebar.
Screenshot: https://i.ibb.co/vsYqgtZ/z496.jpg

foreach ($questions as $question) {
$selectedClass = isset($question['selchildid']) ? ' qa-a-count-selected' : '';
$qaLangACountArray = ($question['acount'] == 1) ? qa_lang_html_sub_split('main/1_answer', '1', '1')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using qa_lang_html_sub instead of qa_lang_html_sub_split should simplify the code a little bit.

BTW, you can keep the same PR and either add a new commit or amend the current one and force push it in the same branch

rxchun added 4 commits June 1, 2024 08:48
This adds an Answer Counter to the Related Questions widget, on the sidebar.
Screenshot: https://i.ibb.co/vsYqgtZ/z496.jpg
Using `qa_lang_html_sub` instead of `qa_lang_html_sub_split`
Removed `qa_format_number()` as this shouldn't be necessary for answers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants