added the category reference table and some support code to manage it

This commit is contained in:
Eric J. Bowersox
2003-05-26 06:41:46 +00:00
parent 6cf37bfee2
commit 0ffd03e38b
13 changed files with 1486 additions and 0 deletions

View File

@@ -164,6 +164,10 @@
<object name="venice-auditor" classname="com.silverwrist.venice.app.StartupShutdownAuditor" priority="100"/>
<object name="categories" classname="com.silverwrist.venice.community.CategoryManager" priority="100"/>
<database connection="data"/>
</object>
<!-- The Venice application layer -->
<application name="venice" classname="com.silverwrist.venice.app.VeniceApplication">
<stylesheet-mappings>

View File

@@ -253,6 +253,16 @@ CREATE TABLE menuitems (
PRIMARY KEY (menuid, sequence)
);
# The table mapping category IDs to category names.
CREATE TABLE refcategory (
catid INT NOT NULL PRIMARY KEY,
parent INT NOT NULL,
symlink INT NOT NULL,
name VARCHAR(64) NOT NULL,
dontuse TINYINT DEFAULT 0,
UNIQUE INDEX display (parent, name)
);
##############################################################################
# Set table access rights
##############################################################################
@@ -569,6 +579,378 @@ INSERT INTO imagetype (typecode, nsid, name) VALUES
#### following this line is initialization of Venice-specific tables ####
# Populate the Category table.
# Source: Mozilla Open Directory Project categorization system <http://dmoz.org>;
# additional categorization from WebbMe categories
INSERT INTO refcategory (catid, parent, symlink, name) VALUES
(0, -1, -1, 'Unclassified'),
(1, -1, -1, 'Arts'),
(16, 1, -1, 'Animation'),
(17, 1, 181, 'Antiques'),
(18, 1, -1, 'Architecture'),
(19, 1, -1, 'Art History'),
(20, 1, -1, 'Body Art'),
(21, 1, -1, 'Celebrities'),
(22, 1, -1, 'Comics'),
(23, 1, -1, 'Crafts'),
(24, 1, -1, 'Dance'),
(25, 1, -1, 'Design'),
(26, 1, -1, 'Education'),
(27, 1, -1, 'Entertainment'),
(28, 1, -1, 'Graphic Design'),
(29, 1, -1, 'Humanities'),
(30, 1, -1, 'Illustration'),
(31, 1, -1, 'Literature'),
(32, 1, -1, 'Movies'),
(33, 1, -1, 'Music'),
(34, 1, -1, 'Myths and Folktales'),
(35, 1, -1, 'Native and Tribal'),
(36, 1, -1, 'Performing Arts'),
(37, 1, -1, 'Photography'),
(38, 1, -1, 'Radio'),
(39, 1, -1, 'Television'),
(40, 1, -1, 'Theatre'),
(41, 1, -1, 'Typography'),
(42, 1, -1, 'Video'),
(43, 1, -1, 'Visual Arts'),
(44, 1, -1, 'Writing'),
(2, -1, -1, 'Business'),
(45, 2, -1, 'Accounting'),
(46, 2, -1, 'Advertising'),
(47, 2, -1, 'Aerospace'),
(48, 2, -1, 'Agriculture and Forestry'),
(49, 2, -1, 'Apparel'),
(50, 2, -1, 'Arts and Entertainment'),
(51, 2, -1, 'Associations'),
(52, 2, -1, 'Aviation'),
(53, 2, -1, 'Business Services'),
(54, 2, 245, 'Classifieds'),
(55, 2, -1, 'Computers'),
(56, 2, -1, 'Consulting'),
(57, 2, -1, 'Construction and Maintenance'),
(58, 2, -1, 'Electronics'),
(59, 2, -1, 'Employment'),
(60, 2, -1, 'Energy and Utilities'),
(61, 2, -1, 'Environmental and Safety'),
(62, 2, -1, 'Financial Services'),
(63, 2, -1, 'Food and Related Products'),
(64, 2, -1, 'Insurance'),
(65, 2, -1, 'Internet Services'),
(66, 2, -1, 'Investing'),
(67, 2, 290, 'Law'),
(68, 2, -1, 'Management'),
(69, 2, -1, 'Manufacturing'),
(70, 2, -1, 'Marketing'),
(71, 2, -1, 'Mining and Drilling'),
(72, 2, -1, 'Printing'),
(73, 2, -1, 'Publishing'),
(74, 2, -1, 'Real Estate'),
(75, 2, -1, 'Retail'),
(76, 2, -1, 'Security'),
(77, 2, -1, 'Small Business'),
(78, 2, -1, 'Taxes'),
(79, 2, -1, 'Training and Schools'),
(80, 2, -1, 'Telecommunications'),
(81, 2, -1, 'Transportation'),
(82, 2, -1, 'Venture Capital'),
(3, -1, -1, 'Computers'),
(83, 3, -1, 'CAD'),
(84, 3, -1, 'Computer Science'),
(85, 3, -1, 'Consultants'),
(86, 3, -1, 'Data Communications'),
(87, 3, -1, 'Desktop Publishing'),
(88, 3, -1, 'Education'),
(89, 3, -1, 'Ethics'),
(90, 3, -1, 'Fonts'),
(91, 3, 124, 'Games'),
(92, 3, -1, 'Graphics'),
(93, 3, -1, 'Hacking'),
(94, 3, -1, 'Hardware'),
(95, 3, -1, 'History'),
(96, 3, -1, 'Internet'),
(97, 3, -1, 'Multimedia'),
(98, 3, -1, 'Open Source'),
(99, 3, -1, 'Operating Systems'),
(100, 3, -1, 'Programming'),
(101, 3, -1, 'Robotics'),
(102, 3, -1, 'Security'),
(103, 3, -1, 'Shopping'),
(104, 3, -1, 'Software'),
(105, 3, -1, 'Systems'),
(4, -1, -1, 'Games'),
(106, 4, -1, 'Board Games'),
(107, 4, -1, 'Card Games'),
(108, 4, -1, 'Coin-op Games'),
(109, 4, 123, 'Collectible Card Games'),
(110, 4, -1, 'Dice Games'),
(111, 4, 319, 'Fantasy Sports'),
(112, 4, -1, 'Gambling'),
(113, 4, -1, 'Game Creation Systems'),
(114, 4, -1, 'Game Design'),
(115, 4, -1, 'Hand Games'),
(116, 4, -1, 'Internet Games'),
(117, 4, -1, 'Party Games'),
(118, 4, -1, 'Puzzles'),
(119, 4, 270, 'Retailers'),
(120, 4, -1, 'Roleplaying Games'),
(121, 4, 14, 'Sports'),
(122, 4, -1, 'Tile Games'),
(123, 4, -1, 'Trading Cards'),
(124, 4, -1, 'Video Games'),
(125, 4, -1, 'Yard and Deck Games'),
(5, -1, -1, 'Health'),
(126, 5, -1, 'Aging'),
(127, 5, -1, 'Alternative Medicine'),
(128, 5, -1, 'Beauty'),
(129, 5, -1, 'Children''s Health'),
(130, 5, -1, 'Conditions and Diseases'),
(131, 5, -1, 'Dentistry'),
(132, 5, 280, 'Disabilities'),
(133, 5, -1, 'Education'),
(134, 5, -1, 'Fitness'),
(135, 5, 64, 'Health Insurance'),
(136, 5, -1, 'Medicine'),
(137, 5, -1, 'Men''s Health'),
(138, 5, -1, 'Mental Health'),
(139, 5, -1, 'Nursing'),
(140, 5, -1, 'Nutrition'),
(141, 5, -1, 'Occupational Health and Safety'),
(142, 5, -1, 'Pharmacy'),
(143, 5, -1, 'Public Health and Safety'),
(144, 5, -1, 'Reproductive Health'),
(145, 5, -1, 'Seniors'' Health'),
(146, 5, -1, 'Services'),
(147, 5, -1, 'Substance Abuse'),
(148, 5, -1, 'Teen Health'),
(149, 5, -1, 'Women''s Health'),
(6, -1, -1, 'Home'),
(150, 6, -1, 'Apartment Living'),
(151, 6, -1, 'Cooking'),
(152, 6, -1, 'Do-It-Yourself'),
(153, 6, -1, 'Emergency Preparation'),
(154, 6, -1, 'Entertaining'),
(155, 6, -1, 'Family'),
(156, 6, -1, 'Gardens'),
(157, 6, -1, 'Home Improvement'),
(158, 6, -1, 'Homemaking'),
(363, 6, -1, 'Homeowners'),
(159, 6, -1, 'Kids'),
(160, 6, -1, 'Moving and Relocating'),
(161, 6, -1, 'Nursery'),
(162, 6, 207, 'Pets'),
(163, 6, -1, 'Personal Finance'),
(164, 6, -1, 'Personal Organization'),
(165, 6, -1, 'Relatives'),
(166, 6, -1, 'Rural Living'),
(167, 6, 12, 'Shopping'),
(168, 6, -1, 'Urban Living'),
(7, -1, -1, 'News'),
(169, 7, -1, 'Alternative Media'),
(170, 7, -1, 'Columnists'),
(171, 7, -1, 'Current Events'),
(172, 7, -1, 'Magazines'),
(173, 7, -1, 'Media'),
(174, 7, -1, 'Newspapers'),
(175, 7, -1, 'Online'),
(176, 7, -1, 'Politics'),
(177, 7, -1, 'Satire'),
(178, 7, -1, 'Weather'),
(8, -1, -1, 'Recreation'),
(179, 8, -1, 'Air Hockey'),
(180, 8, -1, 'Amateur Radio'),
(181, 8, -1, 'Antiques'),
(182, 8, -1, 'Audio'),
(183, 8, -1, 'Aviation'),
(184, 8, -1, 'Birdwatching'),
(185, 8, -1, 'Boating'),
(186, 8, 310, 'Bowling'),
(187, 8, -1, 'Climbing'),
(188, 8, -1, 'Collecting'),
(189, 8, 23, 'Crafts'),
(190, 8, -1, 'Drugs'),
(191, 8, -1, 'Food and Drink'),
(192, 8, 4, 'Games'),
(193, 8, 156, 'Gardens'),
(194, 8, 285, 'Genealogy'),
(195, 8, -1, 'Guns'),
(196, 8, -1, 'Hot Air Ballooning'),
(197, 8, -1, 'Humor'),
(198, 8, -1, 'Kites'),
(199, 8, -1, 'Knives'),
(200, 8, -1, 'Living History'),
(201, 8, 332, 'Martial Arts'),
(202, 8, -1, 'Models'),
(203, 8, -1, 'Motorcycles'),
(204, 8, -1, 'Nudism'),
(205, 8, -1, 'Outdoors'),
(206, 8, -1, 'Parties'),
(207, 8, -1, 'Pets'),
(208, 8, -1, 'Roads and Highways'),
(209, 8, -1, 'Scouting'),
(210, 8, -1, 'Smoking'),
(211, 8, 14, 'Sports'),
(212, 8, -1, 'Theme Parks'),
(213, 8, -1, 'Trains and Railroads'),
(214, 8, -1, 'Travel'),
(9, -1, -1, 'Reference and Education'),
(215, 9, -1, 'Alumni'),
(216, 9, -1, 'Colleges and Universities'),
(217, 9, -1, 'Continuing Education'),
(218, 9, 79, 'Corporate Training'),
(219, 9, -1, 'Distance Learning'),
(220, 9, -1, 'International'),
(221, 9, -1, 'K through 12'),
(222, 9, -1, 'Libraries'),
(223, 9, -1, 'Museums'),
(224, 9, -1, 'Special Education'),
(225, 9, -1, 'Vocational Education'),
(10, -1, -1, 'Regional'),
(226, 10, -1, 'International'),
(227, 10, -1, 'US'),
(11, -1, -1, 'Science'),
(228, 11, -1, 'Agriculture'),
(229, 11, -1, 'Alternative Science'),
(230, 11, -1, 'Astronomy'),
(231, 11, -1, 'Biology'),
(232, 11, -1, 'Chemistry'),
(233, 11, -1, 'Earth Sciences'),
(234, 11, -1, 'Environment'),
(235, 11, -1, 'Mathematics'),
(236, 11, -1, 'Physics'),
(237, 11, -1, 'Science in Society'),
(238, 11, -1, 'Social Sciences'),
(239, 11, -1, 'Space'),
(240, 11, -1, 'Technology'),
(12, -1, -1, 'Shopping'),
(241, 12, -1, 'Antiques and Collectibles'),
(242, 12, -1, 'Auctions'),
(243, 12, -1, 'Books'),
(244, 12, -1, 'Children'),
(245, 12, -1, 'Classifieds'),
(246, 12, -1, 'Clothing'),
(247, 12, 103, 'Computers'),
(248, 12, -1, 'Consumer Electronics'),
(249, 12, -1, 'Crafts'),
(250, 12, -1, 'Entertainment'),
(251, 12, -1, 'Ethnic and Regional'),
(252, 12, -1, 'Flowers'),
(253, 12, -1, 'Food and Drink'),
(254, 12, -1, 'Furniture'),
(255, 12, -1, 'Gifts'),
(256, 12, -1, 'Health and Beauty'),
(257, 12, -1, 'Holidays'),
(258, 12, -1, 'Home and Garden'),
(259, 12, -1, 'Jewelry'),
(260, 12, -1, 'Music and Video'),
(261, 12, -1, 'Niche'),
(262, 12, -1, 'Office Products'),
(263, 12, -1, 'Pets'),
(264, 12, -1, 'Photography'),
(265, 12, -1, 'Recreation and Hobbies'),
(266, 12, -1, 'Religious'),
(267, 12, -1, 'Sports'),
(268, 12, -1, 'Tobacco'),
(269, 12, -1, 'Tools'),
(270, 12, -1, 'Toys and Games'),
(271, 12, -1, 'Travel'),
(272, 12, -1, 'Vehicles'),
(273, 12, -1, 'Visual Arts'),
(274, 12, -1, 'Weddings'),
(275, 12, -1, 'Wholesale'),
(13, -1, -1, 'Society'),
(276, 13, -1, 'Activism'),
(277, 13, -1, 'Advice'),
(278, 13, -1, 'Crime'),
(279, 13, -1, 'Death'),
(280, 13, -1, 'Disabled'),
(281, 13, -1, 'Ethnicity'),
(282, 13, -1, 'Folklore'),
(283, 13, -1, 'Future'),
(284, 13, -1, 'Gay/Lesbian/Bisexual'),
(285, 13, -1, 'Genealogy'),
(286, 13, -1, 'Government'),
(287, 13, -1, 'History'),
(288, 13, -1, 'Holidays'),
(289, 13, -1, 'Issues'),
(290, 13, -1, 'Law'),
(291, 13, -1, 'Lifestyle Choices'),
(292, 13, -1, 'Military'),
(293, 13, -1, 'Paranormal'),
(294, 13, -1, 'People'),
(295, 13, -1, 'Philosophy'),
(296, 13, -1, 'Politics'),
(297, 13, -1, 'Recovery and Support Groups'),
(298, 13, -1, 'Relationships'),
(299, 13, -1, 'Religion and Spirituality'),
(300, 13, -1, 'Sexuality'),
(301, 13, -1, 'Subcultures'),
(302, 13, -1, 'Transgendered'),
(303, 13, -1, 'Work'),
(14, -1, -1, 'Sports'),
(304, 14, -1, 'Archery'),
(305, 14, -1, 'Badminton'),
(306, 14, -1, 'Baseball'),
(307, 14, -1, 'Basketball'),
(308, 14, -1, 'Billiards'),
(309, 14, -1, 'Boomerang'),
(310, 14, -1, 'Bowling'),
(311, 14, -1, 'Boxing'),
(312, 14, -1, 'Cheerleading'),
(313, 14, -1, 'Cricket'),
(314, 14, -1, 'Croquet'),
(315, 14, -1, 'Cycling'),
(316, 14, -1, 'Darts'),
(317, 14, -1, 'Equestrian'),
(318, 14, -1, 'Extreme Sports'),
(319, 14, -1, 'Fantasy'),
(320, 14, -1, 'Fencing'),
(321, 14, -1, 'Fishing'),
(322, 14, -1, 'Flying Discs'),
(323, 14, -1, 'Football'),
(324, 14, -1, 'Golf'),
(325, 14, -1, 'Greyhound Racing'),
(326, 14, -1, 'Gymnastics'),
(327, 14, -1, 'Handball'),
(328, 14, -1, 'Hockey'),
(329, 14, -1, 'Lacrosse'),
(330, 14, -1, 'Laser Games'),
(331, 14, -1, 'Lumberjack'),
(332, 14, -1, 'Martial Arts'),
(333, 14, -1, 'Motor Sports'),
(334, 14, -1, 'Orienteering'),
(335, 14, -1, 'Paintball'),
(336, 14, -1, 'Racquetball'),
(337, 14, -1, 'Rodeo'),
(338, 14, -1, 'Roller Derby'),
(339, 14, -1, 'Rope Skipping'),
(340, 14, -1, 'Rugby'),
(341, 14, -1, 'Running'),
(342, 14, -1, 'Sailing'),
(343, 14, -1, 'Shooting'),
(344, 14, 267, 'Shopping'),
(345, 14, -1, 'Skateboarding'),
(346, 14, -1, 'Skating'),
(347, 14, -1, 'Skiing'),
(348, 14, -1, 'Sledding'),
(349, 14, -1, 'Sled Dog Racing'),
(350, 14, -1, 'Snowboarding'),
(351, 14, -1, 'Soccer'),
(352, 14, -1, 'Softball'),
(353, 14, -1, 'Squash'),
(354, 14, -1, 'Strength Sports'),
(355, 14, -1, 'Table Tennis'),
(356, 14, -1, 'Tennis'),
(357, 14, -1, 'Track and Field'),
(358, 14, -1, 'Volleyball'),
(359, 14, -1, 'Walking'),
(360, 14, -1, 'Water Sports'),
(361, 14, -1, 'Winter Sports'),
(362, 14, -1, 'Wrestling'),
(15, -1, -1, '***DEPRECATED***');
### -- LAST IS 363 -- ###
UPDATE refcategory SET dontuse = 1 WHERE catid = 15;
# Create the "global" menu. (ID #1)
INSERT INTO menus (menuid, menu_nsid, menu_name, title, subtitle)
VALUES (1, 1, 'fixed.menu', 'About This Site', NULL);