| t | | t | |
| <table align="right"><tr><td><div class="toc"> | | |
| Contents: | | |
| <ul> | | |
| <li><a href="#Core_locations_and_URL_prefixes">Core locations and URL prefixes</a></li> | | |
| <li><a href="#Title,_theme_and_page_decorations">Title, theme and page decorations</a></li> | | |
| <li><a href="#Security">Security</a></li> | | |
| <li><a href="#Debugging">Debugging</a></li> | | |
| </ul> | | |
| </div></td></tr></table> | | |
| Several aspects of a tbwiki are configurable. | | |
| <p> | | |
| 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. | | |
| <p> | | |
| Here is a description of the variables in the CGI script, and how they are used: | | |
| <p> | | |
| <h1><a name="Core_locations_and_URL_prefixes">Core locations and URL prefixes</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocConfiguration?action=edit§ion=Core_locations_and_URL_prefixes">edit section</a>]</font></span> | | |
| </h1> | | |
| <ul><li><b>config.tbwiki_dir</b> = absolute path to directory where the tbwiki_engine.py script is. | | |
| <ul><li>This is used for the 'git_commit' and 'git_describe' data variables | | |
| <li>This directory should never be exposed (via the wiki or the web server) to direct external access. | | |
| </ul><li><b>config.data_dir</b> = absolute path to the location of the data files for the wiki | | |
| <ul><li>This is where all the data files for a wiki instance live | | |
| <li>This directory should have the following sub-directories: | | |
| <ul><li><b>pages</b> - were the actual wiki pages (in tbwiki markup) are stored | | |
| <li><b>admin</b> - where user account files are stored | | |
| <li><b>backup</b> - where page backup files are stored | | |
| <li><b>files</b> - where non-page files are stored | | |
| <li>(optional) <b>expected_output</b> - where the 'correct' HTML output for the page markup for a page is located | | |
| <ul><li>this is used on the test wiki, for automated regression testing | | |
| </ul><li><b>cache</b> - where cached html for a page is stored | | |
| </ul><li>The log for the wiki is in this directory | | |
| <li>The test wiki has an extra directory called: | | |
| <ul><li><b>expected_output</b> - where HTML is stored for each page of the wiki | | |
| <ul><li>this is used by the RegressionTest processor to validate page rendering by the tbwiki engine. | | |
| </ul></ul><li>All files in this directory should be readable and writable by the web server running this wiki instance. | | |
| </ul><li><b>config.base_url</b> = prefix used for URLS referencing page files in this wiki | | |
| <li><b>config.files_dir</b> = absolute path to the place where this wiki stores non-page files | | |
| <ul><li>This is used for uploaded files, and for images and links to non-page items | | |
| </ul><li><b>config.files_url_base</b> = prefix used for URLs referencing non-page files | | |
| </ul> | | |
| <p> | | |
| <h1><a name="Title,_theme_and_page_decorations">Title, theme and page decorations</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocConfiguration?action=edit§ion=Title,_theme_and_page_decorations">edit section</a>]</font></span> | | |
| </h1> | | |
| <ul><li><b>config.site_title</b> = This is the title of the wiki instance | | |
| <li><b>config.default_theme</b> = this is the name of the theme used, by default, for this wiki. | | |
| <ul><li>the files 'header.<theme>' and 'footer.<theme>' are loaded to provide the start and end HTML when a wiki page is displayed. | | |
| <li>Also the CSS file '<theme>.css' is loaded to provide the layout for the page. | | |
| </ul><li><b>config.base_css_url</b> = prefix used for accessing CSS files for this wiki | | |
| <ul><li>The location this references is where theme CSS files are stored on the server | | |
| </ul><li><b>config.nav_list</b> = list of page links to show in the navigation box (usually in the left-hand sidebar) | | |
| <li><b>config.home_page</b> = name of the home page for a site. | | |
| <ul><li>This page will be presented if no page is specified in the URL for the wiki | | |
| </ul><li><b>config.has_talk_pages</b> = set to 1 if the wiki should support Talk: pages | | |
| <ul><li>This results in an extra tab in the top bar for the content area of the page, labeled "discussion". | | |
| <li>When the "discussion" link is clicked, the "Talk" page is accessed for that page. ex: Talk:FrontPage | | |
| </ul> | | |
| </ul> | | |
| <p> | | |
| <h1><a name="Security">Security</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocConfiguration?action=edit§ion=Security">edit section</a>]</font></span> | | |
| </h1> | | |
| <ul><li><b>config.global_password</b> = is a password that any user can use to access the site | | |
| <ul><li>if this is empty, a global password is not available to access the wiki | | |
| <li>if present, this password can be used instead of a user's stored password. | | |
| <li>This is provided to allow access to a wiki instance with a single shared password | | |
| <ul><li>Normally, users must log in with their own password to access the wiki, but this allows any user to use this password. | | |
| </ul></ul><li><b>config.global_reader_mode</b> = describes the access level required to read pages on the wiki | | |
| <ul><li>may have the following values | | |
| <ul><li>"all" - any user, logged in or not, may read the pages in the wiki | | |
| <li>"user" - only logged in users may read pages in the wiki | | |
| <li>"admin" - only a logged in user with administrator access may read pages in the wiki | | |
| </ul></ul><li><b>config.global_writer_mode</b> = describes the access level required to write pages or data on the wiki | | |
| <ul><li>may have the following values | | |
| <ul><li>"all" - any user, logged in or not, may write data to the wiki | | |
| <li>"user" - only logged in users may write data in the wiki | | |
| <li>"admin" - only a logged in user with administrator access may write data to the wiki | | |
| </ul></ul><li><b>config.user_creation_allowed</b> = set to 1 if the wiki allows new user accounts to be created | | |
| </ul> | | |
| <p> | | |
| <h1><a name="Debugging">Debugging</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocConfiguration?action=edit§ion=Debugging">edit section</a>]</font></span> | | |
| </h1> | | |
| <ul><li><b>config.do_debug</b> = True or False - If True, put debug data into the debug log, which is named "tbwiki-debug.log" and appears in the directory specificed by config.data_dir | | |
| </ul> | | |
| <p> | | |