Customizing User Interface
Customizing User Interface
This documenation refers to ccHost 4.5. There are serious changes coming in 5.0
Make sure to keep tabs at the ccHost Wiki
Table of Contents
Menus and Menu Groups
10 Things You Should Know About Menus
- There is only one menu per page. If you want a 'submenu' then create
a page of links. See Create New Pages
- Every menu item belongs to a 'Group' (a.k.a. Heading).
- Admins can rename and reorganize groups.
- Admins can rename, reorganize, hide, restrict and re-assign menu items to different
groups
- Admin can not add menu groups.
- Admins can add menus item using
the admin/menu/additems/{num_items} command where
num_items is
the number of items to add. (In 3.0 a link to this command is in the menu editor.)
- When none of the items in a group are visible to the current user, either because
they don't have access or the item is hidden, then the group heading will not display.
- the author
- is a big liar...
Add a Menu Item
Admins can add menus item using
the admin/menu/additems/{num_items} command where num_items is
the number of items to add. (In 3.0 a link to this command is in the menu editor.)
Delete a Menu Item
There is no way to delete a menu item but you can
hide items so that no one
will ever see them.
Change What a Menu Item Says and Does
- Go to Manage Site/Menus
- Under Menu Text edit the text users will see.
- Under Action enter the ccHost command or
URL that should happen when the item is clicked. See more about
commands and URLs in the section
Understanding ccHost URLs.
- Click Submit Menu Changes.
Restrict a Menu Item From Users
- Go to Manage Site/Menus
- Under Access select the group of users you wish
to have access from the drop
down options next to the item you wish to restrict.
- Click Submit Menu Changes.
Restricting access to menu items is not the same as restricting functionality!
Read more about that in the section Super Admins
Hide a Menu Item From All Users
- Go to Manage Site/Menus
- Under Access select Hide from the drop
down options next to the item you wish to hide.
- Click Submit Menu Changes.
Restricting access to menu items is not the same as restricting functionality!
Read more about that in the section Super Admins
Reorder Menu Items Within a Group
- Go to Manage Site/Menus
- Under Weight edit a number next to each
item in the group you wish to reposition. It's like a ranking:
the number 1 is at the top.
- Click Submit Menu Changes.
Adding Menu Groups
You can not add groups through the administrators screens.
Move a Menu Item to Another Group
- Go to Manage Site/Menus
- Under Group select the group you wish from the drop
down options next to the item you wish to move.
- Click Submit Menu Changes.
Change a Menu Group Heading
- Go to Manage Site/Menu Groups
- Under Group Name edit the text of the group
you wish to rename.
- Click Submit Group Changes.
Reorder Menu Groups
- Go to Manage Site/Menu Groups
- Under Weight edit a number next to each
group that represents their position. It's like a ranking:
the number 1 is at the top.
- Click Submit Group Changes.
Hide a Whole Menu Groups From Users
Groups are hidden automatically by the system when no menu items
apply to the current users.
The following conditions will lead to a group being hidden:
There are no menu items in the group.
All the items in the group are marked as hidden (See Hide a Menu Item From All Users)
The user does not have proper access rights to any of the menu items. (See Restrict a Menu Item From Users)
Some combination of the last two items.
Example: Hook Up Forums Menu Item
- Browse to admin/menu/additems/1 That's the number one ('1') at the end. (didn't work??)
- That should put you into the menu editor with a new menu item that has text like
Extra Item 1662444290.
- Under Menu Text replace the 'Extra Item...' text with
Forums.
- Under Groups select 'Visitors'
- Under Weight enter the number 100. This will put it at or near the bottom
of the Visitors group.
- Under Action simply put forums. ccHost will recognize that as
an internal command to display the main forum index. See Reference: Commands for
all available commands.
- Under Access select 'Everyone'
- Click Submit.
If you don't see your changes right away, click on the banner to take you to your home page. If you still don't see your new menu item under 'Visitors' group then something did not go
right.
Navigator Tab Sets
10 Things You Should Know About Tab Sets
- Every page in ccHost has a Navigator Tab Set that it uses by default.
- Admins can create as many tabs sets as they want.
- Admins can make any tab set the default.
- Every tab set has a unique name that the admin assigns when creating it.
- To access a specific tab set you use the view/{tab_set_name}.
- Every tab (in every tab set) has a name assigned to it by the admins when creating the tabs.
- To access a specific tab you use form of the view/{tab_set_name}/{tab_name}.
- Every tab set has a default tab (the first one) which is displayed if not specific tab is in the command.
- A tab in a set can be wired to produce a 'sub-tab set' which sits below the main tab set.
- You access specific sub-tabs via view/{tab_set_name}/{tab_name}/{sub_tab}
Deleting a Tab
- Go to Manage Site/Navigator Tab Sets
- Select [Edit tabs]
- Under Delete check to box next to the line that represents
the tab you want deleted.
- Click Submit
Add a New Tab
- Go to Manage Site/Navigator Tab Sets
- Select [Edit tabs]
- Click on the link that says "Click here to add a tab..." This will
add a new tab to the list (you may have to scroll down to see it).
- Edit the various fields for the new tab to look and act the way
you want it. See Change What a Tab Says and Does.
- Click Submit
Change What a Tab Says and Does
- Go to Manage Site/Navigator Tab Sets
- Select [Edit tabs]
- Under Text enter the new text for the
tab you want to change. (The Help Hint text
is what shows up when a user hovers the mouse over an
unselected tab, it should provide more information about what will happen
when the user clicks on the tab.)
The Function and Data fields work together to determine what happens when the tab is selected.
| If 'Function' is set to...: | Then 'Data' should be... |
| Match Any Tags | A comma separated list of tags. Displays a listing of uploads that have any of the tags specified. |
| Match All Tags | A comma separated list of tags. Displays a listing of uploads that have all of the tags specified. |
| Execute URL | A command or URL to execute. |
| Subtabs | The name of a sub-navigation tab set that will appear on the screen under the current tab set. |
| Query | Accepts a query string. Learn more about queries (you'll be glad you did) and Tutorial: Gallery View |
- Click Submit
Reorder Tabs
- Go to Manage Site/Navigator Tab Sets
- Select [Edit tabs]
- Under Order use the numbers in the drop down
selection boxes to set the new order.
- Click Submit
Hide Tabs From Users
- Go to Manage Site/Navigator Tab Sets
- Select [Edit tabs]
- Under Access select the restriction you want to apply to the
individual tabs. You can essentially 'hide' a tab by restricting it's visibility
to administrators only.
- Click Submit
Contests
are a special case that hide certain tabs if they are not relevant, so even if you
say the 'Submit Entry' tab is available to 'Everyone', it will be hidden if the contest
date has ended.
Restricting access to tabs is not the same as restricting functionality!
Read more about that in the section Super Admins
Creating a New Tab Set
- Go to Manage Site/Navigator Tab Sets
- Select [Add new tab set]
- Select [Rename] next to the new set.
- Enter a short but meaningful name. (e.g. 'extras') and click Submit
Hooking up Sub-Tab Sets
A 'sub-tab' is a set of secondary navigator tabs that are embedded into the page, typically
below the header. You see an example of that at ccMixter.
There are two tab sets involved in this process: The main tab-set
is the one that has a tab we will use to trigger the sub tab set. In the
ccMixter example we link to above, the main tab set is called 'media' and sits in the header.
It has a tab called 'Samples' which you can access via /view/media/samples. When you browse there (e.g. click on the 'Samples' tab in the main set) you can see the samples
sub-tab. You browse into a specific sub-tab by adding it's name to the URL:
/view/media/samples/browse which is what happens when you
click on the 'Browse' sub-tab.
Follow these steps to create and hook up a sub-tab set:
- Create a tab set that will be used as
the secondary sub-tab set set it up the way you want.
- Add a new tab to the default (top most)
tab set.
- Under Function select Subtab
- For Data enter the sub-tab set's name. Now it's important
to match the name exactly with the name you used in Step 1. above.
Changing the Banner and Footer
- Go to Manage Site/Titles and Footers
- Edit the banner-html and footer fields
- Click Submit Changes
If you do not see your changes right away, click on the banner to take you to your home page.
Editing the root-url field in this form is available only for the case
where you change the directory structure of you web server or other rare and advanced
cases. Change it to the wrong value and it will be very difficult to recover.
Hack: Add a Logo to Your Banner
The default skin (skin-simple) is a little finicky and
requires a little nudging sometimes. Adding a logo to the banner could get
tricky if you don't know your way around. If the method in this tutorial isn't working
for you, that is, you are not getting the exact results you would like, you
should consider using the methods spelled out in the Tutorial: Create a New Skin
Section
which part of a larger, more work intensive tutorial in which you create your skin.
Meanwhile, this method requires so little actual work it's definitely worth
a try, however:
Before jumping into this tutorial you save your configuration in case something goes wrong.
- Go to Manage Site/Manage files/Add Files
- Upload your logo using this form to your files directory (Make sure you've read Before You Do Anything Else)
- Go to Manage Site/Titles and Footers
- In the banner-html field paste in HTML:
<span style="white-space:nowrap">
<img style="float:right"
src="http://path_to_your_install/myfiles/mylogo.gif" />
My ccHost!
</span>
- Click Submit Changes
If you do not see your changes right away, click on the banner to take you to your home page.
Make sure the URL in the src attribute of the img tag is a fully
qualified URL to the logo file.
If your banner text does not appear, or your logo bumps into the navigator tabs, or your logo is too far over to the left then add a style tag after everything else:
<span style="white-space:nowrap">
<img style="float:right"
src="http://path_to_your_install/myfiles/mylogo.gif" />
My ccHost!
</span>
<style>
#cc_header h1 a {
width: 400px;
}
</style>
Adjust the number 400px until you are satisfied with the results.
If you would like the logo on the left then use float:left instead of
float:right
In that case, there is a very good chance that the site description will no longer be
visible or obstructed. If that's the case add the following snippet:
<span style="white-space:nowrap">
<img style="float:left"
src="http://path_to_your_install/myfiles/mylogo.gif" />
My ccHost!
</span>
<style>
#cc_header h1 a {
width: 400px;
}
#cc_header p {
padding-left: 80px;
}
</style>
Adjust the number 80px until you are satisfied with the results.
Submit Forms
Create New Submit Form Type
- Go to Manage Site/Submit Forms.
- Click on Add a new form type...
- Click Enable so users can see your new submit type.
- The Label for a submit form type is strictly for admins
to identify the form type. Enter something that you will easily
recognize when managing these forms.
- The Caption is used for both the title of
and the link that invokes the actual submit form:

