Cchost/admin/config customize
Docs Home | Install | Upgrade | Troubleshoot | Customize | Admins | Devs | Content | Query | Templates | Commands | Skins |
This page describes some of the customizations that can be done in your ccHost installation that involve pre-defines options sets. There are also sections that describe how to create your own versions of these that will requite a plain text editor and write permissions to your <local_files> area of the installation.
Strings
About Strings
You probably want to change the strings (a.k.a. text, labels, phrases, prompts, etc.) throughout the ccHost system. Every string that your users will see is in fact editable, which means you can easily change them, although it depends what part of the system that string comes from as to how you edit it. (As of 5.0.1 the strings for the administrator's screens are not editable. This will be addressed in future version of ccHost.)
Strings that come from the configuration are editable directly through the Manage Site menu. These include:
- Page header and footer: click on Manage Site, then Edit Banners and Footers then Edit Template Tags (or browse to admin/templatetags)
- Menus: click on Manage Site, then Menu (admin/menu) to edit individual items or Menu Groups (admin/menugroups) to edit the name of a group of items.
- Navigation tabs: click on Manage Site, then Navigator Tab Sets
String in forms, page titles and prompts
The strings that are used in forms, page titles, prompts and other miscellaneous places are together called a String Profile.
Selecting a String Profile
ccHost comes with several pre-defined String Profiles that you can select for your installation.
- Log in as admin (if not already)
- Click on Manage Site, then Skin, then Basic Settings (or browse to 'admin/skin/settings)
- Select from the 'String Profile' drop down
Creating a String Profile
This section covers how to do 'straight' string substitution for forms, headings or prompts. That means a simple replace of text: every time you see 'foo' you want to replace it 'bar.' If you want to do more elaborate, dynamic substitutions that will require some real PHP programming.
Place the following file into <local_files>/skins/strings/my_string_set.php
<? /* [meta] type = string_profile desc = _('My Custom String Set') [/meta] */ include('ccskins/shared/strings/all_media.php'); /* Your custom strings go below here */ /* Your custom strings go above here */ ?>
The strings in the system are all mapped to a key that starts with the str_ prefix. If you search through the strings in ccskins/shared/strings/all_media.php and find the string you want to replace, simply copy that line to your string set file and replace the text to the right of the equal sign (=).
Let's say you want you want to replace every occurrence of the word artist with the word teacher. You would search for all instances of the word artist in ccskins/shared/strings/all_media.php to find these:
$GLOBALS['str_artist'] = _('Artist'); $GLOBALS['str_artists'] = _('Artists'); $GLOBALS['str_contact_artist'] = _('contact this artist'); $GLOBALS['str_feat_list_any_collob'] = _('List any colloborating artists); $GLOBALS['str_filter_artist'] = _('Artist'); $GLOBALS['str_hidi_author'] = _('Artist'); $GLOBALS['str_remix_artist'] = _('Artist'); $GLOBALS['str_pool_filter'] = _('Sample pool artists'); $GLOBALS['str_stats_artist'] = _('Aritst');
You would copy all of those and put those into your string set file and then edit occurrences of artist on the right side of the equal sign and replace those. So your file would end up looking like:
<? /* [meta] type = string_profile desc = _('My Custom String Set') [/meta] */ include('ccskins/shared/strings/all_media.php'); /* Your custom strings go below here */ $GLOBALS['str_artist'] = _('Teacher'); $GLOBALS['str_artists'] = _('Teachers'); $GLOBALS['str_contact_artist'] = _('contact this teacher'); $GLOBALS['str_feat_list_any_collob'] = _('List any colloborating teachers'); $GLOBALS['str_filter_artist'] = _('Teacher'); $GLOBALS['str_hidi_author'] = _('Teacher'); $GLOBALS['str_remix_artist'] = _('Teacher'); $GLOBALS['str_pool_filter'] = _('Sample pool teachers'); $GLOBALS['str_stats_artist'] = _('Teacher'); /* Your custom strings go above here */ ?>
Again, note that the artist on the left side of the equal sign still say artist - this is correct.
As a final step, in your ccHost installation browser to <your_installation_root>/admin/skins/settings and under String Profile select My Custom String Set.
Colors
Selecting a color scheme
- Log in as admin (if you not already)
- Click on Manage Site, then Skin, then Colors, Font, Text Size (or browse to admin/colors)
- Select from the choices in Color Schemes
Creating a new color scheme
You can create a custom color set by following these instructions.
- Copy ccskins/shared/colors/color_mono.php to <local_files>/skins/colors/my_colors.php
- Open your copy in a text editor and replace the text near the top in the 'desc' field (Monochrome) with 'My Color Scheme'
- Edit all the six digit hash numbers (e.g. #FF00EE) and replace them with the colors that you prefer to see and save the file
- In your browser, browse to <your_installation_root>/admin/colors and select 'My Color Scheme'
You should see the differences the next time you refresh your browser. (You may have to clear your browser's cache to get the full effect.)
Fonts
Selecting font styles
- Log in as admin (if you not already)
- Click on Manage Site, then Skin, then Colors, Font, Text Size (or browse to admin/colors)
- Select from the choices in Fonts and Font Size
Creating font schemes
You can create a custom font family and size sets by following these instructions.
For example if you wanted to make the font Baskerville available to admin put the following file:
<?/* [meta] type = font desc = _('Baskerville, Arial, Helvetica') [/meta] */?> <style type="text/css"> body, td, input, select, ul, h1, h2, h3, h4, p { font-family: "Baskerville", Arial, Helvetica, sans-serif; } </style>
in <local_files>/skins/colors/font_baskerville.php
Some designers like to specify '100%' as a font size. In that case put:
<?/* [meta] type = fontsize desc = _('100%') [/meta] */?> <style type="text/css"> body, td, input, select, ul, p { font-size: 100%; } </style>
in <local_files>/skins/colors/font_pc100.php
You should see the differences after you select these in admin/colors and the next time you refresh your browser. (You may have to clear your browser's cache to get the full effect.)
Sidebar extras
Organzing Your Sidebar Extras
You can organize your sidebar extras (a.k.a. widgets) by deciding which ones and it what order they appear.
- Log in as admin (if not already)
- Click on Manage Site then Sidebar Extras (or browse to admin/extras
- Your current Extras area is should now be highlighted.
- To add items, drag new items from the middle of the screen to the Extras area
- To remove items, drag items out of the Extras area
- To re-order items, drag items within the Extras
- Click on the Save button
You can control where your Extras area is in relation to your menus and content area by selecting a different page layout.
Creating your own Sidebar Extras
You can create your own sidebar extras (a.k.a. widgets) with a few lines of HTML code. They can even be dynamic with a little query API knowledge.
Your ccHost 5 installation has already put an example of one of these into <local_files>/skins/extras/extras_links.tpl. To create more of your own extras and enable them follow these instructions:
- Copy <local_files>/skins/extras/extras_links.tpl to another file in that same directory like my_other_extra.tpl
- Change the text in the desc at the top to something like: _('My other extra')
- Replace the contents of the unordered list (<ul> tag) with your custom content
- Browse to <your_installation_root>/admin/extras and drag the box that says 'My other extra' to the sidebar extras area
For some examples of what's possible check out the files in ccskins/shared/extras.
Page Layout
Picking a layout
There are three layout areas of a ccHost skin:
- Content area
- Menus
- Sidebar extras
You can control how these areas are laid out on every page of your installation by choosing from one of more than 40 different schemes:
- Log in as admin (if not already)
- Click on Manage Site, then Skin, then Layouts (or browse to admin/skins/layouts)
- Select your preferred layout from the the Page Layout list.
Note while editing that the orange block represent the Extras area, the blue block represents menus.
Creating a custom layout
If none of the 40 pre-defined layouts are exactly what you're looking for and you are comfortable with CSS block management then here are the steps to creating your own layout that you can create:
- Identify the layout that closest matches your needs from the ccskins/shared/layouts directory.
- Copy that file to <local_files>/skins/layouts/my_custom_layout.css
- Open that file in a text editor
- If you have a thumbnail representation of the layout:
- Put that file into <local_files>/skins/layouts/images/my_custom_layout.gif
- Edit the image line at the top of the layout file to refer to your thumbnail
- If you do not have a thumbnail image, then remove the image line completely
- Change the desc line to some like _('My Custom Layout')
Follow the instructions in Picking a layout and select your new layout.