cchost
[ class tree: cchost ] [ index: cchost ] [ all elements ]
Prev
Basics
Next
Using the ccHost Query/Formatting Engine
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

  1. There is only one menu per page. If you want a 'submenu' then create a page of links. See Create New Pages
  2. Every menu item belongs to a 'Group' (a.k.a. Heading).
  3. Admins can rename and reorganize groups.
  4. Admins can rename, reorganize, hide, restrict and re-assign menu items to different groups
  5. Admin can not add menu groups.
  6. 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.)
  7. 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.
  8. the author
  9. 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

  1. Go to Manage Site/Menus
  2. Under Menu Text edit the text users will see.
  3. 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.
  4. Click Submit Menu Changes.

Restrict a Menu Item From Users

  1. Go to Manage Site/Menus
  2. 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.
  3. 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

  1. Go to Manage Site/Menus
  2. Under Access select Hide from the drop down options next to the item you wish to hide.
  3. 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

  1. Go to Manage Site/Menus
  2. 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.
  3. Click Submit Menu Changes.

Adding Menu Groups

You can not add groups through the administrators screens.


Move a Menu Item to Another Group

  1. Go to Manage Site/Menus
  2. Under Group select the group you wish from the drop down options next to the item you wish to move.
  3. Click Submit Menu Changes.

Change a Menu Group Heading

  1. Go to Manage Site/Menu Groups
  2. Under Group Name edit the text of the group you wish to rename.
  3. Click Submit Group Changes.

Reorder Menu Groups

  1. Go to Manage Site/Menu Groups
  2. 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.
  3. 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

    1. Browse to admin/menu/additems/1 That's the number one ('1') at the end. (didn't work??)
    2. That should put you into the menu editor with a new menu item that has text like Extra Item 1662444290.
    3. Under Menu Text replace the 'Extra Item...' text with Forums.
    4. Under Groups select 'Visitors'
    5. Under Weight enter the number 100. This will put it at or near the bottom of the Visitors group.
    6. 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.
    7. Under Access select 'Everyone'
    8. 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

    1. Every page in ccHost has a Navigator Tab Set that it uses by default.
    2. Admins can create as many tabs sets as they want.
    3. Admins can make any tab set the default.
    4. Every tab set has a unique name that the admin assigns when creating it.
    5. To access a specific tab set you use the view/{tab_set_name}.
    6. Every tab (in every tab set) has a name assigned to it by the admins when creating the tabs.
    7. To access a specific tab you use form of the view/{tab_set_name}/{tab_name}.
    8. Every tab set has a default tab (the first one) which is displayed if not specific tab is in the command.
    9. A tab in a set can be wired to produce a 'sub-tab set' which sits below the main tab set.
    10. You access specific sub-tabs via view/{tab_set_name}/{tab_name}/{sub_tab}

    Deleting a Tab

    1. Go to Manage Site/Navigator Tab Sets
    2. Select [Edit tabs]
    3. Under Delete check to box next to the line that represents the tab you want deleted.
    4. Click Submit

    Add a New Tab

    1. Go to Manage Site/Navigator Tab Sets
    2. Select [Edit tabs]
    3. 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).
    4. 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.
    5. Click Submit

    Change What a Tab Says and Does

    1. Go to Manage Site/Navigator Tab Sets
    2. Select [Edit tabs]
    3. 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.)
    4. 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 TagsA comma separated list of tags. Displays a listing of uploads that have any of the tags specified.
      Match All TagsA comma separated list of tags. Displays a listing of uploads that have all of the tags specified.
      Execute URLA command or URL to execute.
      SubtabsThe name of a sub-navigation tab set that will appear on the screen under the current tab set.
      QueryAccepts a query string. Learn more about queries (you'll be glad you did) and Tutorial: Gallery View
    5. Click Submit

    Reorder Tabs

    1. Go to Manage Site/Navigator Tab Sets
    2. Select [Edit tabs]
    3. Under Order use the numbers in the drop down selection boxes to set the new order.
    4. Click Submit

    Hide Tabs From Users

    1. Go to Manage Site/Navigator Tab Sets
    2. Select [Edit tabs]
    3. 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.
    4. 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

    1. Go to Manage Site/Navigator Tab Sets
    2. Select [Add new tab set]
    3. Select [Rename] next to the new set.
    4. 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:

    1. Create a tab set that will be used as the secondary sub-tab set set it up the way you want.
    2. Add a new tab to the default (top most) tab set.
    3. Under Function select Subtab
    4. 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

    1. Go to Manage Site/Titles and Footers
    2. Edit the banner-html and footer fields
    3. 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.

    1. Go to Manage Site/Manage files/Add Files
    2. Upload your logo using this form to your files directory (Make sure you've read Before You Do Anything Else)
    3. Go to Manage Site/Titles and Footers
    4. 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>
    5. 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

    1. Go to Manage Site/Submit Forms.
    2. Click on Add a new form type...
    3. Click Enable so users can see your new submit type.
    4. 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.
    5. The Caption is used for both the title of and the link that invokes the actual submit form:

    6. The Description is where you can get explicit about the type of submission the form should be used for.
    7. 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)

    8. 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:

    9. 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.
    10. The Form Help Message will display above the final upload form:

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

    12. 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.

    1. Go to Manage Site/Submit Forms.
    2. Click on [ Edit ] next to the type of submit form you wish to disable.
    3. Uncheck Enable
    4. 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

    1. Go to Manage Site/Sidebar Content
    2. Put a checkbox next to the content blocks you want to enable, uncheck the ones that you wish to hide.
    3. Click Submit

    Adding Custom Sidebar Content

    In this example we'll add a simple list of links as an sidebar block.

    1. Open the file skins/sidebar.xml in a text editor.
    2. Look for the first occurrence of </tal:block> (around line #23)
    3. 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>
    4. 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.

    Prev Up Next
    Basics ccHost Administrators Guide Using the ccHost Query/Formatting Engine

    Documentation generated on Sat, 17 Nov 2007 01:03:00 +0000 by phpDocumentor 1.3.0RC4