With the introduction of DotNetNuke 6 came a rather annoying facelift (just a personal opinion) and a new default CSS stylesheet. This new stylesheet applies a position:relative; to the class .DnnModule, which applies to all of the modules installed on any given page. This allows for the "Manage" button to float on top of the modules. However, applying the attribute position:relative; on .DnnModule will most likely interfere with some of your custom extravagant styling. God forbid you try to use position:absolute; on any element that would overlap another module. Tisk tisk... You should have known better. Sometimes you get lucky and get away with it in modern browsers but most of the time you don't, especially when you support browsers like IE7. If you dare remove, edit or override it, all the "Manage" buttons will stack on top of each other in the top left corner of your screen rendering the CMS useless.
A great example is our Website!
Some of you might have already encountered this issue, or some of you are still pulling your hair trying to figure out why things aren't displaying properly.
The code will check whether the user that is logged on is an Admin or Superuser. If not, it will override the default position attribute of .DnnModule allowing everything to display properly. If yes, it will NOT override, allowing for the "Manage" buttons to be positioned properly. Things might not be pretty for the Admins, but at least they can use the CMS tools.
In order for this to work, you will need to copy/paste this code at the top of each of your skin files (ex. homepage.ascx) located in your /Skins folder.
If Not DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo().IsSuperUser And Not DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo().IsInRole("Administrators") Then
Good luck! Let me know if this works for you, or if you have anything to add, in the comments below.
Digital Agency located in Chicago and Denver.
Copyright 2019 by BlueBolt