Changing theme in globals not working

writecraft wrote on Tuesday, April 02, 2013:

Hi, I’ve added a new theme in the /interface/themes/ folder and can select  and save it from the dropdown on the Administration > Globals > Appearance tab, but it only modifies the login screen as near as I can tell.  Everything else seems to pull from the style_metal.css stylesheet no matter what I do.   Very annoying.  Is this the way the themes are supposed to work?

yehster wrote on Tuesday, April 02, 2013:

No that is not how it’s supposed to work.  Don’t know exactly what’s going wrong for you.  However, the first step I would personally take is to verify that your new theme is being served to the web pages properly.

Do a “view source” and/or “view frame source” from your browser and confirm that the line which looks like

<link rel="stylesheet" href="/openemr/interface/themes/style_oemr.css" type="text/css">

has the file name you expect.

robertrambo wrote on Tuesday, April 02, 2013:

Hello

Has anyone seen the netbeans interface with chromium netbeans extension that lets you work on css theme while its open in the browser?
Lets you see things as soon as they go wrong!

-Rob

robertrambo wrote on Tuesday, April 02, 2013:

Chrome extension for netbeans
https://chrome.google.com/webstore/detail/netbeans-connector/hafdlehgocfcodbgjnpecfajgkeejnaa?hl=en

writecraft wrote on Tuesday, April 02, 2013:

I use firebug - and even though my custom theme is set in the database globals css_header, fire bug and the frame source show style_metal.css as the stylesheet.  Frame source as well.

The login page uses the correct one:  https://myhealthbilling.com/openemr/interface/

But once I login . . . .

<link rel="stylesheet" href="/openemr/interface/themes/style_metal.css" type="text/css">

yehster wrote on Tuesday, April 02, 2013:

This is the line included on most every page (including the login screen) to choose which style sheet to use based on the globals setting.

My guesses as to what is wrong is that your browser is caching the old versions of pages, or something you’ve customized is clobbering the $css_header global value.

writecraft wrote on Tuesday, April 02, 2013:

Just figured this out!  I changed the theme setting in Administration > Globals, but that just changes the default theme apparently. 

We must also go to Miscellaneous > Preferences (Edit User Settings) > Appearance tab and change the Theme setting there as well. 

This is not intuitive.  User preferences should be under ‘Administration’ or ‘Administration > Users’, not dumped under ‘Miscellaneous’.

robertrambo wrote on Wednesday, April 03, 2013:

Hello,

Just a quick question?
Does this happen to be on a user by user basis (if you create a new user it default again)?
If I remember correctly it is set so each individual limited user can change their style which is saved to their login profile?
A limited user will not have access to the admin tree to choose global default?
Filepermissions safety is in place acl or something in admin settings you may need to change the files others have access to ….

-Rob

writecraft wrote on Wednesday, April 03, 2013:

Hi Rob, I assume that it might affect each user, which will be a  concern for us in the future.  I will have to investigate that - I have not yet created a new user to see what happens.  Nor have I investigated yet how to limit user access to global default settings or other admin capabilities.  I’ll be looking in the wiki for that soon, though that hasn’t been very helpful in these kind of matters (setup and customization) so far.

penguin8r wrote on Friday, April 05, 2013:

User settings have to be under Miscellaneous, since most users do not have access (for good reason!) to the Administration functions.