- The Description is where you can get explicit about
the type of submission the form should be used for.
- The Tags you specify here will be automatically
attached to all uploads that use this form. These tags will not
be editable by users and are therefore considered system tags.
You can rely on these tags when doing filtering in
Navigator Tabs)
- Entering Suggested Tags will give uploaders a hint
as to what kind of tags should or could be used while submitting their
files. Those suggested tags will appear on the final submit form like this:

- Position determines where, in relation to other
submit form types, this form type will display on the main submit
forms screen. It's like a ranking, 1 is highest.
- The Form Help Message will display above the
final upload form:

- If you check Enable Remix Search then the final
submit will display the 'I Used Samples' search form:

- Click Submit to commit your changes.
'Media Type Allows' is not currently enabled and no effect. Go to
Manage Site/File Formats to pick which types
of files are allowed for upload.
Delete/Disable Submit Form Type
You can not physically disable a submit type but if you follow
these steps the type will hidden from all users.
- Go to Manage Site/Submit Forms.
- Click on [ Edit ] next to the type of
submit form you wish to disable.
- Uncheck Enable
- Click Submit
Sidebar Content
The 'sidebar content' are the things that sit right below the menu and
even and look just like menu groups and items -- but they are not.
They are actually tiny snippets of template code that
can be anything from a static list of commands and links (just a menu group)
or generated dynamically each time a page is rendered (e.g. 'New Uploads')
ccHost ships with several content blocks available for enabling
and with a little cutting and pasting admins can create their own blocks.
Enabling/Disabling Sidebar Content
- Go to Manage Site/Sidebar Content
- Put a checkbox next to the content blocks you want to enable,
uncheck the ones that you wish to hide.
- Click Submit
Adding Custom Sidebar Content
In this example we'll add a simple list of links as an
sidebar block.
- Open the file skins/sidebar.xml in a text editor.
- Look for the first occurrence of
</tal:block> (around
line #23)
- Put the following text after that line:
<metal:block define-macro="My_Group">
<p>My Group</p>
<ul>
<!-- Internal ccHost commands -->
<li><a href="${home-url}forums">Forums</a></li>
<li><a href="${home-url}howididit/browse">Browse HIDI</a></li>
<!-- External links work great too -->
<li><a href="http://openclipart.org">OCA Buddys</a></li>
</ul>
</metal:block>
- To enable your new sidebar content see Enabling/Disabling Sidebar Content.
There are a couple pieces of 'magic' that make the above work:
The define-macro attribute is what is used in the Sidebar Content
administrator's form. You must use only alpha-numeric characters and the
underscore ('_'), no spaces!
Any define-macro attributes that start with an underscore ('_')
will be ignored by ccHost, including in the Sidebar Content
administrator's form.
All text within a <p> tag is assumed to be a group name for display.
All text with a <li> tag is assumed to be a menu item.
See XHTML in ccHost if you would like to do anything more complicated.
Changing Color Schemes
Changing color schemes and other more advanced user interface
topics are covered in the section Tutorial: Create a New Skin.