Step 4: Add the new theme records.
- Login to lams
- If customising the HTML pages, add a new record with a name "<themename>HTML".
- If customising the Flash interfaces, add a new record with a name "<themename>". (Future only - can't be done at present.)
The description field can be whatever you want. The parent_id field should be left null, theme_flag set to 1 and the image_directory column set to the name of the directory that contains the images. The directory name is just the name of the directory under the images directory - it is NOT the path. For example, assume we are adding a theme "mytheme". The new record for the HTML pages would be inserted as:
insert into lams_css_theme_ve (name, description, theme_flag, image_directory) values ("mythemeHTML", "My own theme", 1, "mythemecss");
- as sysadmin.
- Go to sysadmin -> themeManagement.
- Enter the theme name as to match the <themename>HTML.css file.
- Enter the description and CSS image directory.
- Select "Make this them the server default" if you want all users to be added with this theme by default from now on.
- For type, select HTML.
- Click save.
Step 5: Update the theme entries for the server and existing users
Change the lams_configuration table, update the DefaultHTMLTheme and DefaultFlashTheme to match your new record(s). This will change the theme used for all new users. This can be changed using the Server Configuration screen (logged in as sysadmin).All users will now have the option of selecting the new theme in the "Edit My Profile" page, also if your selected "Make this them the server default" in the theme management page, all users created from now on will have the new theme by default. But you may also wish to enforce the theme on all the existing users, you can do this on a per-student basis by going to the edit user page in the sysadmin pages. Or alternitively you can change the theme for all users by running the following MySQL script on your database
You will also need to change the theme for existing users. The fields to update are the flash_theme_id and html_theme_id in the lams_user table.
update lams_configuration set config_value = "mythemeHTML" where config_key = "DefaultHTMLTheme"; update lams_user set html_theme_id = ( select theme_ve_id from lams_css_theme_ve where name = "mythemeHTML");