I had the following code installed in my custom theme under the </head>
section:
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('d-liked', 'thumbs-up');
api.replaceIcon('d-unliked', 'thumbs-o-up');
api.replaceIcon('heart', 'thumbs-up'); // profile pages
api.replaceIcon('notification.liked', 'thumbs-up'); // notifications
</script>
Previously while on 2.5.x this was working to replace the heart, but now the custom icon is gone, and there is no heart. Has the method changed for replacing the heart? Thanks.
Steven
2020 年 7 月 9 日午後 6:42
2
There’s been some cleaning up in the icon library if I remember correctly.
Could you try adding in the setting : svg icon subset
, the icons
fa-thumbs-up
far-thumbs-up
The script might need some edit too, but I’m not sure if it will work with this
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('d-liked', 'thumbs-up');
api.replaceIcon('d-unliked', 'far-thumbs-up');
api.replaceIcon('heart', 'thumbs-up'); // profile pages
api.replaceIcon('notification.liked', 'thumbs-up'); // notifications
</script>
or
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('d-liked', 'fa-thumbs-up');
api.replaceIcon('d-unliked', 'far-thumbs-up');
api.replaceIcon('heart', 'fa-thumbs-up'); // profile pages
api.replaceIcon('notification.liked', 'fa-thumbs-up'); // notifications
</script>
I tested on a theme component I use for christmas (gift icon instead of heart) and it works, so the javascript is still good
「いいね!」 3
Sorry for the additional question, but where is this done?
Steven
2020 年 7 月 9 日午後 6:59
4
your-forum/admin/site_settings/
search for this setting and you’ll find it easily
「いいね!」 3
Awesome thanks so much! Found it:
「いいね!」 1