DocConfiguration in 'raw' format
{{TableOfContents}} Several aspects of a tbwiki are configurable. An instance of a tbwiki is configured by setting several variables in the .cgi file that is first accessed by the web server when executing a page on the wiki. Here is a description of the variables in the CGI script, and how they are used: = Core locations and URL prefixes = * '''config.tbwiki_dir''' = absolute path to directory where the tbwiki_engine.py script is. * This is used for the 'git_commit' and 'git_describe' data variables * This directory should never be exposed (via the wiki or the web server) to direct external access. * '''config.data_dir''' = absolute path to the location of the data files for the wiki * This is where all the data files for a wiki instance live * This directory should have the following sub-directories: * '''pages''' - were the actual wiki pages (in tbwiki markup) are stored * '''admin''' - where user account files are stored * '''backup''' - where page backup files are stored * '''files''' - where non-page files are stored * The log for the wiki is in this directory * The test wiki has an extra directory called: * '''expected_output''' - where HTML is stored for each page of the wiki * this is used by the RegressionTest processor to validate page rendering by the tbwiki engine. * All files in this directory should be readable and writable by the web server running this wiki instance. * '''config.base_url''' = prefix used for URLS referencing page files in this wiki * '''config.files_dir''' = absolute path to the place where this wiki stores non-page files * This is used for uploaded files, and for images and links to non-page items * '''config.files_url_base''' = prefix used for URLs referencing non-page files = Title, theme and page decorations = * '''config.site_title''' = This is the title of the wiki instance * '''config.default_theme''' = this is the name of the theme used, by default, for this wiki. * the files 'header.<theme>' and 'footer.<theme>' are loaded to provide the start and end HTML when a wiki page is displayed. * Also the CSS file '<theme>.css' is loaded to provide the layout for the page. * '''config.base_css_url''' = prefix used for accessing CSS files for this wiki * The location this references is where theme CSS files are stored on the server * '''config.nav_list''' = list of page links to show in the navigation box (usually in the left-hand sidebar) * '''config.has_talk_pages''' = set to 1 if the wiki should support Talk: pages * This results in an extra tab in the top bar for the content area of the page, labeled "discussion". * When the "discussion" link is clicked, the "Talk" page is accessed for that page. ex: Talk:FrontPage = Security = * '''config.global_password''' = is a password that any user can use to access the site * if this is empty, a global password is not available to access the wiki * if present, this password can be used instead of a user's stored password. * This is provided to allow access to a wiki instance with a single shared password * Normally, users must log in with their own password to access the wiki, but this allows any user to use this password. * '''config.global_reader_mode''' = describes the access level required to read pages on the wiki * may have the following values * "all" - any user, logged in or not, may read the pages in the wiki * "user" - only logged in users may read pages in the wiki * "admin" - only a logged in user with administrator access may read pages in the wiki * '''config.global_writer_mode''' = describes the access level required to write pages or data on the wiki * may have the following values * "all" - any user, logged in or not, may write data to the wiki * "user" - only logged in users may write data in the wiki * "admin" - only a logged in user with administrator access may write data to the wiki * '''config.user_creation_allowed''' = set to 1 if the wiki allows new user accounts to be created