Jump to content

Recommended Posts

Posted

Hello,

Currently the solved counter in the user's pane only shows up in forums where the solved feature is enabled. See image attached. I think this counter should be shown in all forums. Just because in one particular forum we can't mark topics as solved, I don't think we should hide the fact that the user solved topics in other forums within the same community.

Thanks.

solved-issue.png

Posted

@Gabriel Torres it's easy to accomplish this by editing your theme template. 

 

Find postContainer, and then find this

 

{{if isset( $comment->author_solved_count )}}
<li>
<a href='{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=solutions" seoTemplate="profile_solutions" seoTitle="$comment->author()->members_seo_name"}' title="{lang="solved_badge_tooltip" pluralize="$comment->author_solved_count"}" data-ipsTooltip class='ipsType_blendLinks'>
<i class='fa fa-check-circle'></i> {number="$comment->author_solved_count"}
</a>
</li>
{{endif}}

It's going to be in line 101. 

 

Delete line 101 =  {{if isset( $comment->author_solved_count )}} and line 107 = {{endif}}. Save and enjoy solved counter everywhere in forums.

Posted (edited)
27 minutes ago, Gabriel Torres said:

@Afrodude I've already tried this. It doesn't work, because the variable $comment->author_solved_count is set to 0/NULL from the PHP code.

What I just told you works just fine. I tested it. 

 

Just do exactly what I mentioned above, and you will reach what you looking for 100%.

Edited by Afrodude
Posted
3 minutes ago, Gabriel Torres said:

@Afrodude Are you sure you are testing in a forum with the Solved functionality disabled?

Yes. The only issue that it will show even for members who have zero count.

Posted

@Afrodude When I say "it doesn't work here", I mean that the counter shows, but as zero instead of the correct solved counter when I remove the {if} statement. 

Think about it: in the original logic, if $comment->author_solved_count is different from zero, then the counter is shown. The only occasion that the HTML tag/counter wouldn't be shown is if $comment->author_solved_count = 0.

If I remove the if statement, the counter is displayed as 0, however, this user's solved counter isn't zero (it is 53)... As I said, the source code is forcing the counter to be zero even when it isn't when the post is in a forum that has the solved option disabled.

I made a very simple test: I enabled "Enable Solved?" for that forum and the counter was displayed (as 53, not zero). If I disable this option, the counter is displayed as 0 (with the {if} tag removed).

 

Posted (edited)
4 minutes ago, Gabriel Torres said:

Think about it: in the original logic, if $comment->author_solved_count is different from zero, then the counter is shown. The only occasion that the HTML tag/counter wouldn't be shown is if $comment->author_solved_count = 0.

True you are right, and this is what I have been trying to solve in the past two days. 

Edited by Afrodude
  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...