class conf files

For every Objekt or MultiInput class you write, you need to create a simple conf file and put in the /confs folder.

Each network folder or site may override this with its own version.

typically:


return array(
"class" => "yak",
"classname" => "Yak",
"table" => "objekt_objekt",
"plural" => "Yaks",
"canNew" => ISUSER,
"canList" => ISEDITOR,
"adminConsole" => "posts"
);


note that it returns an array

class : lowercase classname (lowercase because php get_class returns lowercase, so to quickly match its best to keep all classnames lowercase)

classname: the human readable classname. each site may have its own silly name to refer to the post type.

table : the database table (objekt_objekt or other if its a MultiInput)

plural: the human readable plural form

canNew: a boolean or expression stating if the current user is allowed to create a new one of these

canList: should lists of these objects be shown ? usually this just enforces security: only ADMINS or EDITORS may browse lists of these. in some cases it is false always (browse classes, of which there aren't any instances anyway to list). or true always (most post types are allowed to be listed)

adminConsole: which admin console, if any, it should be shown on in allClasses.php


less typically

Some classes may use the conf files for more features. For instance

sites.conf allows you to specify which class types can reasononably be put as the front page. This makes the dropdown menu sane and short.

//your site should define more:
// any class that could be used as the front page of the site
"FrontPageClasses" => array('wikipage')

autousernews specifies the sections that it is allowed to be inserted into on that site.