If you’ve always wanted to add an extra icon, next to the search, here’s your chance! ![]()
Installation as usual, link:
https://github.com/VonLion/discourse-menu-icon.git
The plugin “add a menu icon (next to search)” by Bas allows users to add a custom icon beside the search bar in Discourse. It was well-received, with SidV contributing a Spanish translation and suggesting an alt text feature, which Bas declined, noting that aria-label suffices for accessibility. Tom_Newsom requested support for multiple buttons, to which Bas responded that it’s technically feasible but beyond his current skill level, inviting PRs. SidV pointed to a helpful thread by @techAPJ. However, allu reported incompatibility with Discourse 2.2.0.beta7. codinghorror questioned the need for a plugin, suggesting theming can handle this. Johani confirmed a theme component already exists (iconified-header-links) and moved the plugin to #plugin:broken-plugin, thanking Bas for the contribution. The plugin is now deprecated in favor of theme-based solutions.
If you’ve always wanted to add an extra icon, next to the search, here’s your chance! ![]()
Installation as usual, link:
https://github.com/VonLion/discourse-menu-icon.git
This is great ! Thanks!
If someone has a site using this, please tell me.
I’m translating this. ![]()
An idea @Bas, maybe besides “title”, you can add
alttitle to image too?
Same setting formenu_icon_title, I think it’s here: initializers/menu-icon.js.es6#L16
Hey @SidV,
Just merged the pull requests, thanks!
Alt text isn’t necessary I think; it’s a font icon and the link already has an aria-label which is enough for screenreaders ![]()
You’re right, I was confused!
Sorry for the idea, alt would not serve here. I agree with you.
Excellent ![]()
Feature Request: Multiple buttons!
Yeah, figured it wouldn’t take long before that was requested, haha.
Thing is, I don’t know how to do this
The current plugin is a pretty straightforward modification of the excellent plugin tutorial by @eviltrout
I don’t know how to create an “add icon” button that spawns multiple fields; I know it can be done, since the navigation plugin does so, but I’m pretty new at this and I just created this one out of a personal need and to learn.
I might take a crack at this during a weekend somewhere, until then.. PRs are welcomed ![]()
For multiple buttons are some ideas here: (Superseded) Add new link on header beside search icon by @techAPJ ![]()
Heh, that thread is actually the other part of the code I stole ![]()
Thanks for this plugin. Unfortunately, it doesn’t seem to work under 2.2.0.beta7. Despite enabling, no icon appears.
I don’t think a plugin should be necessary for this in our brave new world of theming..