Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Tuesday at 01:29 PM
David Ehmer Posted May 4 Share Posted May 4 I'm hoping to assign badges to specific posts. I've set up a few with custom icons. These two badges are to be manually assigned to posts by admin only and will indicate if we endorse the post. For example: "Supported by research" or "Endorsed by LTA". Assigning badges works well, but for some reason the icons related to the badges don't display with the post. Here's an example of what is displayed. The icon assigned to the 'Endorsed by LTA' badge looks like this, but is nowhere to be seen on the post. Anyone know if there's a way to ensure this icon is displayed with the post the badge is awarded to? Link to comment Share on other sites More sharing options...
teraßyte Posted May 4 Share Posted May 4 The badge icon is indeed not displayed on posts, you can see the same happening on this site: Once awarded, the badge icon appears only in the user's profile: https://invisioncommunity.com/profile/145950-teraßyte/badges/ => Helpful for a post in a topic Link to comment Share on other sites More sharing options...
David Ehmer Posted May 5 Author Share Posted May 5 Hi teraByte Thanks for your advice. Do you know if there is any way to get the icon to display on the post it was awarded to? Could this be customised by a developer? Link to comment Share on other sites More sharing options...
Marc Stridgen Posted May 5 Share Posted May 5 This is something that would need to be 3rd party developed. There is no way in which to do so within the core platform. Link to comment Share on other sites More sharing options...
Solution Nathan Explosion Posted May 5 Solution Share Posted May 5 (edited) This post was recognized by Marc Stridgen! Nathan Explosion was awarded the badge 'Helpful' and 5 points. Here's your starter... Edit the following template in your theme: core -> front -> global ->commentRecognized Add the following at the start of the template: {{if($comment->recognized->badge)}} {{$badge = \IPS\core\Achievements\Badge::load($comment->recognized->badge );}} {{endif}} Then add this where you want the badge displayed: {{if ISSET($badge)}} {$badge->html()|raw} {{endif}} That will give you a full size badge - experiment with the following to change the size....range is 1 (small) to 8 (large) {{if ISSET($badge)}} {$badge->html('ipsFlex-flex:00 ipsDimension:4', FALSE, TRUE)|raw} {{endif}} Edited May 5 by Nathan Explosion Adriano Faria and teraßyte 1 1 Link to comment Share on other sites More sharing options...
David Ehmer Posted May 5 Author Share Posted May 5 @Marc Stridgen @Nathan Explosion Thanks for your comments and tips. This is much appreciated. Link to comment Share on other sites More sharing options...
Nathan Explosion Posted May 12 Share Posted May 12 I've added a more-advanced version of the above edit into v1.3.0 of "(NE) Display my badges" - see below for details: Link to comment Share on other sites More sharing options...
Recommended Posts