-
Notifications
You must be signed in to change notification settings - Fork 31
Customization 4.0
Below are just notes for content to add to this page :)
We strongly discourage editing the look and feel of the back end, i.e., /control/ . However, we encourage you to write Creating Custom Pluslets!
You can decide which boxes you want to appear for your users by going to Admin > Config Site and then turning on/off boxes in Pluslets Activated. However, you may also want to rearrange the order of the boxes so the most popular ones show up at the top. Currently, you must do this the Hard Way: go to control/edit-config.php and find the "pluslets_activated" array, then rearrange those array items to your specifications. Please note that this is a multidimensional array, so you need to be careful :) We will try to make this editable via the web interface in future.
"pluslets_activated" => array( _( "Pluslet Activated" ), _( "Which Pluslets are activated." ), "array", "right", "ticks", array('Basic', 'Heading','Card', 'HTML5Video','SubjectSpecialist', _('4'),'Feed','SocialMedia','WorldCat', 'Catalog','ArticlesPlus','GoogleBooks','GoogleScholar','GoogleSearch', 'Related','TOC', _('2'), _('1'), 'GuideSearch', 'GuideSelect', 'NewDBs', 'NewGuides','CollectionList','GuideList','Experts', _('3'), _('5')), _("") ),
We have some very basic styles that ship with SP4, but we recommend that you customize them to match your site. There are a number of customization options, from just customizing the CSS, to adding your own custom header/footer (without altering the base files), to creating a new theme. If you are going to customize any files in /subjects/ , we strongly recommend that you create your own theme. You can do this file; i.e., if you only want to customize the databases.php, you can make the theme folder (subjects/themes/mysteryu/) and just put in that single file. See below for details.
The simplest customization is to swap in your own logo. You can do that by replacing the image called "logo.png" in /assets/images/public/. If you make your image exactly 200 x 37 pixels, you will be fine. If you choose to make your logo taller than 37 pixels, you might need to adjust other parts of the CSS on the page.
It's probably easiest to start with an existing stylesheet in assets/css/shared, copy it, rename it, and make changes. For example, start with cleanwhite.css (which is the current default) and rename it superu.css. Then in Admin > Config site find the "Use your own CSS" box and enter "superu" (or whatever you named your file). This will mean that your header file will pull in this CSS to style the page.
In subjects/includes/ create a new file for each with your institution's suffix, e.g., header_superu.php and footer_superu.php.
a) From your new theme (see below), make sure you point to the correct header & footer files in the include, i.e.,
include("includes/header_superu.php");
include("includes/footer_superu.php");
b) You can also have different headers for different guides. Say you have a music library at Super U. You can create another file to match your music library website's look and feel, say header_supermusic.php and footer_supermusic.php. Then, in the admin, go to Admin > Site Config and add the suffixes to this field:
In this case, we have three headers available: um, chc, and default. (Default is the plain theme that comes with SP4; the other two are custom for the University of Miami.) Now, if you go to a guide metadata page, you will see these options:
Now your guide creators can switch between available themes easily.
Version 5 will have more robust theming, but for version 4.x you should:
- Go to subjects/themes and add a new folder for your theme, e.g., "myuni"
- Decide which files you want to theme from the /subjects/ folder and copy that into the new theme folder you created. Customize this copy of the file.
- Go to Admin > Config site and put the name of your new folder in the "Use a Theme" box
- In the original file (i.e., the one directly in subjects/) you will see something like this around line 19:
// If you have a theme set, but DON'T want to use it for this page, comment out the next line if (isset($subjects_theme) && $subjects_theme != "") { include("themes/$subjects_theme/databases.php"); exit;}
- Follow the instructions in that note--i.e., leave the line uncommented if you want to use the theme
We noticed that some SP sites were using one of their guides as the splash page for their SubjectsPlus site, so we tried to make this easier to do. The steps are as follows:
- Create a guide and lay it out with the content you want to appear on your splash page. We have created some Box/Pluslet_Types#Layout_Boxes to make this easier
- Go to Admin > Config Site
- Put in the short form of your splash guide into the appropriate box:
Hit save, and you should be good to go.