Data Manager
Contentor has a rudimentary data manager included for occasional minor database maintenance tasks. In order to access the data manager, you must be loged in as an administrator. The data manager should be used very carefully, as the entire web site can be disabled through incorrect use.
There is a link to the data manager in the upper right corner of the edit mode screen.
When you first enter the data manager, a list of the tables in the data base are shown. Contentor normally uses three tables whose names are determined in the system configuration. The default names are 'contents', 'setup' and 'count'. In version .955 and later, three additional tables are used: 'pages', 'members', and 'mime'.
Selecting a table from the will bring up a display of all the records in that table, with edit and delete links for each record. Note that for very large sites, this may create a very large page listing the "contents" table. A more sophisticated data base editor is suggested for directly editing the contents table on very large sites.
The name of each field in the table is shown on the top row as a link to sort by that field.
Contents table
The contents table holds each section of each page as a separate record, and has the following fields:
- row - a internally-assigned serial number (no edit)
- page_title - Page title as entered on the edit screen (Moved to "pages" table in v 0.955)
- dir - the name of the page (this page is /help/data_manager )
- menu_order - sub menu order as entered on the edit screen
- section_num - Section number as entered on the edit screen
- section_opt - contain 'r' for a side bar, 'i' for an imported item
- section_header - Section header as entered on the edit screen
- section_text - the main section contents
- date - the start date for dispalying this section
- event - the event date
- expire - the expiration date for displaying this section and/or the end of event date
Pages table
The "pages" table holds information about each individual pages, regardless of how many sections are contained on the page. This table also holds any optional additional data fields as specified in the setup table "edit_header" entry and listed in the hidden "fieldlist" variable in that entry.
The standard installtion fields are:- id - a sequential serial number
- dir - the page name - matches the "contents" table "dir"
- page_title - the page title, moved from the contents table on upgrade.
- last_visit - Date/Time of last page view
- page_views - number of time page has been viewed
- last_edit - Date/Time of last time page was saved
- last_edit_by - the ID of the person logged in on last edit
- keywords - an optional added field
- description - an optional added field
Setup table
The setup table holds the main menu entries, the editor passwords and the layout of the edit screens. Other information may be held in this table for additional modules. This is a simple table with self-documenting comments in each record.
Count table
The count table can be used to see the all of the page names along with the last viewed data, the total number of views, and the last edit date. Note that here too, the page name is held in a field named 'dir'.
This table has been renamed to the "pages" tale and given an expanded role in version 0.955 and later. The page title is now stored in this table, and the site administrator can add fields to this table for display on the named page.
Editing data
By clicking on the 'edit' link at the left of the data record, the contents of that record are shown in a generic editing form. To save the information back into the same record (thus overwriting the old data) use the 'update' button. To save the information in a new added record, erase the contents of the first field (row or id) and then click the 'insert' button.
Backup Database
The data manager menu has an option to backup the database. Clicking this link will display the entire data base formatted as SQL queries (commands to instruct the database program). By saving this page to your local disk, a copy of the database can be kept for archive/backup purposes. Note that this file will contain the editor passwords (encrypted in v 0.995 and later), and therefore should be safegaurded.