implemented the "pics in posts" flag globally...it marks the first appearance
of "properties" storage and editing for conferences, communities, users, and the global system. In addition, the "global properties" editing screen got implemented, because it wasn't there yet.
This commit is contained in:
@@ -44,6 +44,13 @@ CREATE TABLE globals (
|
||||
sig_create_lvl INT NOT NULL
|
||||
);
|
||||
|
||||
# The global properties table. The "ndx" parameter is used to indicate what
|
||||
# element is being loaded, and then the "data" element is parsed.
|
||||
CREATE TABLE propglobal (
|
||||
ndx INT NOT NULL PRIMARY KEY,
|
||||
data VARCHAR(255)
|
||||
);
|
||||
|
||||
# The audit records table. Most "major" events add a record to this table.
|
||||
CREATE TABLE audit (
|
||||
record BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
@@ -93,6 +100,15 @@ CREATE TABLE userprefs (
|
||||
localeid VARCHAR(64) DEFAULT 'en_US'
|
||||
);
|
||||
|
||||
# The per-user properties table. The "ndx" parameter is used to indicate what
|
||||
# element is being loaded, and then the "data" element is parsed.
|
||||
CREATE TABLE propuser (
|
||||
uid INT NOT NULL,
|
||||
ndx INT NOT NULL,
|
||||
data VARCHAR(255),
|
||||
PRIMARY KEY (uid, ndx)
|
||||
);
|
||||
|
||||
# Indicates what the top-level "sidebox" configuration is for any given user.
|
||||
CREATE TABLE sideboxes (
|
||||
uid INT NOT NULL,
|
||||
@@ -238,6 +254,15 @@ CREATE TABLE sigban (
|
||||
PRIMARY KEY (sigid, uid)
|
||||
);
|
||||
|
||||
# The community properties table. The "index" parameter is used to indicate what
|
||||
# element is being loaded, and then the "data" element is parsed.
|
||||
CREATE TABLE propcomm (
|
||||
cid INT NOT NULL,
|
||||
ndx INT NOT NULL,
|
||||
data VARCHAR(255),
|
||||
PRIMARY KEY (cid, ndx)
|
||||
);
|
||||
|
||||
# The table describing conferences. Like original CW, confs may be linked to more
|
||||
# than one SIG.
|
||||
CREATE TABLE confs (
|
||||
@@ -306,6 +331,15 @@ CREATE TABLE confhotlist (
|
||||
INDEX inorder (uid, sequence)
|
||||
);
|
||||
|
||||
# The conference properties table. The "index" parameter is used to indicate what
|
||||
# element is being loaded, and then the "data" element is parsed.
|
||||
CREATE TABLE propconf (
|
||||
confid INT NOT NULL,
|
||||
ndx INT NOT NULL,
|
||||
data VARCHAR(255),
|
||||
PRIMARY KEY (confid, ndx)
|
||||
);
|
||||
|
||||
# The table describing topics within a conference.
|
||||
CREATE TABLE topics (
|
||||
topicid INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
@@ -1372,12 +1406,17 @@ INSERT INTO globals (posts_per_page, old_posts_at_top, max_search_page, max_sig_
|
||||
fp_posts, num_audit_page, sig_create_lvl)
|
||||
VALUES (20, 2, 20, 50, 50, 10, 100, 1000);
|
||||
|
||||
# Initialize the global properies table.
|
||||
INSERT INTO propglobal (ndx, data)
|
||||
VALUES (0, '');
|
||||
|
||||
# Add the 'Anonymous Honyak' user to the users table.
|
||||
# (Do 'SELECT * FROM users WHERE is_anon = 1' to retrieve the AC user details.)
|
||||
# (UID = 1, CONTACTID = 1)
|
||||
INSERT INTO users (uid, username, passhash, contactid, is_anon, verify_email, base_lvl, created)
|
||||
VALUES (1, 'Anonymous_Honyak', '', 1, 1, 1, 100, '2000-12-01 00:00:00');
|
||||
INSERT INTO userprefs (uid) VALUES (1);
|
||||
INSERT INTO propuser (uid, ndx, data) VALUES (1, 0, '');
|
||||
INSERT INTO contacts (contactid, given_name, family_name, locality, region, pcode, country, email, owner_uid)
|
||||
VALUES (1, 'Anonymous', 'User', 'Anywhere', '', '', 'US', 'nobody@example.com', 1);
|
||||
|
||||
@@ -1393,6 +1432,7 @@ INSERT INTO confhotlist (uid, sequence, sigid, confid)
|
||||
INSERT INTO users (uid, username, passhash, contactid, verify_email, base_lvl, created)
|
||||
VALUES (2, 'Administrator', '', 2, 1, 64999, '2000-12-01 00:00:00');
|
||||
INSERT INTO userprefs (uid) VALUES (2);
|
||||
INSERT INTO propuser (uid, ndx, data) VALUES (2, 0, '');
|
||||
INSERT INTO contacts (contactid, given_name, family_name, locality, region, pcode, country, email, owner_uid)
|
||||
VALUES (2, 'System', 'Administrator', 'Anywhere', '', '', 'US', 'root@your.box.com', 2);
|
||||
|
||||
@@ -1412,6 +1452,7 @@ INSERT INTO sigs (sigid, createdate, read_lvl, write_lvl, create_lvl, delete_lvl
|
||||
'Admin');
|
||||
INSERT INTO contacts (contactid, locality, country, owner_uid, owner_sigid)
|
||||
VALUES (3, 'Anywhere', 'US', 2, 1);
|
||||
INSERT INTO propcomm (cid, ndx, data) VALUES (1, 0, '');
|
||||
|
||||
# Insert the desired features for the 'Administration' SIG.
|
||||
INSERT INTO sigftrs (sigid, ftr_code)
|
||||
@@ -1430,6 +1471,7 @@ INSERT INTO confs (confid, createdate, read_lvl, post_lvl, create_lvl, hide_lvl,
|
||||
'Administrative Notes', 'Used to store notes and discussions between the site administrators.');
|
||||
INSERT INTO sigtoconf (sigid, confid, sequence) VALUES (1, 1, 10);
|
||||
INSERT INTO confalias (confid, alias) VALUES (1, 'Admin_Notes');
|
||||
INSERT INTO propconf (confid, ndx, data) VALUES (1, 0, '');
|
||||
|
||||
# Make the Administrator the host-of-record of the "Administrative Notes" conference.
|
||||
INSERT INTO confmember (confid, uid, granted_lvl) VALUES (1, 2, 52500);
|
||||
@@ -1444,6 +1486,7 @@ INSERT INTO sigs (sigid, createdate, read_lvl, write_lvl, create_lvl, delete_lvl
|
||||
'Like the man said, do unto others as you would have them do unto you.', 'Piazza');
|
||||
INSERT INTO contacts (contactid, locality, country, owner_uid, owner_sigid)
|
||||
VALUES (4, 'Anywhere', 'US', 2, 2);
|
||||
INSERT INTO propcomm (cid, ndx, data) VALUES (2, 0, '');
|
||||
|
||||
# Insert the desired features for La Piazza.
|
||||
INSERT INTO sigftrs (sigid, ftr_code)
|
||||
@@ -1467,6 +1510,7 @@ INSERT INTO confs (confid, createdate, read_lvl, post_lvl, create_lvl, hide_lvl,
|
||||
'Your place for general discussion about the system and general topics.');
|
||||
INSERT INTO sigtoconf (sigid, confid, sequence) VALUES (2, 2, 10);
|
||||
INSERT INTO confalias (confid, alias) VALUES (2, 'General');
|
||||
INSERT INTO propconf (confid, ndx, data) VALUES (2, 0, '');
|
||||
|
||||
# Make the Administrator the host-of-record of the "General Discussion" conference.
|
||||
INSERT INTO confmember (confid, uid, granted_lvl) VALUES (2, 2, 52500);
|
||||
@@ -1479,6 +1523,7 @@ INSERT INTO confs (confid, createdate, read_lvl, post_lvl, create_lvl, hide_lvl,
|
||||
'Use this conference to test the conferencing system.');
|
||||
INSERT INTO sigtoconf (sigid, confid, sequence) VALUES (2, 3, 20);
|
||||
INSERT INTO confalias (confid, alias) VALUES (3, 'Test');
|
||||
INSERT INTO propconf (confid, ndx, data) VALUES (3, 0, '');
|
||||
|
||||
# Make the Administrator the host-of-record of the "Test Postings" conference.
|
||||
INSERT INTO confmember (confid, uid, granted_lvl) VALUES (3, 2, 52500);
|
||||
@@ -1492,6 +1537,7 @@ INSERT INTO confmember (confid, uid, granted_lvl) VALUES (3, 2, 52500);
|
||||
INSERT INTO users (uid, username, passhash, contactid, verify_email, base_lvl, created)
|
||||
VALUES (3, 'TestUser', '6BC1E91CF2917BE1AA0D0D1007C28437D3D3AEDF', 5, 1, 1000, '2000-12-01 00:00:00');
|
||||
INSERT INTO userprefs (uid) VALUES (3);
|
||||
INSERT INTO propuser (uid, ndx, data) VALUES (3, 0, '');
|
||||
INSERT INTO contacts (contactid, given_name, family_name, locality, region, pcode, country, email, owner_uid)
|
||||
VALUES (5, 'Test', 'User', 'Denver', 'CO', '80231', 'US', 'testuser@example.com', 3);
|
||||
INSERT INTO sideboxes (uid, boxid, sequence, param)
|
||||
@@ -1510,6 +1556,7 @@ INSERT INTO sigs (sigid, createdate, read_lvl, write_lvl, create_lvl, delete_lvl
|
||||
'You must have a silly walk.', 'sillywalk');
|
||||
INSERT INTO contacts (contactid, locality, country, owner_uid, owner_sigid)
|
||||
VALUES (6, 'Anywhere', 'US', 2, 3);
|
||||
INSERT INTO propcomm (cid, ndx, data) VALUES (3, 0, '');
|
||||
INSERT INTO sigftrs (sigid, ftr_code)
|
||||
VALUES (3, 0), (3, 1), (3, 3);
|
||||
INSERT INTO sigmember (sigid, uid, granted_lvl, locked)
|
||||
@@ -1524,6 +1571,7 @@ INSERT INTO sigs (sigid, createdate, read_lvl, write_lvl, create_lvl, delete_lvl
|
||||
'Evil Geniuses Only!', 'fnord', 'illuminati');
|
||||
INSERT INTO contacts (contactid, locality, country, owner_uid, owner_sigid)
|
||||
VALUES (7, 'Anywhere', 'US', 2, 4);
|
||||
INSERT INTO propcomm (cid, ndx, data) VALUES (4, 0, '');
|
||||
INSERT INTO sigftrs (sigid, ftr_code)
|
||||
VALUES (4, 0), (4, 1), (4, 3);
|
||||
INSERT INTO sigmember (sigid, uid, granted_lvl, locked)
|
||||
|
||||
Reference in New Issue
Block a user