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.
A log of people who try too many times to beat the post limit
abuser_id
auto increment id
host_name
host name of abuser
pagename
page where abuser made attempt
ts
time abuser made attempt
reason
reason for being logged
querystring
form querystring
logs page views to the site, logging occurs on a delayed insert
id
auto increment id
host_addr
host address of person hitting site
op
the page op
dat
data
uid
user id (fk from users)
ts
time stamp of access
query_string
form querystring
No longer exists - only listed here as a reference to the fact that authors are now users with the 'author' flag set.
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.
bid
the name of the block (even though this seems as if it should be an integer, it's actually a name )
block
the actual contents of the block. This can be HTML, plain text or almost anything else.
seclev
the seclev an admin user must be in order to edit it.
type
portal or not.
description
a text description of what the block is for or does.
section
the section the block appears in ie "index".
ordernum
the order on the section in which it appears.
title
the title of the block.
portal
true/false, is a portal block or not
url
the url of a site if a portal block
rdf
the url of the rdf document that portald fetches.
retrieve
whether portald will attempt to retrieve a block or not.
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.
param_id
auto_increment id
type
the name of the key, what was formerly the name of the table
code
the numerical code, key to the value
name
the value that corresponds to the code
How comments appear.
+-----------+-------------+-------------+
| mode | name | description |
+-----------+-------------+-------------+
| flat | Flat | |
| nested | Nested | |
| thread | Threaded | |
| nocomment | No Comments | |
+-----------+-------------+-------------+
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.
sid
story id
cid
comment id
pid
parent's cid
date
datestamp
host_name
where they're coming from.
subject
the subject
comment
the actual comment
uid
user ID
points
standing of their comment
lastmod
last moderator's uid
reason
reason
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 |
+----+-------------------------+---------------------------------+
This table contains as many filters as a site admin wants to filter different fields in user forms such as comment posting.
filter_id
auto_increment id
regex
base regex of filter ie. if you wanted to filter /dog/, this would be 'dog'.
modifier
global, case insensitive... if you wanted /dog/g, this would be 'g'.
field
which form element is filtered, such as 'postercomment'.
ratio
the percentage of a particular pattern that's allowable. If the site admin doesn't want more than 20% to be spaces, this would be '.2'.
minimum_match
the minimum number of matches for this regex (if not using percent) if the desired regex was to be /(dog)[10,]/, then this would be '10'.
minimum_length
the minimum length of content that whatever is being posted must be in order for a particular filter to be run against the content being posted.
err_message
the message that's printed out to the user upon the failure to submit due to the filter matching what was in the field.
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 |
+---------------+-------------------+-------------+
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.
formkey
unique key issued to a form
formname
the name of the form that the key was issued to
id
uid if logged in, -1 plus random string if not
uid
uid
host_name
cgi env host
value
whether or not the person has completed their submission. 1 means they have, 0 means they only got to the point where the form was issued a formkey
cid
comment id, if testing a comment being posted
ts
time stamp of when formkey was issued
submit_ts
time stamp of when the submission of the form was successful. This and ts are used to determine the speed of the posting.
content_length
the int length of the field being tested
Table of menu items, using the template library for it's value
id
auto_increment id
menu
menu category
label
menu item label
value
template value, url of menu link
seclev
security level a user must be for menu to be visible
menuorder
order menu appear amongst other menu items
Logs meta-moderations.
id
auto_increment id
mmid
meta moderator id, fk to users.uid
val
value
ts
timestamp
flag
flag
When, why, who moderated something
id
auto_increment id
uid
user id, fk to users
val
value
sid
story id
ts
time stamp
cid
comment id
reason
numerical reason corresponding to names such as "troll", "insightful", "overrated", etc...
active
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 |
+----------+-----+---------+-------+
The poll questions.
qid
question ID
question
question
voters
total number of votes for this question
date
qid
question id (foreign key)
id
ip address
time
user id
+-----------+-----------------------------+
| code | name |
+-----------+-----------------------------+
| plaintext | Plain Old Text |
| html | HTML Formatted |
| exttrans | Extrans (html tags to text) |
+-----------+-----------------------------+
The primary sections of Slash
section
the name of the section
artcount
how many articles are running in this section
title
title of the section
qid
question id for polls
isolate
true/false
issue
true/false
extras
true/false
+-------------+----------+--------------------+-----------+---------+-------+--------+
| 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 |
+-------------+----------+--------------------+-----------+---------+-------+--------+
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 |
+---------------+----------+---------------------+---------------------+-----------+
contains values for the site set at the time of installation
param_id
auto_increment id.
name
name of value.
value
the value of the name.
description
description of what the value is.
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) |
+------+-------------------------------+
This table defines status codes. Statuscodes determine what frequency slashd re-writes static pages.
+------+------------+
| code | name |
+------+------------+
| 1 | Refreshing |
| 0 | Normal |
| 10 | Archive |
+------+------------+
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.
sid
story id (primary key)
tid
topic id (foreign key to topics)
uid
uid (foreign key to users, user has author flag)
commentcount
number comments per story
title
title of the story
dept
story department
time
time the story was submitted
introtext
the text that displays on the front page for the story
bodytext
the main text of the story
writestatus
status code determines how often static page is re-written.
hits
number of hits per story
section
the section the story goes in
displaystatus
true/false if the story is to be displayed. Uses table displaycodes
commentstatus
true/false if comments
hitparade
sums of all comment counts for this story
relatedtext
content related to the story
extratext
could be anything
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 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"
subid
submission id
email
email address of the submitter
name
name of the submitter
time
time of the submission
subj
subject of the story
story
text about the story, url ... etc... whatever the submitter inputs
tid
topic id (varchar)
note
(input by admin) Hold/Quik tells what to do with the story (grouping)
section
section the submission would go in (varchar)
comment
comment of admin (what they're doing with the submission)
uid
user id of the submitter
del
0 unedited, 1 deleted, 2 posted
Contains templates that make up much of the look and feel of the site
tpid
auto_increment id
name
name of template
page
page that template belongs to
section
section template belongs to
The topics of the site
tid
topic id (varchar)
image
image associated with the topic when posted (ie. billborg.gif for MS)
alttext
text to put in alt
tagwidth
width of image height - height of image
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 |
+---------------------------------+
primary users table containing basic site wide information on a user (uid)
uid
user id, indentifies user across all user tables
nickname
the name as displayed in their comments
realemail
their true email
fakeemail
their email as displayed in comments
homepage
their URL
passwd
plaintext password
sig
signature text
seclev
security level, 100 and above admin
matchname
the nickname with no spaces and all lower cases, to prevent duplicate nicknames from being issued
newpasswd
used to reset the users password. Initially, stored as clear text, sent to the user, the user logs in, newpasswd is MD5 encrypted, copied to passwd, and then cleared.
A table containing more information about a user, including meta moderation information
uid
user id
realname
their real name (legal name)
bio
spiel of who they are
totalmods
total number of moderations ever moderated
tokens
part of moderations. Tracks when it's time for a user to get more moderator points
lastgranted
date that your were last given moderator access
karma
points for moderating.
maillist
uses emailcodes to determine if they get emailed
totalcomments
total amount of comments ever posted
lastmm
last meta moderation
lastaccess
last access of site
lastmmid
last uid to meta-moderate this user
m2fair
number of fair meta-moderations
m2unfair
number of unfair meta-moderations
m2fairvotes
number of times this user has had moderations voted as fair
m2unfairvotes
number of times this user has had moderations voted as unfair
upmods
number of positive moderations
downmods
number of negative moderations
session_login
boolean for whether cookie should be session-based
User information pertaining mostly to the display of comments
uid
user id
points
moderator points
posttype
html/plaintext
defaultpoints
number of points for posting a comment
highlightthresh
whether you want nested comments to appear as links or as full comments
maxcommentsize
max comment size that a user wants to read (that'll be a link or displayed)
hardthresh
1 or 0, forces thresholds
clbig
if comment length is larger than clbig, then points are given
clsmall
if comment length is smaller than clsmall, points taken away
reparent
1 or 0, brings up comment away from parent if moderated high
nosigs
1 or 0 other peoples' signatures or not
commentspill
how many comments that appear per page
commentsort
uses table sortcodes to determine the order in which comments are displayed
commentlimit
how many comments you want to see
noscores
1 or 0, whether scores on comments appear
mode
Comment display style - flat,threaded or nested.
threshold
-1 to 5 - how many comments are displayed according to their moderation
User information pertaining mostly to index/article page display
uid
user id
extid
exclude topics - person doesn't see a topic
exaid
exclude authors - person doesn't see an author
exsect
exclude sections - person doesn't see a section
exboxes
list of slashboxes - comma separated topic blocks What will appear on a user's page
maxstories
number of stories that appear
noboxes
flag that determines whether the user wants no boxes on the right
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)
param_id
auto increment ID
uid
User ID
name
name of key
value
value of key
User information used site wide, things that changes less than often
uid
user id
willing
1 or 0 , Willing to be a moderator or not
dfid
uses dateformat table. How you want dates (such as article time stamps) to appear
tzcode
uses tzcode table. Your time zone table
noicons
1 or 0 topical icons or not
light
light mode yes/no 1 or 0, does the user want the site to load by default in light mode
mylinks
block of personal stuff that appears on prefs page.
lang
language code
This table is a list of vars for the site. Central location for sitewide variables.
name
name of a var
value
the value of the var
description
the description of the var