Unicode has many code pages dedicated to symbols that can satisfy a range of needs for icons. They are also much lighter to use.
|mediawiki/extensions/TitleIcon : master||Enable the use of Unicode characters as icons in extension TitleIcon|
I just submitted a patch, referenced above, which can be seen in action at https://arabdigitalexpression.org/wiki/مستخدم:أحمد, featuring two icons added to the title: one is a regular "file:" from the wiki, an the other a string of Unicode codepoints representing an emoji+modifier.
It would be even better to suppoort Font-Awesome icons, especially as they are bundled with twitter boostrap 4 (glyphicons in boostrap 3) and there are a lot of skins supporting twitter bootstrap for MediaWiki.
As the property Title Icon is already of type text, it would be easy to set
[[Tilte Icon::fas fa-info-circle]] or [[Tilte Icon::<span class="fas fa-info-circle"></span>]]
Which should result in
<span class="fas fa-info-circle"></span>
were the icon should appear. Regarding sizing, something like
<span class="fas fa-info-circle fa-2x"></span> ``` might be needed.
Agreed! Somebody else made exactly the same request while I was at the Hackathon a couple of weeks ago. I'd like feedback on several potential - possibly backward-incompatible - changes:
- I'm considering changing to a parser function to set the icons. This would allow passing in a format parameter (file, Unicode, Font-Awesome) with the value parameter, which would eliminate some of the complications discussion on the patch above (https://gerrit.wikimedia.org/r/490205).
- I'm considering changing the extension so that it does not require Semantic MediaWiki. It could use page properties or the new Multi-Content Revisions capability for storage instead. This would allow wikis without Semantic MediaWiki installed to use the extension. This would require changing to a parser function to set the icons as described in 1).
- Since both of those would be backward-incompatible changes, I'm wondering if I should leave this extension alone and either create a new extension or add this functionality to the DisplayTitle extension (since the icons are displayed with the title of the page).
- I don't have a problem with parser functions even if it breaks changes. If you upgrade your wiki, you know that in advance and can change that accordingly.
- As with CommentStreams I like the approach that SMW is not a prerequisite, but is supported if it is available.
- Hmm. I have neither used the DisplayTitle extension yet, not Semantic Title. But I do think that it is a good option to merge the functionality of all three into one, it that is feasible.