Each role uses the site in different ways, therefore I'd like to be able to give each role a different admin theme.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 933470-12-admin_theme_multirole.patch | 7.3 KB | vbouchet |
| #3 | 933470-admin_theme_multirole.patch | 4.75 KB | snufkin |
| #2 | 933470-admin_theme_multirole.patch | 4.74 KB | snufkin |
Comments
Comment #1
mrfelton commentedsubscribe
Comment #2
snufkin commentedThis is what I have so far, I changed the variable to an associative array of role ids and admin theme setting. I added a special element 'user_1' for the superuser, because that probably wont belong to any roles, yet have access to the admin theme.
Implemented update function as well.
Comment #3
snufkin commentedForgot to reroll for the update functions, here it is.
Comment #4
carvalhar commentedhi,
Thanks for this patch, i'm using it and everything is working fine.
I'd like to add a note: I had given permission for authenticated users and my two custom roles and nothing changed, because the admin theme was setting for authenticate user.
So, i just had to avoid this permission and the two custom roles worked fine.
Comment #5
ari-meetai commentedThis works great in a couple of installs. Can it be made into the module :)
Cheers.
Comment #6
willvincent commentedI confirm the patch in comment #3 is a solid working patch, and a great addition to this module.
Please roll this into the module.
Comment #7
borgenk commentedThis does not work in some edge cases. If you have organic group and ubercart installed, it will produce an error message in admin/store/orders/%uc_order and actually fail setting the correct theme.
warning: Illegal offset type in /home/foo/drupal/includes/theme.inc on line 47.
It is caused by the og_determine_context() function in organic group which is eventually loading the order between system_init() and admin_theme_init(). Loading the order fires off init_theme() and the global $custom_theme variable will still be an array instead of the expected string.
theme.inc line 47:
$theme = $custom_theme && $themes[$custom_theme] ? $custom_theme : $theme;
Comment #8
vaccinemedia commentedLooks like this never made it to a final release. Would it be possible to pick this up as a feature request for the Drupal 8 version of the module or are there other ways in achieving this now?
Comment #9
vaccinemedia commentedComment #10
justy commentedThe last patch didn't work in some of the edge cases per #7. Need to test again and improve upon as needed.
Comment #11
vbouchetThis patch definitely needs work as it was initially written for D7 version of the module.
Comment #12
vbouchetPlease find a patch which provides the feature for the 8.x-1.x version of the module.