Tables in Slash 2.0

The following is a listing of tables that make up the Slash schema. Some, or all of the data in a table is displayed, where feasible, to give a better idea of a table's purpose.

abusers

A log of people who try too many times to beat the post limit

accesslog

logs page views to the site, logging occurs on a delayed insert

authors

No longer exists - only listed here as a reference to the fact that authors are now users with the 'author' flag set.

blocks

Contains content that has been pulled from remote sites via portald, and other pieces of text to use. Contains the color block which is simply 8 colors comma separated which in turn is split in the code to produce site/section foreground and background colors.

code_param

a conglomeration of what was formerly other tables such as postmodes, commentmodes, sortcodes, threshcodes, statuscodes, displaycodes, isolatemodes, issuemodes, etc, to normalise the schema. These are just values used by different parts of the codes, namely key/value tables.

commentmodes

How comments appear.

 +-----------+-------------+-------------+
 | mode      | name        | description |
 +-----------+-------------+-------------+
 | flat      | Flat        |             |
 | nested    | Nested      |             |
 | thread    | Threaded    |             |
 | nocomment | No Comments |             |
 +-----------+-------------+-------------+

comments/newcomments

These are the actual comments of posters on Slash. These are unique by a sid and cid combination, sid being the fk to sid in stories.

dateformats

Key/value table of how dates are to be displayed for a user.

 +----+-------------------------+---------------------------------+
 | id | format                  | description                     |
 +----+-------------------------+---------------------------------+
 |  0 | %W %M %d, @%h:%i%p      | Sunday March 21, @10:00AM       |
 |  1 | %W %M %d, @%H:%i        | Sunday March 21, @23:00         |
 |  2 | %k:%i %d %M %Y          | 23:00 21 March 1999             |
 |  3 | %k:%i %W %d %M %Y       | 23:00 Sunday 21 March 1999      |
 |  4 | %h:%i %p -- %W %M %d %Y | 9:00 AM -- Sunday March 21 1999 |
 |  5 | %a %M %d, %k:%i         | Sun March 21, 23:00             |
 |  6 | %a %M %d, %h:%i %p      | Sun March 21, 10:00 AM          |
 |  7 | %m-%d-%y %k:%i          | 3-21-99 23:00                   |
 |  8 | %d-%m-%y %k:%i          | 21-3-99 23:00                   |
 |  9 | %m-%d-%y %h:%i %p       | 3-21-99 10:00 AM                |
 | 15 | %d/%m/%y %k:%i          | 21/03/99 23:00                  |
 | 10 | %h:%i %p  %M %D, %Y     | 10:00 AM  March 21st, 1999      |
 | 11 | %k:%i  %D %M, %Y        | 23:00  21st March, 1999         |
 | 12 | %a %b %d, '%y %h:%i %p  | Sun Mar 21, '99 10:00 AM        |
 | 13 | %h ish                  | 6 ish                           |
 | 14 | %y-%m-%d %k:%i          | 99-03-19 14:14                  |
 | 16 | %a %d %b %h:%i%p        | Sun 21 Mar 10:00AM              |
 +----+-------------------------+---------------------------------+

content_filters

This table contains as many filters as a site admin wants to filter different fields in user forms such as comment posting.

discussions

A table that basically allows discussions (comments on a particular subject) to be attached to an sid that might not necessarily be a story sid. This allows for a not-too-publicized functionality of going to the comments.pl script without any query string, getting a list of current discussions and posting a comment on a concocted sid and creating a new discussion.

 +---------------+-------------------+-------------+
 | sid           | title             | url        |
 +---------------+-------------------+-------------+
 | 00/0SPT/MhsFY | Test Discussion | http://slashdot.org/temp.html|
 | 00elQkla9rH/M | North Dakota has low admission standards |http://www.slashdot.org/articles/99/06/07/1234239.shtml |
 | trolltalk     | we are dweebs     | http://www.slashdot.org/articles/00/01/01/1234567.shtml |
 +---------------+-------------------+-------------+

formkeys

