Xontero Posted September 22, 2021 Share Posted September 22, 2021 (edited) Hi guys. I wanna to show solved count in hovercard so I use below codes, but these codes turn 0 result.. 😕 <!-- for solved count--> <div class='ipsPadding_horizontal:half ipsFlex ipsFlex-fd:column-reverse ipsFlex-ai:center'> <dd class='ipsType_semiBold ipsType_large ipsType_dark ipsMargin:none'>{number="$comment->author_solved_count"}</dd> <dt class='ipsType_light'><i class='bx bx-badge-check' ></i></dt> </div> How can I fix that? @ZIKURIK Edited September 22, 2021 by LoveHate Quote Link to comment Share on other sites More sharing options...
by_ix Posted September 22, 2021 Share Posted September 22, 2021 с решениями и в топиках такая же проблема. через "author_solved_count" они выводятся только в разделе с вопросами. мб можно как-то по-другому ещё, не учитывая прямого вывода с бд, конечно.прямой вывод в postcontainer: {{$solved = \IPS\Db::i()->select( 'COUNT(*)', 'core_solved_index', array( 'member_id=?', $comment->author()->member_id ) )->first();}} {$solved}прямой вывод в hovercard: {{$solved = \IPS\Db::i()->select( 'COUNT(*)', 'core_solved_index', array( 'member_id=?', $meber->member_id ) )->first();}} {$solved} Xontero 1 Quote Link to comment Share on other sites More sharing options...
Xontero Posted September 22, 2021 Author Share Posted September 22, 2021 I'll try and inform you Quote Link to comment Share on other sites More sharing options...
Exception Posted September 22, 2021 Share Posted September 22, 2021 2 часа назад, LoveHate сказал: How can I fix that? 2 часа назад, by_ix сказал: мб можно как-то по-другому ещё, не учитывая прямого вывода с бд, конечно. это делает функция solutionCount() <!-- for solved count--> <div class='ipsPadding_horizontal:half ipsFlex ipsFlex-fd:column-reverse ipsFlex-ai:center'> <dd class='ipsType_semiBold ipsType_large ipsType_dark ipsMargin:none'>{number="$member->solutionCount()"}</dd> <dt class='ipsType_light'><i class='bx bx-badge-check' ></i></dt> </div> Xontero and by_ix 2 Quote Link to comment Share on other sites More sharing options...
Xontero Posted September 27, 2021 Author Share Posted September 27, 2021 (edited) ZIKURIK @by_ix thanks how can I display my Total submitted files and Total messages sent? Edited September 27, 2021 by LoveHate Quote Link to comment Share on other sites More sharing options...
by_ix Posted September 27, 2021 Share Posted September 27, 2021 1 час назад, LoveHate сказал: Total messages sent они же и так там пишутся. или личные сообщения? не понимаю. Quote Link to comment Share on other sites More sharing options...
Xontero Posted September 27, 2021 Author Share Posted September 27, 2021 (edited) no. I mean is private message Edited September 27, 2021 by LoveHate Quote Link to comment Share on other sites More sharing options...
by_ix Posted September 27, 2021 Share Posted September 27, 2021 LoveHate {{$pms = \IPS\Db::i()->select( 'COUNT(*)', 'core_message_posts', array( 'msg_author_id=?', $member->member_id ) )->first();}} {$pms} {{$files = \IPS\Db::i()->select( 'COUNT(*)', 'downloads_files', array( 'file_submitter=?', $member->member_id ) )->first();}} {$files} Xontero 1 Quote Link to comment Share on other sites More sharing options...
Xontero Posted September 28, 2021 Author Share Posted September 28, 2021 by_ix you're best by_ix 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.