There was a necessity for me for icons for admin_menu.
Has found for itself the fast decision:
replace in admin_menu.module function admin_menu_item_link by:
function admin_menu_item_link($link, $itemid) {
// Omit alias lookups.
$link['localized_options']['alias'] = TRUE;
return '<a href="'. check_url(url($link['href'], $link['localized_options'])) .'"><span class="adm'.$itemid.'"></span>'. (!empty($link['localized_options']['html']) ? $link['title'] : check_plain($link['title'])) .'</a>';
}
+ additional css
#admin-menu li a span {display:block; width:16px; height:16px; float:left; margin:0 8px 0 0; background-position: center center; background-repeat:no-repeat; overflow:hidden; position:relative}
#admin-menu .adm2798 {background-image: url('icons/package_green.png');}
#admin-menu .adm2805 {background-image: url('icons/brick.png');}
etc....
+ famfamfam Silk Icons and other icons
Result in attachment
The lack - function admin_menu_wipe make bad results...
Whether there is any other way for definition unique id for each menu item?
Whether it is impossible to add similar possibilities in the module?
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | open_atrium_config_icons.png | 182.36 KB | klonos |
| admin_icon.gif | 8.42 KB | HeNuS_spb |
Comments
Comment #1
sunNote that modern browsers allow you to use modern CSS selectors:
Thoughts?
Comment #2
mcrittenden commentedI'm all for this option, or any other option that allows for more theming flexibility. And I'm ok with using selectors that IE6 doesn't support, as long as it degrades gracefully. So +1 for me on using CSS for what CSS is for.
Oh, and subscribe :).
Comment #3
klonosDoes this still work in latest (dev) versions? I am asking because I see no 'admin_menu_item_link' function inside the admin_menu.module file.
In which file am I supposed to add the additional css?
Also, where should the famfamfam Silk Icons be placed?
Comment #4
sunComment #5
Bojhan commentedThere are not actually icons going into the module are there?
Comment #6
klonosI see focus now turns on D7. Hope to see it ported back to D6 as well once done.
Comment #7
klonos...just a minor title edit.
Comment #8
Bojhan commentedI am going to mark this won't fix, sun can overrule if he wants to. But I feel using icons is a overall no-go area as you will have many "dummy" icons for contributed modules + its eye candy without purpose, for such important real estate like the navigation bar its only adding clutter.
Comment #9
sunThanks - fundamentally, that's most probably true.
However, I'd still like to explore usage of icons for the top-level links in the menu (i.e., the always visible links). Those should technically be in a manageable and doable scope.
Comment #10
klonosA quick related googling gave these interesting results:
Do icons help your sites usability
Myth #13: Icons enhance usability
...though I must say that from my personal experience I find it way easier to locate menu items in all applications that I come across. For example, each time I use firefox in a computer other than mine, it takes me a few extra milliseconds to 'pinpoint' items then it does in my profile using CuteMenus.
A few days back I've read this really informative article (I wish I could remember the URL to link to) regarding Open Atrium and how it uses 3 categories of icons in its configuration page:
- Creative colorful icons with unique graphics for sections that need to 'catch the eye' of the user straight away.
- Square icons in shades of gray with small colored items in them (like say a green + sign for 'Add') that don't need that much attention.
- Square 'plane' icons in shades of gray that take care of trivial tasks.
Comment #11
klonos...here's a screenie of the whole config page in Open Atrium. Notice how when zoomed out the eye is caught by the icons for content types, blocks, taxonomy, users, menus, modules, themes etc. and how less important icons are 'subconsciously' ignored.
I guess my point is that icons actually do help with navigating faster IMHO.
Comment #12
Bojhan commentedklonos: So what are the icons helping? You identify important pages? Should that really be the purpose of an icon - to me that sounds like a diffrent problem. Please do not mistake, that icons do add a cognitive load - recognizeable or not, its far less subconcious.
Comment #13
klonosIcons can have two uses that I can come up with at the top of my mind:
1. Pure cosmetic thing + UX enhancement, especially for new users.
2. Faster navigation in large menus. After some time the eye gets used to pinpointing the icons instead of the text, even if items get moved around (once more new items are added in the same menu).
Agreed. That's why they can be optional, either by providing a setting/checkbox in the module's settings or even offered as a completely separate submodule. Users concerned about speed/performance can leave it disabled, while those that really like it (and can live with the downside) can enable it.
Deciding if icons are useful depends on a lot of factors and personal opinion (that's why I kinda knew beforehand that there'd be flame wars over this). This is pretty much the same case with multilingual sites' language switcher. Some like it as simple as a list of languages or a drop-down menu (default core provides that), while others like it with icons and use Language icons.
-edit: forgot to close the tag again, sorry-
Comment #14
Bojhan commented@klonos So from the reading I have done in terms of HCI, 2. takes a lot of time and it is hard to understand the reasoning how people get to such behavior.
I think this is fine as separate module, or perhaps as an opt-in setting - to experiment whether this truly adds something and we meet the desired behavior in 2. However for such a fundamental module like admin_menu it would be silly to experiment, without knowing whether we meet the desired behavior.
I wish to note, especially for future reference - that this is only limited to personal opinion. A lot of it is understanding how users perceive, think and action on given interaction and visual cues, thats not an science but definitely not guesswork either. Same applies to coloring the bikeshed, colors are not just personal opinion - there are concepts about which colors create good harmony.
Comment #15
klonosFair enough.
Comment #16
truls1502I am sorry for no reply until now.
There are many issues regarding this module admin_menu which is a bit difficult for us to follow up since some of the issues might be already outdated, or is already fixed by the module or any other modules or itself core which means that the problem might no longer need to be fixed.
We can see that the issue has been created for a few years ago, I hope it is okay for you that I am postponing the issue, and give you around two weeks. If you still face the problem, could you tell us the step by step when until you get the error message or what is frustrated you, and a list of modules you are using related to admin_menu and a screenshot that might help us? So it makes us easier to reproduce your issue.
However, after two weeks with no feedback - we will close this issue. So in case, you noticed it after the issue is closed, do not hesitate to reopen it like and fill information which is mentioned above.
So before giving us a feedback, do you mind to test it again with our latest 7.x-3.x-dev?
Thank you for understanding! :)
Comment #17
truls1502This issue has been automatically marked as closed because it has not had recent activity after the last post.
However, if you or someone is still facing the same issue as described to the issue, could you please to re-open the issue by changing the status of the issue, and add an explanation with more details which can help us to reproduce your situation.
Again, thank you for your contributions! :)