Used to issue unique formkeys to each and every form that the site admin wishes to prevent multiple submissions using the same form (so they don't just using the back button, changing a little text and resubmitting). This makes it inconvenient to troll the site, namely comment and submissions posting.

menus

Table of menu items, using the template library for it's value

metamodlog

Logs meta-moderations.

moderatorlog

When, why, who moderated something

pollanswers

A name of a poll subject, answer id (yes or no...), total number votes per question id.

 +----------+-----+---------+-------+
 | qid      | aid | answer  | votes |
 +----------+-----+---------+-------+
 | corel    |   1 | No      |   621 |
 | corel    |   0 | Yes     |  2711 |
 | bestdist |   0 | Caldera |    49 |
 +----------+-----+---------+-------+

pollquestions

The poll questions.

pollvoters

postmodes

 +-----------+-----------------------------+
 | code      | name                        |
 +-----------+-----------------------------+
 | plaintext | Plain Old Text              |
 | html      | HTML Formatted              |
 | exttrans  | Extrans (html tags to text) |
 +-----------+-----------------------------+

sections

The primary sections of Slash

 +-------------+----------+--------------------+-----------+---------+-------+--------+
 | section     | artcount | title              | qid       | isolate | issue | extras |
 +-------------+----------+--------------------+-----------+---------+-------+--------+
 | articles    |       30 | Articles           |           |       0 |     0 |      0 |
 | features    |       21 | Features           | eyesight  |       0 |     1 |      0 |
 | books       |       15 | Book Reviews       | crash     |       0 |     1 |      1 |
 | askslashdot |       30 | Ask Slashdot       |           |       0 |     1 |      0 |
 | tacohell    |       15 | Taco Hell          | favdistro |       1 |     1 |      0 |
 | slash       |       15 | Slash              | firstpost |       1 |     1 |      0 |
 |             |       30 | All Sections       |           |       0 |     0 |      0 |
 | redhat      |       15 | Red Hat Portal     | pointer   |       1 |     1 |      0 |
 | radio       |       15 | Geeks in Space     |           |       0 |     1 |      0 |
 | interviews  |       15 | Interviews         | crash     |       0 |     1 |      0 |
 | yro         |       30 | Your Rights Online |           |       0 |     1 |      0 |
 +-------------+----------+--------------------+-----------+---------+-------+--------+

sessions

What authors are logged into the site.

 +---------------+----------+---------------------+---------------------+-----------+
 | session       | uid      | logintime           | lasttime            | lasttitle |
 +---------------+----------+---------------------+---------------------+-----------+
 | CmVB1EnqOeXRQ | 123456   | 2000-09-23 22:25:11 | 2000-09-23 23:16:48 | NULL      |
 +---------------+----------+---------------------+---------------------+-----------+

site_info

contains values for the site set at the time of installation

sortcodes

This table defines sort codes

 +------+-------------------------------+
 | code | name                          |
 +------+-------------------------------+
 |    0 | Oldest First                  |
 |    1 | Newest First                  |
 |    3 | Highest Scores First          |
 |    4 | Oldest First (Ignore Threads) |
 |    5 | Newest First (Ignore Threads) |
 +------+-------------------------------+

statuscodes

This table defines status codes. Statuscodes determine what frequency slashd re-writes static pages.

 +------+------------+
 | code | name       |
 +------+------------+
 |    1 | Refreshing |
 |    0 | Normal     |
 |   10 | Archive    |
 +------+------------+

stories/newstories

the table containing stories. ``stories'' contains all the stories from the inception of the site whereas ``newstories'' is a cache of stories (for performance) which the age of which is controlled by archive_delay.

storiestuff

Is this a table of all the stories that have run and how many hits they received.

 +----------------+------+
 | sid            | hits |
 +----------------+------+
 | 980814/1039204 | 1313 |
 | 980814/1040217 |  448 |
 | 980814/1043206 | 6608 |
 | 980814/1058231 | 1474 |
 | 980814/112203  |  581 |
 +----------------+------+

submissions

submissions from users that an author either approves and it becomes a story, or disapproved. ``I'm just a submission, and I'm sitting here a-wishin, hoping some day I'll be a story.. oh I pray that I will, but today I am still .. just a submission''

templates

Contains templates that make up much of the look and feel of the site

topics

The topics of the site

tzcodes

This table is time zone codes - translates timezone codes into the canonical names of the time zones, and has the minute offsets.

 +---------------------------------+
 | tz  | offset | description      |
 | est | -18000 | Eastern Standard |
 +---------------------------------+

users

primary users table containing basic site wide information on a user (uid)

users_info

A table containing more information about a user, including meta moderation information

users_comments

User information pertaining mostly to the display of comments

users_index

User information pertaining mostly to index/article page display

users_param

key value table for user values that don't go into the other user tables such as the author flag, which determines that a user is an author (appears on authors page)

users_prefs

User information used site wide, things that changes less than often

vars

This table is a list of vars for the site. Central location for sitewide variables.


VERSION

$Id: slashtables.pod,v 1.1.2.2 2001/10/10 16:06:26 pudge Exp $