Cchost/concepts/Commands

From Creative Commons
Jump to: navigation, search


Docs Home Install Upgrade Troubleshoot Customize Admins Devs Content Query Templates Commands Skins
  • This page refers to features only available on ccHost 5.1

ccHost is About Commands

Get used to the idea that ccHost is a command based system. Command are the done via URLs. They are the things you put into menus and navigation tabs when you are asked for 'command' or 'action' or 'URL'.

Commands are appended to the base URL after the virtual root.

http://ccmixter.org/media/people

 HINT:  Substitute your installation base URL for 'ccmixter.org' in these examples.

Pretty URLs

If you are using non-pretty-URLs then that command would like like:

http://ccmixter.org?ccm=/media/people

For purposes of brevity in this documentation we tend to assume 'pretty-URLs' (the same URL without the ?ccm=) are enabled in your system.

Stripping the Virtual Root

As of ccHost 5.0 you can leave off the default virtual root (media).

If the virtual root is media and the command is people that will display the latest users (with uploads). If the virtual root is left off, 'media' is assumed. So the same command can be stated:

http://ccmixter.org/people

Command in This Documentation

In this documentation there are many places where you are told to browse to some location and given a partial path, for example, admin/paths.

This is the command (and parameters if applicable) that you append to your installation root.

 http://your_installation_root?ccm=/admin/paths   Pretty URLs turned OFF

or

 http://your_installation_root/admin/paths  For pretty URLs turned ON

If the location in the documentation includes a '?' like:

 api/query?tags=remix

then you need to convert that to an ampersand '&' if you have pretty URLs turned OFF because your URL already has a '?':

 http://your_installation_root?ccm=/api/query&tags=remix   Pretty URLs turned OFF

Arguments

Most command have parameters that are appended to the URL. For example people/antonov

command is still 'people', parameter is 'antonov' which displays anotov's user profile

Command Reference

Browse to the following commands for various dumps:

  • commands - all documented commands
  • commands/public - commands available to users not logged in
  • commands/user - commands available to users logged in
  • commands/0 - all commands, including undocumented