-- MySQL dump 10.9
--
-- Host: 10.250.27.101    Database: scoop_clean
-- ------------------------------------------------------
-- Server version	4.1.11-Debian_3-log
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `ad_info`
--

DROP TABLE IF EXISTS `ad_info`;
CREATE TABLE `ad_info` (
  `ad_id` int(11) NOT NULL auto_increment,
  `ad_tmpl` varchar(30) default NULL,
  `ad_file` varchar(255) default NULL,
  `ad_url` varchar(255) default NULL,
  `ad_text1` text,
  `ad_text2` text,
  `views_left` int(11) default '0',
  `first_day` date default NULL,
  `perpetual` int(1) default '0',
  `last_seen` datetime default NULL,
  `sponsor` int(11) default NULL,
  `active` int(1) default '0',
  `example` int(1) default '0',
  `ad_title` varchar(255) default NULL,
  `submitted_on` datetime default NULL,
  `view_count` int(11) default '0',
  `click_throughs` int(11) default '0',
  `judged` int(1) default '0',
  `reason` text,
  `paid` int(1) default '0',
  `purchase_size` int(11) default '0',
  `purchase_price` decimal(7,2) default '0.00',
  `judger` int(11) default NULL,
  `approved` int(1) default NULL,
  `impression_cache` int(11) default '0',
  `pos` int(5) NOT NULL default '1',
  `ad_sid` varchar(20) default NULL,
  PRIMARY KEY  (`ad_id`),
  KEY `seen_active` (`active`,`last_seen`,`ad_tmpl`),
  KEY `pos` (`pos`)
) TYPE=MyISAM;

--
-- Dumping data for table `ad_info`
--


/*!40000 ALTER TABLE `ad_info` DISABLE KEYS */;
LOCK TABLES `ad_info` WRITE;
INSERT INTO `ad_info` VALUES (1,'text_ad_template','7981192.png','http://scoop.kuro5hin.org','The swiss army chainsaw of Content Management',NULL,NULL,NULL,NULL,NULL,1,NULL,1,'Scoop','2001-12-21 09:39:12',0,1,0,NULL,0,0,'0.00',NULL,NULL,NULL,1,NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `ad_info` ENABLE KEYS */;

--
-- Table structure for table `ad_log`
--

DROP TABLE IF EXISTS `ad_log`;
CREATE TABLE `ad_log` (
  `req_num` bigint(20) NOT NULL auto_increment,
  `req_time` int(11) NOT NULL default '0',
  `requestor` int(11) NOT NULL default '0',
  `request_ip` varchar(16) NOT NULL default '',
  `ad_id` int(11) NOT NULL default '0',
  `req_type` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`req_num`)
) TYPE=MyISAM;

--
-- Dumping data for table `ad_log`
--


/*!40000 ALTER TABLE `ad_log` DISABLE KEYS */;
LOCK TABLES `ad_log` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `ad_log` ENABLE KEYS */;

--
-- Table structure for table `ad_payments`
--

DROP TABLE IF EXISTS `ad_payments`;
CREATE TABLE `ad_payments` (
  `ad_id` int(11) NOT NULL default '0',
  `order_id` varchar(50) NOT NULL default '',
  `cost` decimal(7,2) NOT NULL default '0.00',
  `pay_type` varchar(10) NOT NULL default '',
  `auth_date` date NOT NULL default '0000-00-00',
  `final_date` date default NULL,
  `paid` int(1) default NULL,
  PRIMARY KEY  (`ad_id`,`order_id`)
) TYPE=MyISAM;

--
-- Dumping data for table `ad_payments`
--


/*!40000 ALTER TABLE `ad_payments` DISABLE KEYS */;
LOCK TABLES `ad_payments` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `ad_payments` ENABLE KEYS */;

--
-- Table structure for table `ad_types`
--

DROP TABLE IF EXISTS `ad_types`;
CREATE TABLE `ad_types` (
  `type_template` varchar(30) NOT NULL default '',
  `type_name` varchar(50) NOT NULL default '',
  `short_desc` varchar(255) NOT NULL default '',
  `submit_instructions` text,
  `max_file_size` int(11) default NULL,
  `max_text1_chars` int(5) default NULL,
  `max_text2_chars` int(5) default NULL,
  `max_title_chars` int(5) default NULL,
  `cpm` decimal(7,2) default NULL,
  `active` int(1) NOT NULL default '0',
  `min_purchase_size` int(7) default NULL,
  `max_purchase_size` int(7) default '1000000',
  `pos` int(5) NOT NULL default '1',
  `allow_discussion` int(1) default '0',
  PRIMARY KEY  (`type_template`)
) TYPE=MyISAM;

--
-- Dumping data for table `ad_types`
--


/*!40000 ALTER TABLE `ad_types` DISABLE KEYS */;
LOCK TABLES `ad_types` WRITE;
INSERT INTO `ad_types` VALUES ('text_ad_template','Simple Text Ad','This is a simple text advertisement that allows a title, some text, and a link to your site.','Put in your title, text, and where you want to link to below.',NULL,50,NULL,20,'2.50',1,1000,1000000,1,0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `ad_types` ENABLE KEYS */;

--
-- Table structure for table `admin_tools`
--

DROP TABLE IF EXISTS `admin_tools`;
CREATE TABLE `admin_tools` (
  `tool` varchar(20) NOT NULL default '',
  `pos` int(2) NOT NULL default '0',
  `dispname` varchar(60) NOT NULL default '',
  `menuname` varchar(60) NOT NULL default '',
  `perm` varchar(50) NOT NULL default '',
  `func` varchar(50) NOT NULL default '',
  `is_box` int(1) default '0',
  PRIMARY KEY  (`tool`)
) TYPE=MyISAM;

--
-- Dumping data for table `admin_tools`
--


/*!40000 ALTER TABLE `admin_tools` DISABLE KEYS */;
LOCK TABLES `admin_tools` WRITE;
INSERT INTO `admin_tools` VALUES ('story',1,'Stories','New Story','story_admin,edit_my_stories','edit_story',0);
INSERT INTO `admin_tools` VALUES ('storylist',2,'Stories','Story List','story_list','list_stories',0);
INSERT INTO `admin_tools` VALUES ('editpoll',4,'Polls','New Poll','edit_polls','edit_polls',0);
INSERT INTO `admin_tools` VALUES ('listpolls',5,'Polls','Poll List','list_polls','admin_polls',0);
INSERT INTO `admin_tools` VALUES ('vars',6,'Site Controls','Site Controls','edit_vars','edit_vars',0);
INSERT INTO `admin_tools` VALUES ('blocks',7,'Blocks','Blocks','edit_blocks','edit_blocks',0);
INSERT INTO `admin_tools` VALUES ('topics',8,'Topics','Topics','edit_topics','edit_topics',0);
INSERT INTO `admin_tools` VALUES ('sections',9,'Sections','Sections','edit_sections','edit_sections',0);
INSERT INTO `admin_tools` VALUES ('special',10,'Special Pages','Special Pages','edit_special','edit_special',0);
INSERT INTO `admin_tools` VALUES ('boxes',11,'Boxes','Boxes','edit_boxes','edit_boxes',0);
INSERT INTO `admin_tools` VALUES ('groups',12,'Groups','Groups','edit_groups','edit_groups',0);
INSERT INTO `admin_tools` VALUES ('rdf',13,'RDF Feeds','RDF Feeds','rdf_admin','edit_rdfs',0);
INSERT INTO `admin_tools` VALUES ('cron',14,'Cron','Cron','cron_admin','edit_cron',0);
INSERT INTO `admin_tools` VALUES ('ads',15,'Advertising','Advertising','ad_admin','ad_admin_choice',0);
INSERT INTO `admin_tools` VALUES ('ops',16,'Ops','Ops','edit_ops','edit_ops',0);
INSERT INTO `admin_tools` VALUES ('hooks',18,'Hooks','Hooks','edit_hooks','edit_hooks',0);
INSERT INTO `admin_tools` VALUES ('log',19,'Log','Log','view_log','view_log',0);
INSERT INTO `admin_tools` VALUES ('archivelist',3,'Stories','Archived Story List','story_list','list_archive',0);
INSERT INTO `admin_tools` VALUES ('subscriptions',17,'Subscriptions','Subscriptions','subscription_admin','sub_admin',0);
INSERT INTO `admin_tools` VALUES ('macros',20,'Macros','Macros','edit_macros','edit_macros',0);
INSERT INTO `admin_tools` VALUES ('search',50,'Search Admin Tools','Search Admin Tools','admin_search','admin_search',1);
INSERT INTO `admin_tools` VALUES ('prefs',21,'User Preferences','User Preferences','edit_prefs','edit_prefs',0);
INSERT INTO `admin_tools` VALUES ('calendar',22,'Events and Calendars','Calendars','edit_calendars','admin_calendars',0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `admin_tools` ENABLE KEYS */;

--
-- Table structure for table `advertisers`
--

DROP TABLE IF EXISTS `advertisers`;
CREATE TABLE `advertisers` (
  `advertisor_id` int(11) NOT NULL default '0',
  `contact_name` varchar(255) NOT NULL default '',
  `contact_phone` varchar(20) default NULL,
  `company_name` varchar(255) NOT NULL default '',
  `snail_mail` varchar(255) default NULL,
  PRIMARY KEY  (`advertisor_id`)
) TYPE=MyISAM;

--
-- Dumping data for table `advertisers`
--


/*!40000 ALTER TABLE `advertisers` DISABLE KEYS */;
LOCK TABLES `advertisers` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `advertisers` ENABLE KEYS */;

--
-- Table structure for table `blocks`
--

DROP TABLE IF EXISTS `blocks`;
CREATE TABLE `blocks` (
  `bid` varchar(30) NOT NULL default '',
  `block` text,
  `aid` varchar(20) default NULL,
  `description` text,
  `category` varchar(128) NOT NULL default 'general',
  `theme` varchar(32) NOT NULL default 'default',
  `language` varchar(10) NOT NULL default 'en',
  PRIMARY KEY  (`bid`,`theme`,`language`)
) TYPE=MyISAM;

--
-- Dumping data for table `blocks`
--


/*!40000 ALTER TABLE `blocks` DISABLE KEYS */;
LOCK TABLES `blocks` WRITE;
INSERT INTO `blocks` VALUES ('footer','<DIV id=\"footer\">\r\n<P>\r\n<A HREF=\"http://scoop.kuro5hin.org\"><IMG SRC=\"%%imagedir%%/new_powered.gif\" ALT=\"Powered by Scoop\" BORDER=0></A></P>\r\n\r\n<FORM NAME=\"Search\" ACTION=\"%%rootdir%%\" METHOD=\"POST\">\r\n  <INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"search\">\r\n  <INPUT TYPE=\"text\" SIZE=20 NAME=\"string\"><INPUT TYPE=\"submit\" VALUE=\"Search\">\r\n</FORM> \r\n\r\n<P>%%smallfont%%All trademarks and copyrights on this page are owned by their respective companies.  Comments are owned by the Poster. The Rest © 2004 The Management \r\n%%smallfont_end%%</P>\r\n</DIV>','1','<P>This block is used at the bottom of each page. It should be fairly self-contained HTML, and contain any copyright notices and badges you want displayed at the bottom of all pages. This block has no special keys.</P>','General','default','en');
INSERT INTO `blocks` VALUES ('scoop_intro','<DIV class=\"box\">\r\n%%box_title_font%%Welcome to Scoop%%box_title_font_end%%\r\n\r\n<P>%%norm_font%%Holy Crap! You have your own <A HREF=\"http://scoop.kuro5hin.org\">Scoop</A> site now. Well, there\'s too many features for me to explain right here, but I can give you some places to look for help and whatnot.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%The main development site is at <A HREF=\"http://scoop.kuro5hin.org\">scoop.kuro5hin.org</A>. This contains links to all the other stuff, so poke around a little.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%For immediate help and assistance from the Scoop code monkeys, join the <A HREF=\"http://lists.kuro5hin.org/mailman/listinfo/scoop-help\">scoop-help mailing list</A>. This is practically a requirement for a pleasant Scoop administrative experience, as Scoop is rather complicated and it isn\'t always obvious where to find things.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%To help figure things out, there is a <A\r\nHREF=\"http://scoop.kuro5hin.org/guide/\">Scoop Admin Guide</A> which can\r\nhopefully answer most of your questions. Look in the doc/ directory of your\r\nScoop install for another copy of the admin guide.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Other things of note:%%norm_font_end%%</P>\r\n\r\n<UL>\r\n<LI>%%norm_font%%Many Scoop developers can often be found on IRC, channel #scoop at irc.slashnet.org.%%norm_font_end%%</LI>\r\n<LI>%%norm_font%%The latest code is always <A HREF=\"http://scoop.versionhost.com/viewcvs.cgi/\">in CVS</A> (username and password are both \"anonymous\")%%norm_font_end%%</LI>\r\n<LI>%%norm_font%%You can look at a convenient <A HREF=\"http://scoop.kuro5hin.org/special/sites\">list of other Scoop sites</A> to see what folks are doing with it%%norm_font_end%%</LI>\r\n</UL>\r\n</DIV>\r\n','1','<P>This block contains introductory information and is displayed in the left column of the front page when you first install Scoop. There is useful information on where to get help in this block, so make a note of it before deleting. This block should not be displayed on a live site, because its content is of no interest except to the administrator.</P>','General','default','en');
INSERT INTO `blocks` VALUES ('index_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n  <TR>\r\n    <!-- Left info column -->\r\n    <TD VALIGN=\"top\" WIDTH=\"20%\" HEIGHT=20>\r\n      <!-- About Scoop -->\r\n      %%scoop_intro%%\r\n      <!-- X About Scoop -->\r\n    </TD>\r\n    <!-- X Left info column -->\r\n\r\n    <!-- Center content section -->\r\n    <TD VALIGN=\"top\" width=\"55%\">\r\n      %%BOX,section_title%%\r\n      %%CONTENT%%\r\n    </TD>\r\n    <!-- X center content section -->\r\n\r\n    <!-- Right boxes column -->\r\n    <TD VALIGN=\"top\" width=\"25%\">\r\n        \r\n      %%BOX,main_menu%%\r\n      %%BOX,ad_box%%\r\n      %%BOX,user_box%%\r\n      %%BOX,rdf_feeds%%\r\n      %%BOX,hotlist_box%%\r\n      %%BOX,admin_tools%%\r\n      %%BOX,poll_box%%\r\n      %%BOX,older_list_box%%\r\n\r\n    </TD>\r\n    <!-- X Right boxes column -->\r\n\r\n  </TR>        \r\n  <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n</HTML>\r\n','1','<P>This block is used to build the front and section story index pages. It must be a full HTML page; dynamic content is added through the use of special keys. The special keys recognised are:</p>\r\n<DL>\r\n <DT>subtitle</dt>\r\n  <DD>This is replaced with the display name of the section being displayed.</dd>\r\n <DT>CONTENT</dt>\r\n  <DD>This is replaced with the story summaries for all of the stories that should be displayed on this page. It is built using the block <B>story_summary</b> once for each story displayed.</dd>\r\n</dl>\r\n','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('header','<!-- header table -->\r\n<DIV id=\"header\">\r\n%%section_links%%\r\n<A href=\"%%rootdir%%/\"><IMG SRC=\"%%imagedir%%/small_logo.jpg\" BORDER=0 ALT=\"Scoop -- the free news and discussion system\"></A>\r\n</DIV>\r\n<!-- X header table -->\r\n%%dynamicmode_iframe%%','1','<P>This block is used at the top of each page. It should be fairly self-contained HTML, and contain any site-wide navigation you want displayed at the top of all pages. This block has one special key; dynamicmode_iframe is replaced with an IFRAME tag on pages displaying dynamic comments, and with nothing otherwise.</P>','General','default','en');
INSERT INTO `blocks` VALUES ('comment','<!-- start comment -->\r\n<DIV class=\"commenthead\">\r\n<A NAME=\"%%cid%%\">%%norm_font%%%%new%% <B>%%subject%%</B></A>\r\n%%rating_format%% (<A CLASS=\"light\" HREF=\"%%rootdir%%/comments/%%sid%%/%%cid%%#%%cid%%\">#%%cid%%</A>)%%norm_font_end%% <BR>%%norm_font%%by %%name%% %%email%% on %%date%%\r\n<BR>%%user_info%%%%edit_user%% %%url%%%%norm_font_end%%\r\n</DIV>\r\n\r\n<DIV class=\"commentbody\">\r\n%%norm_font%%%%comment%%\r\n<BR>%%sig%%\r\n<BR>%%actions%%%%norm_font_end%%\r\n</DIV>\r\n%%replies%%\r\n<!-- end comment -->\r\n','1','<P>This block is used to format each topical comment attached to a story or poll.  It is not used directly in any block, but is called repeatedly in the code, once for each topical comment displayed.  (Editorial comments use the block <B>moderation_comment</B>).  This should be a self-contained chunk of HTML code that can be nested arbitrarily deep.  The special keys recognised are:</P>\n<DL>\n <DT>uid</DT>\n  <DD>The numeric user ID of the comment poster</DD>\n <DT>edit_user</DT>\n  <DD>The edit user link, only displayed if the user viewing the page has the perm <B>edit_user</B>.</DD>\n <DT>name</DT>\n  <DD>The nickname of the comment poster</DD>\n <DT>date</DT>\n  <DD>A formatted time/date string</DD>\n <DT>subject</DT>\n  <DD>The subject of the comment</DD>\n <DT>new</DT>\n  <DD>The contents of the block <B>new_comment_marker</B>, if the comment is not yet marked as read for the user viewing the comment.  Use this, not new_comment_marker, in this block.</DD>\n <DT>member</DT>\n  <DD>The contents of the block <B>mark_(groupname)</B>, if it exists for the poster\'s group</DD>\n <DT>sig</DT>\n  <DD>The user\'s signature, if one is set.</DD>\n <DT>rating_format</DT>\n  <DD>If ratings are turned off, or the user chooses not to see ratings, this is blanked; if ratings should be displayed, this is replaced with the contents of the block <B>rating_format</B> which may use the special keys <B>score</B> and <B>num_ratings</B> to display the current ratings.</DD>\n <DT>comment</DT>\n  <DD>The body of the comment</DD>\n <DT>cid</DT>\n  <DD>The comment ID. This plus the sid uniquely identifies each comment.</DD>\n <DT>actions</DT>\n  <DD>The parent, reply, delete, toggle, and dynamic mode expand and collapse links; each part according to permissions.</DD>\n <DT>user_info</DT>\n  <DD>A link to the comment poster\'s user info page.</DD>\n <DT>sid</DT>\n  <DD>The story ID.  This plus the cid uniquely identifies each comment; this alone uniquely identifies each story or poll.</DD>\n <DT>score</DT>\n  <DD>The comment\'s current score, an average of all the ratings.</DD>\n <DT>num_ratings</DT>\n  <DD>The number of ratings given to the comment.</DD>\n <DT>email</DT>\n  <DD>The user\'s \"fake email\" from their user preferences in a mailto: link, if present</DD>\n <DT>url</DT>\n  <DD>The user\'s homepage from their user preferences in a link, if present</DD>\n <DT>replies</DT>\n  <DD>All comment replies.  If in threaded or minimal, this is formatted as just the subject; if in nested, this is formatted as the full comment.</DD>\n</DL>','Comments','default','en');
INSERT INTO `blocks` VALUES ('admin_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n  <!-- Main page block -->\r\n  <TR>\r\n		\r\n    <!-- Center content section -->\r\n    <TD VALIGN=\"top\" width=\"72%\">\r\n      %%CONTENT%%\r\n    </TD>\r\n    <!-- X center content section -->\r\n		\r\n    <!-- Right boxes column -->\r\n    <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n\r\n      %%BOX,main_menu%%\r\n      %%BOX,hotlist_box%%\r\n      %%BOX,user_box%%\r\n      %%BOX,admin_tools%%\r\n		\r\n    </TD>\r\n    <!-- X Right boxes column -->\r\n  </TR>\r\n  <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n','1','This block is used to build most pages on the site.  It must be a full HTML page; dynamic content is added through the use of special keys.  The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n  <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>CONTENT</DT>\n  <DD>This is replaced with any other content specific to the page being requested.  It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.</P>\n<P>This block is used to create the Admin Tools pages, including the Blocks Admin Tool, so be very careful when changing it.  If you break this block, you will not be able to use any of the Admin Tools anymore and will not be able to fix it without going directly to the database.</P>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('story_info','<!-- Story info -->\r\n<DIV class=\"story_info\">\r\n  %%smallfont%%%%story_info%%%%smallfont_end%%\r\n</DIV>\r\n<!-- X Story info -->\r\n\r\n','1','<P>This block displays information about the story and links to some of the things you can do. It recognizes one special key, story_info, which is replaced with the story name, number and type of comments, and the \'post a comment\' and \'edit\' links as permissions allow.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_summary','<DIV class=\"story_summary\">\r\n<DIV class=\"story_title\"><H2>%%title%%</H2>\r\n%%norm_font%%%%hotlist%%%%norm_font_end%%\r\n<BR>%%topic_img%%</DIV>\r\n\r\n<P>%%smallfont%%By %%info%%, Section %%section_link%%\r\n<BR>Posted on %%time%%\r\n%%tags%%%%smallfont_end%%</P>\r\n\r\n<DIV class=\"introtext\">\r\n%%norm_font%%%%introtext%%%%norm_font_end%%\r\n</DIV>\r\n<P>%%norm_font%%%%stats%% %%readmore%%%%norm_font_end%%</P>\r\n</DIV>','1','<P>This block is used to format the story headlines and introtext, both on the index pages and the story pages. It should be a self-contained bit of HTML that lays out the story\'s information. The following special keys are recognized:</P>\n<DL>\n <DT>info</DT>\n  <DD>The author\'s name and the story\'s \"department\" (if used)</DD>\n <DT>title</DT>\n  <DD>The story\'s title</DD>\n <DT>introtext</DT>\n  <DD>The formatted contents of the story\'s introtext field</DD>\n <DT>hotlist</DT>\n  <DD>The link to either add or remove the story to the user\'s hotlist. Blank for anonymous users and stories that haven\'t been published yet.</DD>\n <DT>topic_img</DT>\n  <DD>The topic image, linked to the search results for that topic.</DD>\n <DT>topic_text</DT>\n  <DD>The alt text for the topic image as a text link, linked to the search results for that topic.</DD>\n <DT>time</DT>\n  <DD>The localized time the story was posted.</DD>\n <DT>sid</DT>\n  <DD>The story ID; can be used in custom links.</DD>\n <DT>section_icon</DT>\n  <DD>The file name of the section icon; can be used in an IMG tag to display an icon.</DD>\n <DT>section_title</DT>\n  <DD>The title of the section.</DD>\n <DT>aid</DT>\n  <DD>The nickname of the story author</DD>\n <DT>section</DT>\n  <DD>The title of the section.</DD>\n <DT>new</DT>\n  <DD>The new story marker; displays the contents of the block <B>new_story_marker</B> if the logged-in user has not yet read the story, otherwise blank.</DD>\n <DT>readmore</DT>\n  <DD>The link to the full story, drawing on either the block <B>readmore_txt</B> or <B>no_body_txt</B> as appropriate. Also the link to edit the story, if the user has the appropriate perms.</DD>\n <DT>stats</DT>\n  <DD>The number of comments and unread comments, and the number of words in the story.</DD>\n <DT>section_link</DT>\n  <DD>The section title as a link to the section index page</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('box','<DIV class=\"box\">\r\n%%box_title_font%%%%title%%%%box_title_font_end%%\r\n%%smallfont%%\r\n%%content%%\r\n%%smallfont_end%%\r\n</DIV>','1','<P>This block is used to provide a container for box output, and is not used directly in the page templates.  It should be self-contained HTML, and provide the frame seen around the boxes in the sidebar.  The special keys recognised are:</P>\n<DL>\n <DT>title</DT>\n  <DD>The title of the box; if the box code returns a value for the title, that is used, otherwise the title field set in the Boxes Admin Tool is used</DD>\n <DT>content</DT>\n  <DD>The main body of the box.  This is the only thing the box code must return; if the box returns nothing or an empty string, the entire box (and its template) is not displayed at all</DD>\n <DT>bid</DT>\n  <DD>The internal name for the box.</DD>\n</DL>','Box Templates','default','en');
INSERT INTO `blocks` VALUES ('submission_message','<P><FONT =\"+1\">Thank you for your submission. This is a community-edited site, so hopefully your fellow readers will see fit to post your story. Good Luck!</FONT></P>','1','<P>This block is displayed below the story body when it has been submitted to the queue. It should be self-contained HTML and should explain what will happen to the user\'s story now that it has been submitted.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('submission_guidelines','<P>Thank you for taking the time to submit a story!</P>\r\n<P>Here are some general guidelines for new stories:</P>\r\n<UL>\r\n<LI>Pick the topic carefully! Try your best to match the topic with the story you\'re submitting.</LI>\r\n<LI>Only the html tags listed are allowed in story text. No HTML is allowed in \"title\" or \"dept.\"</LI>\r\n<LI>You must preview at least once. Please read over your story carefully. <LI>Check all URLS!</LI>\r\n<LI>Check all facts! :-)</LI>\r\n<LI>This site is community-edited (mostly), so don\'t whine to the admins if your story doesn\'t get posted. If you\'re logged in, you\'ll see a \"Moderate Submissions\" link to the right. This is how you decide what gets posted here! Use it!</LI>\r\n</UL>\r\n<P>Now post away!</P>','1','<P>This block is displayed above the story submission form. It should be self-contained HTML and should explain the site\'s submission guidelines. Keep in mind that the majority of people will at most skim this when going to post a story, so put the most important points up top.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('moderate_head','<P>%%norm_font%%Current score:<B>%%score%%</B><BR>\r\nTotal votes: <B>%%votes%%</B></FONT></P>\r\n','1','<P>This block is used at the top of the story moderation form, after the user has voted on a story in the queue. It should be self-contained HTML, and summarize the story\'s current standing in the queue. The special keys recognized are:</P>\n<DL>\n <DT>score</DT>\n  <DD>The story\'s current score.</DD>\n <DT>votes</DT>\n  <DD>The total number of votes cast.</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('moderation_comment','<!-- start comment -->\r\n<DIV class=\"editorialhead\">\r\n<A NAME=\"%%cid%%\">%%norm_font%%%%new%% <B>%%subject%%</B></A> %%rating_format%% (<A CLASS=\"light\" HREF=\"%%rootdir%%/comments/%%sid%%/%%cid%%#%%cid%%\">#%%cid%%</A>)%%norm_font_end%% \r\n<BR>%%norm_font%%by %%name%% %%email%% on %%date%%\r\n<BR>%%user_info%%%%edit_user%% %%url%%%%norm_font_end%%\r\n</DIV>\r\n\r\n<DIV class=\"commentbody\">\r\n%%norm_font%%%%comment%%\r\n<BR>%%sig%%\r\n<BR>%%actions%%%%norm_font_end%%\r\n</DIV>\r\n%%replies%%\r\n<!-- end comment -->\r\n\r\n','1','<P>This block is used to format each editorial comment attached to a story or poll.  It is not used directly in any block, but is called repeatedly in the code, once for each editorial comment displayed.  (Topical comments use the block <B>comment</B>).  This should be a self-contained chunk of HTML code that can be nested arbitrarily deep.  The special keys recognised are:</P>\n<DL>\n <DT>uid</DT>\n  <DD>The numeric user ID of the comment poster</DD>\n <DT>edit_user</DT>\n  <DD>The edit user link, only displayed if the user viewing the page has the perm <B>edit_user</B>.</DD>\n <DT>name</DT>\n  <DD>The nickname of the comment poster</DD>\n <DT>date</DT>\n  <DD>A formatted time/date string</DD>\n <DT>subject</DT>\n  <DD>The subject of the comment</DD>\n <DT>new</DT>\n  <DD>The contents of the block <B>new_comment_marker</B>, if the comment is not yet marked as read for the user viewing the comment.  Use this, not new_comment_marker, in this block.</DD>\n <DT>member</DT>\n  <DD>The contents of the block <B>mark_(groupname)</B>, if it exists for the poster\'s group</DD>\n <DT>sig</DT>\n  <DD>The user\'s signature, if one is set.</DD>\n <DT>rating_format</DT>\n  <DD>If ratings are turned off, or the user chooses not to see ratings, this is blanked; if ratings should be displayed, this is replaced with the contents of the block <B>rating_format</B> which may use the special keys <B>score</B> and <B>num_ratings</B> to display the current ratings.</DD>\n <DT>comment</DT>\n  <DD>The body of the comment</DD>\n <DT>cid</DT>\n  <DD>The comment ID. This plus the sid uniquely identifies each comment.</DD>\n <DT>actions</DT>\n  <DD>The parent, reply, delete, toggle, and dynamic mode expand and collapse links; each part according to permissions.</DD>\n <DT>user_info</DT>\n  <DD>A link to the comment poster\'s user info page.</DD>\n <DT>sid</DT>\n  <DD>The story ID.  This plus the cid uniquely identifies each comment; this alone uniquely identifies each story or poll.</DD>\n <DT>score</DT>\n  <DD>The comment\'s current score, an average of all the ratings.</DD>\n <DT>num_ratings</DT>\n  <DD>The number of ratings given to the comment.</DD>\n <DT>email</DT>\n  <DD>The user\'s \"fake email\" from their user preferences in a mailto: link, if present</DD>\n <DT>url</DT>\n  <DD>The user\'s homepage from their user preferences in a link, if present</DD>\n <DT>replies</DT>\n  <DD>All comment replies.  If in threaded or minimal, this is formatted as just the subject; if in nested, this is formatted as the full comment.</DD>\n</DL>','Comments','default','en');
INSERT INTO `blocks` VALUES ('error_font','<FONT COLOR=\"#FF0000\">','1','','Fonts','default','en');
INSERT INTO `blocks` VALUES ('error_font_end','</FONT>','1','','Fonts','default','en');
INSERT INTO `blocks` VALUES ('commentdisclaimer','Trolling is <B>not</B> tolerated here. Any comment may be \r\ndeleted by a site admin, and all trolls <B>will</B> be \r\ndeleted. This is fair warning. If you don\'t know what \r\ntrolling is, then you\'re probably not about to do it, so \r\ndon\'t worry. :-)','1','<P>This block is displayed just above the comment posting form.  Put whatever message or warning you want displayed every time somebody posts a comment.  This should be self-contained HTML.  There are no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('login_box','<P>%%LOGIN_ERROR%%</P>\r\n<P>%%norm_font%%<B><A CLASS=\"light\" HREF=\"%%rootdir%%/newuser\">Make a new account</A></B>\r\n%%norm_font_end%%</P>\r\n\r\n<DIV class=\"loginform\"><P><FORM NAME=\"login\" ACTION=\"\" METHOD=\"post\">\r\n%%smallfont%%Username: <INPUT TYPE=\"text\" SIZE=12 NAME=\"uname\">\r\n<BR>Password: <INPUT TYPE=\"password\" SIZE=12 NAME=\"pass\">\r\n<BR><INPUT TYPE=\"submit\" NAME=\"login\" VALUE=\"Login\">\r\n<INPUT TYPE=\"submit\" NAME=\"mailpass\" VALUE=\"Mail Password\">%%smallfont_end%%\r\n</FORM></DIV>','1','<P>Despite its name, this is not a box template. It is an entire static box used to present the login form and new account link in place of the user box to a visitor who is not logged in. It should be self-contained HTML. It should contain the special key below:</P>\n<DL>\n <DT>LOGIN_ERROR</DT>\n  <DD>The error message generated from a failed login attempt. The text and format of the error messages are set in the blocks <B>login_error_message</B>, <B>login_mailed_message</B>, or <B>login_mail_failed</B>, depending on which error was encountered.</DD>\n</DL>\n<P>The block must contain the following form elements or the login process will not work properly:</P>\n<DL>\n <DT>FORM</DT>\n  <DD>The form should post to the root directory of your site.</DD>\n <DT>Username field</DT>\n  <DD>The text input field must be named \"uname\"</DD>\n <DT>Password field</DT>\n  <DD>The password input field must be named \"pass\"</DD>\n <DT>Login button</DT>\n  <DD>The button that submits both above fields for login must be named \"login\"</DD>\n <DT>Mail forgotton password button</DT>\n  <DD>The button that submits the username field for creation of a new password must be named \"mailpass\"</DD>\n</DL>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('hotlist_link','+Hotlist','1','<P>This block is used as the text of the link used to add a story to a user\'s personal hotlist. It is only displayed to users who are logged in and who have not hotlisted that story; the block <B>hotlist_remove_link</B> is displayed to users who have already hotlisted the story. This block has no special keys.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('hotlist_remove_link','-Hotlist','1','<P>This block is used as the text of the link used to remove a story from a user\'s personal hotlist. It is only displayed to users who are logged in and who have hotlisted that story; the block <B>hotlist_link</B> is displayed to users who have not hotlisted the story. This block has no special keys.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('poll_block','<!-- Poll Block -->\r\n%%title_font%%<B>%%title%%</B>%%title_font_end%%\r\n\r\n<TABLE>\r\n%%poll_image%%\r\n</TABLE>\r\n<!-- X Poll Block -->','1','<P>This block is used to format the poll results when displayed as the main content of the page. The following special keys are recognized:</P>\n<DL>\n <DT>title</DT>\n  <DD>The poll question</DD>\n <DT>poll_image</DT>\n  <DD>The poll results, with poll answers beside images representing the votes. The image file used is set in the block <B>poll_img</B>, and the width used to represent 100% is set in the block <B>poll_img_width</B>.</DD>\n</DL>','Polls','default','en');
INSERT INTO `blocks` VALUES ('dot','+','1','<P>This block is used whenever a dot or list item indicator of some sort is needed. It is called directly by other blocks, never assembled as part of a special key, and recognizes no special keys itself.</P>','General','default','en');
INSERT INTO `blocks` VALUES ('vote_console','<!-- vote_console -->\r\n<DIV id+\"vote_console\">\r\n  <P>%%norm_font%%Your vote really does count! <B>You</B> decide whether this story ever sees the light of the front page. So vote!%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%\r\n%%vote_form%%\r\n%%norm_font_end%%</P>\r\n</DIV>\r\n<!-- X vote_console -->\r\n','1','<P>This block is displayed below the story body for stories still in the voting queue. It should be self-contained HTML and explain what the voting is for. The special key vote_form is replaced with the actual form.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('blank_box','<DIV class=\"blank_box\">%%content%%</DIV>','1','<P>This block is used to provide a container for box output, and is not used directly in the page templates.  It should be self-contained HTML, and provide a \"blank\" frame for the box output.  The special keys recognised are:</P>\n<DL>\n <DT>title</DT>\n  <DD>The title of the box; if the box code returns a value for the title, that is used, otherwise the title field set in the Boxes Admin Tool is used</DD>\n <DT>content</DT>\n  <DD>The main body of the box.  This is the only thing the box code must return; if the box returns nothing or an empty string, the entire box (and its template) is not displayed at all</DD>\n <DT>bid</DT>\n  <DD>The internal name for the box.</DD>\n</DL>','Box Templates','default','en');
INSERT INTO `blocks` VALUES ('story_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n%%dynamicmode_javascript%%\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n  <!-- Main page block -->\r\n  <TR>\r\n		\r\n    <!-- Center content section -->\r\n    <TD VALIGN=\"top\" width=\"75%\">\r\n      <!-- Story stuff -->\r\n      %%STORY%%\r\n      <!-- X story stuff -->\r\n    </TD>\r\n    <!-- X center content section -->\r\n		\r\n    <!-- Right boxes column -->\r\n    <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n      %%BOX,main_menu%%\r\n      %%BOX,user_box%%\r\n      %%BOX,hotlist_box%%\r\n      %%BOX,admin_tools%%\r\n      %%BOX,poll_box%%\r\n      %%BOX,related_links%%\r\n      %%BOX,mod_stats%%\r\n    </TD>\r\n    <!-- X Right boxes column -->\r\n  </TR>\r\n  <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n<!-- comments -->\r\n%%CONTENT%%\r\n%%BOX,tag_listing%%\r\n%%BOX,comment_controls%%\r\n%%COMMENTS%%\r\n%%BOX,comment_controls%%\r\n<!-- X comments -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n</HTML>\r\n','1','<P>This block is used to build the story and comment display pages.  It must be a full HTML page. The special keys recognised are:</P>\r\n<DL>\r\n <DT>subtitle</DT>\r\n  <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\r\n <DT>dynamicmode_javascript</DT>\r\n  <DD>This is replaced with javascript for the dynamic comment display if the page template is being used for comment display.</DD>\r\n <DT>STORY</DT>\r\n  <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\r\n <DT>CONTENT</DT>\r\n  <DD>This is replaced with any other content specific to the page being requested.  It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.</DD>\r\n</DL>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('attach_poll_message','poll:<br><br>\r\nPolls are not required, but if you want one, fill in a question and some answers.','1','<P>This block is displayed below the story submission form and above the attached poll submission form.  It should be self-contained HTML and should contain an explanation of polls attached to stories.  There are no special keys.</P>','Polls,Stories','default','en');
INSERT INTO `blocks` VALUES ('edit_story_form','<FORM NAME=\"editstory\" ACTION=\"%%rootdir%%/\" METHOD=\"POST\" enctype=\"multipart/form-data\">\r\n%%hidden_form_data%%\r\n<table width=\"100%\" border=0 cellpadding=\"8\" cellspacing=0>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%guidelines%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%all_buttons%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\">post&nbsp;to:</td>\r\n<td valign=\"top\">%%section_select%% %%topic_select%% %%postmode_select%%</td>\r\n</tr>\r\n%%edit_queue%%\r\n<tr>\r\n<td valign=\"top\">title:</td>\r\n<td valign=\"top\"><INPUT TYPE=\"text\" NAME=\"title\" VALUE=\"%%title%%\" SIZE=50><br>\r\n%%dept%%</td>\r\n</tr>\r\n%%notes%%\r\n<tr>\r\n<td valign=\"top\">intro:</td>\r\n<td valign=\"top\"><TEXTAREA NAME=\"introtext\" COLS=\"%%textarea_cols%%\" ROWS=\"%%textarea_rows%%\" WRAP=\"soft\">%%introtext%%</TEXTAREA></td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\">body:</td>\r\n<td valign=\"top\"><TEXTAREA NAME=\"bodytext\" COLS=\"%%textarea_cols%%\" ROWS=\"%%textarea_rows%%\" WRAP=\"soft\">%%bodytext%%</TEXTAREA></td>\r\n</tr>\r\n%%upload_page%%\r\n%%spellcheck%%\r\n%%tags%%\r\n<tr>\r\n<td></td>\r\n<td valign=\"top\">%%displaystatus_select%% %%commentstatus_select%% %%edit_category_select%%\r\n</td>\r\n</tr>\r\n%%time_update%%\r\n<tr>\r\n<td>%%poll_message%%</td>\r\n<td>%%poll_form%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%all_buttons%%</td>\r\n</tr>\r\n</table>\r\n</FORM>','1','The main form for submitting and editing stories. This one has a lot of permitted special keys. Here goes:\r\n\r\n<ul>\r\n<li> allowed_html_intro: the string for what html is allowed in intro. Optional.\r\n<li> allowed_html_body: likewise, for the body field\r\n<li> notes: Block \"story_edit_notes\" -- traditionally for the ED and UPDATE explanations\r\n<li> tid: Topic id of story\r\n<li> section: section id of story\r\n<li> parent: section id of parent section, if there is one\r\n<li> topic_select: The selector for topics. Generated internally based on perms and vars. REQUIRED -- it will be a hidden field if you\'re not using topics, but you must have it.\r\n<li> displaystatus_select: Selector for displaystatus. Generated based on perms\r\n<li> commentstatus_select: Obvious\r\n<li> edit_category_select: If you\'re using edit categories, this\'ll be the selector\r\n<li> postmode_select: Selector for posting mode, like \"front page\", \"editing\" etc\r\n<li> all_buttons: The set of currently allowed and relevant buttons. Very required.\r\n<li> aid: uid of author\r\n<li> hidden_form_data: various bits of hdden stuff for the form that scoop needs to track. Very required.\r\n<li> title: Text of the title -- use your own html form element, just include this for \"value\"\r\n<li> dept: Dept field, formatted by block \"story_edit_dept\". Included if show_dept is turned on\r\n<li> upload_page: Story upload form, if you\'re using that.\r\n<li> spellcheck: Spellcheck element, if used. Formatted in block story_edit_spellcheck\r\n<li> edit_queue: Post to edit queue element, if you\'re using that. Formatted in block story_edit_editqueue\r\n<li> time_update: Update timestamp to now button, if you have permission. Formatted in block story_edit_timeupdate, subject to perm \"story_time_update\"\r\n<li> update_txt: block story_edit_updatetxt\r\n<li> edit_txt: block story_edit_edittxt\r\n<li> textarea_cols: textarea columns, based on perfs and stuff\r\n<li> textarea_rows: textarea rows, likewise\r\n<li> poll_message: Poll into message, from attach_poll_message, if you\'re using polls\r\n<li> poll_form: Poll form, if you\'re using polls\r\n<li> introtext: introtext of the story\r\n<li> bodytext: body text of the story\r\n<li> guidelines: The block \"submission_guidelines\", included for user-level story submit\r\n</ul>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('default_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%dynamicmode_javascript%%\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n  <!-- Main page block -->\r\n  <TR>\r\n		\r\n    <!-- Center content section -->\r\n    <TD VALIGN=\"top\" width=\"72%\">\r\n      %%STORY%%\r\n      %%BOX,comment_controls%%\r\n      %%CONTENT%%\r\n      %%BOX,comment_controls%%\r\n    </TD>\r\n    <!-- X center content section -->\r\n		\r\n    <!-- Right boxes column -->\r\n    <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n\r\n      %%BOX,main_menu%%\r\n      %%BOX,hotlist_box%%\r\n      %%BOX,user_box%%\r\n      %%BOX,admin_tools%%\r\n		\r\n    </TD>\r\n    <!-- X Right boxes column -->\r\n  </TR>\r\n  <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n','1','<P>This block is used to build most pages on the site.  It must be a full HTML page; dynamic content is added through the use of special keys.  The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n  <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>dynamicmode_javascript</DT>\n  <DD>This is replaced with javascript for the dynamic comment display if the page template is being used for comment display.</DD>\n <DT>STORY</DT>\n  <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\n <DT>CONTENT</DT>\n  <DD>This is replaced with any other content specific to the page being requested.  It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.  This can be forms, comments, special pages, or custom content from your own boxes.</DD>\n</DL>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('submit_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n  <!-- Main page block -->\r\n  <TR>\r\n    <!-- Center content section -->\r\n    <TD VALIGN=\"top\" width=\"75%\">\r\n      %%STORY%%\r\n      %%CONTENT%%\r\n    </TD>\r\n    <!-- X center content section -->\r\n		\r\n    <!-- Right boxes column -->\r\n    <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n      %%BOX,main_menu%%\r\n      %%BOX,hotlist_box%%\r\n      %%BOX,user_box%%\r\n      %%BOX,admin_tools%%\r\n      %%BOX,poll_box%%\r\n    </TD>\r\n    <!-- X Right boxes column -->\r\n  </TR>\r\n  <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n</HTML>\r\n','1','<P>This block is the page template used to build the story and ad submission forms. It must be a full HTML page. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n  <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>STORY</DT>\n  <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\n <DT>CONTENT</DT>\n  <DD>This is replaced with any other content specific to the page being requested.  It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.</DD>\n</DL>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('story_body','<DIV class=\"story_body\">%%norm_font%%\r\n%%bodytext%%\r\n%%norm_font_end%%</DIV>\r\n','1','<P>This block is used to format the body (extended copy only) of a story. It should be self-contained HTML. It recognizes one special key, bodytext, which is replaced with the formatted contents of the extended copy field of the story.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('readmore_txt','Full Story','1','<P>This block is used as the text of the link leading to the full story and comments, when there is a story body. If there is no story body, the block <B>no_body_txt</B> is used instead.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('section_links','<DIV id=\"section_links\">\r\n%%norm_font%%  \r\n  <A HREF=\"%%rootdir%%/\">Front Page</A> \r\n  %%dot%%\r\n  <A HREF=\"%%rootdir%%/section/__all__\">Everything</A> \r\n  %%dot%%\r\n  <A HREF=\"%%rootdir%%/section/news\">News</A> \r\n  %%dot%%\r\n  <A HREF=\"%%rootdir%%/section/Diary\">Diaries</A>\r\n%%norm_font_end%%\r\n</DIV>','1','<P>This block contains the links to the different sections available on the site. It is typically displayed in the page header but can be used anywhere. Any sections that exist but aren\'t linked here are typically hard for visitors to find, so don\'t forget to update it when you change your sections.</P>','General','default','en');
INSERT INTO `blocks` VALUES ('diary_post_message','<FONT SIZE=\"+1\">Your new entry has been posted. Enjoy!</FONT>','1','<P>This block is displayed just underneath a user\'s diary when they have just posted it.  It should contain a message informing the user that their diary was successfully saved, and is otherwise free-form, self-contained HTML. There are no special keys.</P>','Diaries','default','en');
INSERT INTO `blocks` VALUES ('box_title_bg','#006699','1','<P>This block is used wherever a colour value is needed to set the colour of the sidebar box title bars.  It should be a hex colour value, including the #, such as #000000 for black.  There are no special keys.</P>','Colours','default','en');
INSERT INTO `blocks` VALUES ('comment_head_bg','#eeeeee','1','<P>This block is used wherever a colour value is needed to set the background colour of the comment header (which typically contains the subject and poster\'s information, but not the comment itself).  It should be a hex colour value, including the #, such as #000000 for black.  There are no special keys.</P>','Colours','default','en');
INSERT INTO `blocks` VALUES ('dept_font','<FONT FACE=\"arial, helvetica, sans-serif\" SIZE=2>','1','<P>This block is used to format the \"from the x department\" string attached to stories, if the variable <B>show_dept</B> is turned on.  It should be a complete opening font or text style indicator, such as a font or b tag. It must be properly closed by the contents of the block <B>dept_font_end</B>.  There are no special keys.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('no_body_txt','Comments >>','1','<P>This block is used as the text of the link leading to the full story and comments, when there is no story body, only an intro. If there is a story body, the block <B>readmore_txt</B> is used instead.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('sectiononlystory_bg','#eeeeee','1','<P>This block is used as a row background colour in the Story List Admin Tool, for those stories that are published to section only, including ad stories and user diaries. This should be a hex colour value including the #, such as #000000 for black.','Colours','default','en');
INSERT INTO `blocks` VALUES ('smallfont','<FONT FACE=\"arial, Helvetica, Sans-Serif\" SIZE=2>','1','<P>This block should be a complete opening FONT tag. It must match the closing tag set in the block <B>smallfont_end</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('smallfont_end','</FONT>','1','<P>This block should be a closing FONT tag, or otherwise close the tag opened in the block <B>smallfont</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('story_mod_bg','#EEEEEE','1','<P>This block is used as a row background colour in the story voting queue. It is applied to stories in the voting queue that the user has not yet voted on. It should be a hex colour value, including the #.</P>','Colours','default','en');
INSERT INTO `blocks` VALUES ('story_nav_bg','#EEEEEE','1','<P>This block is used as the background colour for the story navigation bar, which provides links to the next and previous stories at the bottom of the current story body. It should be a hex colour value, including the #.</P>','Colours','default','en');
INSERT INTO `blocks` VALUES ('submittedstory_bg','#c6dae4','1','<P>This block is used as a row background colour in the Story List Admin Tool and the moderation queue, for those stories that are in the voting queue awaiting votes. This should be a hex colour value including the #, such as #000000 for black.','Colours','default','en');
INSERT INTO `blocks` VALUES ('title_bgcolor','#EEEEEE','1','<P>This block is used anywhere a title bar needs a background (except in the sidebar boxes, which use <B>box_title_bg</B>). It should be a hex colour value, including the #.</P>','Colours','default','en');
INSERT INTO `blocks` VALUES ('undisplayedstory_bg','#c0c0c0','1','<P>This block is used as the background colour for a line in the Story List Admin Tool for stories that have been voted down in the queue or hidden by an admin. It should be a hex colour value, including the #.','Colours','default','en');
INSERT INTO `blocks` VALUES ('diary_guidelines','<P>Thank you for taking the time to submit a diary!</P>\r\n<P>There are no rules, you can post basically anything you want here. This is your spot to tell the rest of the community what\'s on your mind, or what\'s going on in your life, or just anything really.</P>\r\n<UL>\r\n<LI>Only the html tags listed are allowed in story text. No HTML is allowed in \"title\" or \"dept.\"</LI>\r\n<LI>You must preview at least once. Please read over your diary carefully.\r\n<LI>Unlike the rest of the site, this area is not subject to peer review, so don\'t fear the voting masses. Just tell us what\'s up with you.</LI>\r\n</UL>\r\n<P>Now post away!</P>','2','<P>This block is displayed above the story submission form. It should be self-contained HTML and should explain the site\'s submission guidelines. Keep in mind that the majority of people will at most skim this when going to post a story, so put the most important points up top.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('blank_template','<HTML>\r\n<HEAD>\r\n<TITLE></TITLE>\r\n</HEAD>\r\n<BODY>\r\n</BODY>\r\n</HTML>','1','<P>This block is a complete, blank HTML page. No header, footer, or CONTENT. It must be a complete HTML page. This template is used for commands which do not display pages, such as the logout or redirect ops.</P>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('empty_box','%%content%%','1','<P>This block is a box template that should have absolutely nothing but the content special key in it, so that the box output has no frame and will not mess up the formatting of whatever part of the page it\'s placed on. The special key content is replaced with the output of whichever box uses it as a wrapper.</P>','Box Templates','default','en');
INSERT INTO `blocks` VALUES ('new_comment_marker','<FONT COLOR=\"#FF0000\"><B>[new]</B></FONT>','1','<P>This block is inserted in the comment if the user has not yet read this comment, according to Scoop\'s read-tracking system. It replaces the special key <TT>|new|</TT> in the blocks <B>comment</B> and <B>moderation_comment</B>.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('submit_rdf_message','<P>Know of any good sites that syndicate their headlines, but aren\'t carried by this site yet? Well, most likely this is because the admins don\'t know about the site yet, or that they syndicate headlines with RDF. All it takes is for you to find a URL for the site where their RDF file is, and copy it to the form below. Once submitted, and admin will review it, and will either approve it or delete it.</P>','1','<P>This block is displayed just above the form used to submit an RDF file explaining what the form is for.</P>','RDF','default','en');
INSERT INTO `blocks` VALUES ('titled_box','<DIV class=\"titled_box\">\r\n%%box_title_font%%%%title%%%%box_title_font_end%%\r\n%%content%%\r\n</DIV>\r\n','1','<P>This block is used as a box template, and is not used directly from other blocks. It should be self-contained HTML and provide a box with a title bar. The following special keys are recognized:</P>\n<DL>\n <DT>title</DT>\n  <DD>The title of the box; either a value explicitly returned by the box code, or the text in the box title field if nothing is explicitly returned.</DD>\n <DT>content</DT>\n  <DD>The content of the box; the text that the box code returns after running.</DD>\n</DL>','Box Templates','default','en');
INSERT INTO `blocks` VALUES ('cron_template','<html>\r\n<head>\r\n<title>%%slogan%% %%%% Cron</title>\r\n</head>\r\n<body bgcolor=\"#FFFFFF\"><pre>%%CONTENT%%</pre></body>\r\n</html>','1','<P>This block is used to format Scoop\'s cron system output.  It parsed by run_cron.pl and should not be changed as neither users nor administrators ever use it directly.</P>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('digest_storyformat','\n%%title%% \n  By %%aid%%, %%time%% \n  Section: %%section%%, Topic: %%tid%% \n\n%%introtext%% \n\n%%url%%\n\n----\n','1','<P>This block is used to format each story summary in the story digest email sent to users who request it. This should be plain text, with no HTML formatting. Because this is an email and is not sent through the usual processing given an HTML page, the only keys that work at all are the special keys defined for this block. The following special keys are recognised:</P>\n<DL>\n <DT>sid</DT>\n  <DD>The story ID for the story being formatted. This is used in <TT>url</TT> (below) to create the full URL of the story and probably isn\'t needed on its own.</DD>\n <DT>tid</DT>\n  <DD>The \"alt text\" of the topic attached to the story.</DD>\n <DT>aid</DT>\n  <DD>The author\'s nickname.</DD>\n <DT>nick</DT>\n  <DD>The author\'s nickname.</DD>\n <DT>time</DT>\n  <DD>The time and date the story was posted on.</DD>\n <DT>title</DT>\n  <DD>The title of the story</DD>\n <DT>dept</DT>\n  <DD>The \"department\" of the story, if that feature is turned on in Site Controls (<B>show_dept</B>).</DD>\n <DT>introtext</DT>\n  <DD>The story summary; that part of the story that is displayed on the index page of the scoop site. HTML line breaks are converted to newlines, links have their URL displayed beside the link text, and all other HTML tags are stripped. The intro text is then wrapped to 75 columns.</DD>\n <DT>section</DT>\n  <DD>The title of the section the story is filed in.</DD>\n <DT>url</DT>\n  <DD>The full URL of the story, built from the site\'s base URL and the story\'s sid.</DD>\n</DL>\n','Story Digests','default','en');
INSERT INTO `blocks` VALUES ('digest_headerfooter','---------------------------------------------------------\nThis is the %%FREQUENCY%% digest for SITENAME.\nIf you have received this email in error, just reply to \nthis message and say that you got it in error.\nPlease mention that this email was sent for user number %%USERID%%.\n---------------------------------------------------------\n','1','<P>This block is displayed at the top and bottom of the story digest email sent to users who request it.  It should name the site and introduce the digest in a way suited for any frequency.  This should be plain text, with no HTML formatting.  If either of the blocks <B>digest_header</B> or <B>digest_footer</B> exist, they override this block for the email header and footer, respectively.  Because this is an email and is not sent through the usual processing given an HTML page, the only keys that work at all are the special keys defined for this block. The following special keys are recognised:</P>\n<DL>\n <DT>FREQUENCY</DT>\n  <DD>This key is replaced with the digest frequency requested by the user receiving the email, which may be daily, weekly, or monthly.</DD>\n <DT>USERID</DT>\n  <DD>The numeric user ID of the recipient of the digest</DD>\n <DT>NICKNAME</DT>\n  <DD>The nickname of the recipient of the digest</DD>\n</DL>','Story Digests','default','en');
INSERT INTO `blocks` VALUES ('next_page_link','<a class=\"light\" href=\"%%LINK%%\">%%norm_font%%Next %%maxstories%% &gt;&gt;%%norm_font_end%%</a>','1','<P>This block is the text of the link displayed at the bottom of the front and section index pages if there are more stories published earlier than those displayed. It should be self-contained HTML. The following special key is recognized:</P>\n<DL>\n <DT>maxstories</DT>\n  <DD>The value of the variable <B>maxstories</B>, or the user preference \"Number of story summaries to show\" if set.</DD>\n</DL>','General','default','en');
INSERT INTO `blocks` VALUES ('prev_page_link','<a class=\"light\" href=\"%%LINK%%\">%%norm_font%%&lt;&lt; Previous %%maxstories%%%%norm_font_end%%</a>','1','<P>This block is the text of the link displayed at the top and bottom of the front and section index pages if there are more stories published more recently than those displayed. It should be self-contained HTML. The following special key is recognized:</P>\n<DL>\n <DT>maxstories</DT>\n  <DD>The value of the variable <B>maxstories</B>, or the user preference \"Number of story summaries to show\" if set.</DD>\n</DL>','General','default','en');
INSERT INTO `blocks` VALUES ('subscribe','<p>You are not currently a paid member. Why not <a href=\"%%rootdir%%/subscribe\">become one</a>?</p>','1','<P>This block is displayed on a user\'s preferences page if they are not already subscribed, if they have the <B>allow_subscription</B> perm, and if the variable <B>use_subscriptions</B> is on. This should be a short note encouraging users to subscribe and should provide a link to the subscription purchase page. There are no special keys.</P>','Subscriptions','default','en');
INSERT INTO `blocks` VALUES ('story_separator','\n','1','<P>This block is placed between the <B>story_summary</B> and <B>story_body</B> blocks when building the story page. It can contain any HTML and is usually used when visual separation between the two parts of the story is wanted.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('spell_err','<font color=\"red\">','1','<P>This block is used to format misspelled words if the spellchecking system is installed and active. It should be a complete opening font tag or other formatting tag. It should match its closing tag set in the block <B>spell_err_end</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('spell_err_end','</font>','1','<P>This block is used to format misspelled words if the spellchecking system is installed and active. It should be a closing tag for whatever is in the block <B>spell_err</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('new_user_html','%%title_font%%Create New User Account%%title_font_end%%\r\n<H3><CENTER>%%error_font%%%%error%%%%error_font_end%%</CENTER></H3>\r\n\r\n<P>%%norm_font%%In order to create an account (which is free), fill out this form. You will receive an email containing your an account activation link, at the address you provide here. Click the link, and your account will be activated and logged in. It\'s that easy.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Why do you have to respond to the email? By requiring you to activate your account, we can make sure that the email address is valid. This makes it harder for malicious users to abuse the account creation system by creating an arbitrary number of accounts and spamming the site with stories or comments.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%The email address you enter here, so it <B>must</B> work. Do NOT enter a spam-protected or fake email address, or your account will not work.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%If you are concerned about privacy, this email does not have to be in any way traceable to you. We will never use the email you provide here for anything else, ever. All it needs to be is working, and accessible to you, at the time the account is created.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Now get started, and we hope you enjoy %%sitename%%!%%norm_font_end%%</P>\r\n\r\n<FORM NAME=\"adduser\" METHOD=\"post\" ACTION=\"%%rootdir%%/\">\r\n  <INPUT TYPE=\"hidden\" name=\"tool\" VALUE=\"writeuser\">\r\n  <INPUT TYPE=\"hidden\" name=\"op\" VALUE=\"newuser\">\r\n  <INPUT TYPE=\"hidden\" name=\"formkey\" VALUE=\"%%formkey%%\">\r\n\r\n<TABLE>\r\n  <TR>\r\n   <TD>%%norm_font%%Please enter your desired username:</TD>\r\n   <TD>%%norm_font%%<INPUT TYPE=\"text\" NAME=\"nickname\" SIZE=30 VALUE=\"%%uname%%\">%%norm_font_end%%</TD>\r\n  </TR>\r\n\r\n  <TR>\r\n   <TD COLSPAN=2>%%smallfont%%(Legal characters: a-z, A-Z, 0-9, space. Names may not start or end with a space, and may not contain more than one space in a row.)%%smallfont_end%%</TD>\r\n  </TR>\r\n\r\n  <TR>\r\n   <TD>%%norm_font%%and a working email (this will never be made public!):\r\n     <BR><B><FONT COLOR=\"#FF0000\">Check this for typos!</FONT></B>%%norm_font_end%%</TD>\r\n   <TD>%%norm_font%%<INPUT TYPE=\"text\" NAME=\"email\" VALUE=\"%%email%%\" SIZE=30>%%norm_font_end%%</TD>\r\n  </TR>\r\n\r\n%%BOX,signup_password%%\r\n\r\n  <tr>\r\n   <td colspan=2 align=\"right\">%%norm_font%%%%signup_prefs%%<br><input type=\"submit\" value=\"Create Account!\" size=\"30\" />%%norm_font_end%%</td>\r\n  </tr>\r\n</table>\r\n</form>\r\n','1','<P>This block contains the explanation of the account creation process as well as the form the user fills in to create an account. It should be reasonably self-contained.  It must contain the following form elements:</p>\r\n<DL>\r\n <DT>FORM</dt>\r\n  <DD>The form should post to your site\'s rootdir.</dd>\r\n <DT>op</dt>\r\n  <DD>This should be a hidden field with a value of \"newuser\".</dd>\r\n <DT>tool</dt>\r\n  <DD>This should be a hidden field with a value of \"writeuser\".</dd>\r\n <DT>formkey</dt>\r\n  <DD>This should be a hidden field with a value of \"|formkey|\" (see special keys, below).</dd>\r\n <DT>nickname</dt>\r\n  <DD>This should be a text field with a default value of \"|uname|\" (see special keys, below).</dd>\r\n <DT>email</dt>\r\n  <DD>This should be a text field with a default value of \"|email|\" (see special keys, below).</dd>\r\n <DT>button</dt>\r\n  <DD>A submit button to send the fields in.</dd>\r\n</dl>\r\n<P>The following special keys are recognized:</p>\r\n<DL>\r\n <DT>error</dt>\r\n  <DD>Any error messages (such as invalid characters in the nickname field).</dd>\r\n <DT>uname</dt>\r\n  <DD>Usually blank; if there is an error with the email field, this is the nickname entered by the user.</dd>\r\n <DT>email</dt>\r\n  <DD>Usually blank; if there is an error with the nickname field, this is the email address entered by the user.</dd>\r\n <DT>formkey</dt>\r\n  <DD>A code-generated formkey used to hinder scripts trying to make large numbers of accounts.</dd>\r\n</dl>','General','default','en');
INSERT INTO `blocks` VALUES ('new_advertiser_html','%%title_font%%Upgrade to an Advertiser Account%%title_font_end%%\r\n<H3><CENTER>%%error_font%%%%error%%%%error_font_end%%</CENTER></H3>\r\n\r\n<P>%%norm_font%%Since you have expressed an interest in advertising on this site, I\'ll be needing a bit more information about you, for billing purposes.%%norm_font_end%%</P>\r\n<P>%%norm_font%% %%advertising_account_disclaimer%% %%norm_font_end%%</P>\r\n\r\n<form name=\"adduser\" method=\"post\" action=\"%%rootdir%%\">\r\n<input type=\"hidden\" name=\"tool\" value=\"writeuser\">\r\n<input type=\"hidden\" name=\"op\" value=\"newuser\">\r\n<input type=\"hidden\" name=\"formkey\" value=\"%%formkey%%\">\r\n<input type=\"hidden\" name=\"advertiser\" value=\"1\">\r\n\r\n<TABLE>\r\n <TR>\r\n  <TD align=\"right\">%%norm_font%%Your Name:%%norm_font_end%%</TD>\r\n  <TD align=\"left\"><input type=\"text\" name=\"realname\" value=\"%%yourname%%\" size=\"30\"></TD>\r\n </TR>\r\n <TR>\r\n  <TD align=\"right\">%%norm_font%%Business name:%%norm_font_end%%</TD>\r\n  <TD align=\"left\"><input type=\"text\" name=\"bizname\" value=\"%%bizname%%\" size=\"40\"></TD>\r\n </TR>\r\n <TR>\r\n  <TD align=\"right\">%%norm_font%%Contact phone number:%%norm_font_end%%</TD>\r\n  <TD align=\"left\"><input type=\"text\" name=\"bizphone\" value=\"%%bizphone%%\" size=\"12\"></TD>\r\n </TR>\r\n <TR>\r\n  <TD align=\"right\">%%norm_font%%Mailing Address:%%norm_font_end%%</TD>\r\n  <TD align=\"left\"><textarea cols=\"30\" rows=\"5\" name=\"snailmail\" value=\"%%snailmail%%\"></textarea></TD>\r\n </TR>\r\n <tr>\r\n  <td colspan=2 align=\"right\">%%norm_font%%<input type=\"submit\" value=\"Create Account!\" size=\"30\">\r\n%%norm_font_end%%</td>\r\n </tr>\r\n</table>\r\n</form>','1','<P>This block is displayed on the account signup page if the user is creating an advertising account. This is yet another unimplemented ad feature. Advertising accounts are only partly implemented; for now, there is no automated way to collect extra information from advertisers.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('advertising_account_disclaimer','<P>Please remember the following with your new advertising account.</P>\r\n\r\n<P><b>Any stories posted to this site for purely advertising purposes will void your contract with us.</b> The articles and diaries on this site are <b>not for advertising purposes</b>.  This account entitles you to submit ads for posting in specified places on the page only.  If you are caught abusing this account, you\'re ads will be disabled, no money will be refunded, and your account will be disabled.  If you have any questions about this send mail to %%local_email%%.\r\n</P>\r\n\r\n<P>Thank you for your understanding.</P>','1','<P>This block is displayed in the form that collects extra information from advertisers when they create an \"advertiser account\".  It is only relevant if the variable <B>req_extra_advertiser_info</B> is set to 1.  It should contain whatever extra terms your site requires of an advertising account, if they are distinguished from regular accounts.  There are no special keys.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('ad_test_template','<HTML>\r\n<HEAD>\r\n<TITLE>%%slogan%%</TITLE>\r\n</HEAD>\r\n<BODY BGCOLOR=\"#FFFFFF\">%%BOX,show_ad,fromurl%%</body>\r\n</html>','1','<P>This block is used to display a single ad for preview purposes without counting impressions.  It must be a complete HTML page, and should contain a call to the <B>show_ad</B> box.  There are no special keys.</P>','Ads,Page Templates','default','en');
INSERT INTO `blocks` VALUES ('text_ad_template','<DIV class=\"advert\">\r\n<a href=\"%%REDIRECT_URL%%?to_url=%%LINK_URL%%\" title=\"%%LINK_URL%%\" %%TARGET%%>%%norm_font%%%%TITLE%%%%norm_font_end%%</a>\r\n<BR>%%norm_font%%%%TEXT1%%%%norm_font_end%%\r\n</DIV>','1','<P>This block is used to provide the layout for the simple text ad type. It should be self-contained HTML. The special keys recognized are:</P>\n<DL>\n <DT>FILE_PATH</DT>\n  <DD>The path to the image file used in the ad. This does not include the value set in the variable ad_server_url.</DD>\n <DT>TEXT1</DT>\n  <DD>The text the ad sponsor entered in the text1 field.</DD>\n <DT>TEXT2</DT>\n  <DD>The text the ad sponsor entered in the text2 field.</DD>\n <DT>TITLE</DT>\n  <DD>The text the ad sponsor entered in the title field.</DD>\n <DT>LINK_URL</DT>\n  <DD>The URL of the page being advertised.</DD>\n <DT>SID</DT>\n  <DD>The story ID associated with the ad, if ad comments are active. See the Scoop Admin Guide for details on setting up ad comments.</DD>\n <DT>REDIRECT_URL</DT>\n  <DD>The URL used in the actual link of the ad, for clickthrough counting. The URL of the page advertised is not required in the actual link, but you may put it there in a dummy cgi variable (such as url=) so users know where they\'re going.</DD>\n</DL><P>The special keys used in the ad template become the required fields for the ad, as well as the only fields permitted.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('donate_email_success','Thank you for your donation of $%%AMOUNT%%.',NULL,'<P>This block is an email sent to a user who has made a donation. It should be plain text and indicate that the donation has been received. Because this is an email and is not sent through the usual processing given an HTML page, no keys except the following special keys will work.</P>\n<DL>\n <DT>AMOUNT</DT>\n  <DD>The amount donated.</DD>\n</DL>','Emails','default','en');
INSERT INTO `blocks` VALUES ('next_previous_links','<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n<tr>\n<td>%%PREVIOUS_LINK%%</td>\n<td align=\"right\">%%NEXT_LINK%%</td>\n</tr>\n</table>',NULL,'<P>This block is used to create the next and previous page links at the top and bottom of the section index pages.</P>\nFIXME: not implemented correctly. Links won\'t disappear if not needed. Leave blank for now and it\'ll work.','General','default','en');
INSERT INTO `blocks` VALUES ('ad_step1_rules','<!-- ad_step1_rules.  Do not take out the |NEXT_LINK| text, as it will be replaced with a button to get the user to the next step in the process -->\r\n\r\n%%title_font%% Rules for Submitting Ads %%title_font_end%%\r\n\r\n%%norm_font%%\r\n<ul>\r\n<li>These are the rules for submitting ads on this Scoop site.\r\n</ul>\r\n%%norm_font_end%%\r\n<P>%%norm_font%% %%NEXT_LINK%% %%norm_font_end%%</P>','1','<P>This block is displayed as the first step when a user starts submitting ads.  It should be self-contained HTML, and should explain all of the rules, terms, and conditions for ad submission before the actual submission process begins.</P>\n<P>There is one special key: NEXT_LINK which is the \"I agree\" button.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('error_template','<h1>%%ERROR_TYPE%%</h1>\r\n<p>\r\n<b>Time:</b> %%thetime%%<br>\r\n<b>Package:</b> %%package%%<br>\r\n<b>File:</b> %%file%% <br>\r\n<b>Line:</b> %%line%% <br>\r\n<b>Additional Messages:</b> %%ERROR_MSG%%\r\n<b>Var Dump:</b><br>\r\n%%VARDUMP%%\r\n</p>','1','<P>The HTML output generated by Scoop if it runs into certain types of errors. Don\'t change this, except maybe to put your email address in it and ask the user to send you a copy of the text in the page. Everything on this page is a special key.</P>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('ad_confirm_text','<p>Your ad is shown above for you to make sure that its how you want it.  If you see any problems, hit back and fix them.  Make sure that you take note of how much this will cost, as the next step is where you pay. If you are purchasing a free ad, there is no payment step.</P>\r\n\r\n<P>If you like what you see, hit \"Purchase Ad\" below, if not, hit back and make your changes.</p>','1','<P>This block is displayed on the advertisement preview screen when a user is submitting an ad.  It should be a self-contained bit of text and should explain how to make changes if the previewed ad is not what the submittor wanted, and how to purchase if it is.  There are no special keys.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('no_submit_ad_perm','%%title_font%%Submit Ad Error%%title_font_end%%\r\n\r\n<P>%%norm_font%%Sorry, but you do not have permission to submit advertisements. You must have a user account or login before you can submit ads on this site.  You may login using the box to your right.  To create an account you may go <a href=\"%%rootdir%%/newuser\">here</a>%%norm_font_end%%</P>\r\n','1','<P>This block is displayed if a user without the submit_ad perm (set in the Groups Admin Tool) tries to submit an ad. It should be customized depending on which criteria your site uses to determine who may submit advertisements.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('ad_disapproval_mail','The ad that you submitted to %%sitename%% was disapproved today\r\nfor the following reason:\r\n\r\n%%REASON%%\r\n\r\nAdvertisement details:\r\nTitle: %%TITLE%%\r\nText1: %%TEXT1%%\r\nURL: %%URL%%\r\n\r\nIf you have received this message in error, please reply and let us know.\r\n\r\n-%%sitename%%\r\n%%local_email%%\r\n','1','<P>This block is emailed to a user when an advertisement he submitted has been disapproved by a site admin.  It should be plain text and say that the ad has been disapproved.  The special keys recognised are:</P>\n<DL>\n <DT>REASON</DT>\n  <DD>The reason given by the administrator when disapproving the ad, if any</DD>\n <DT>TITLE</DT>\n  <DD>The title of the advertisement disapproved</DD>\n <DT>TEXT1</DT>\n  <DD>The \"TEXT1\" field of the advertisement disapproved</DD>\n <DT>URL</DT>\n  <DD>The url the advertisement points to</DD>\n <DT>VIEWS_LEFT</DT>\n  <DD>The number of impressions remaining</DD>\n <DT>IMPRESSIONS</DT>\n  <DD>The number of impressions to buy (only used in ad renewals, which is yet another unimplemented ad feature)</DD>\n <DT>AD_ID</DT>\n  <DD>The internal ID number of the advertisement disapproved</DD>\n <DT>sitename</DT>\n  <DD>The contents of the variable <B>sitename</B></DD>\n <DT>site_url</DT>\n  <DD>The contents of the variable <B>site_url</B></DD>\n <DT>local_email</DT>\n  <DD>The contents of the variable <B>local_email</B></DD>\n</DL>\n<P>The last three are not technically special keys, but since emails are not sent through the normal page processing, keys are not substituted normally.  No keys other than the ones listed here will be interpolated.  Not all available keys are necessarily relevant.</P>','Ads,Emails','default','en');
INSERT INTO `blocks` VALUES ('ad_approval_mail','The ad that you submitted to %%sitename%% was accepted for display on our site.\r\n\r\nAdvertisement details:\r\nTitle: %%TITLE%%\r\nText1: %%TEXT1%%\r\nURL: %%URL%%\r\n\r\nIf you have received this message in error, please reply and let us know.\r\n\r\n-%%sitename%%\r\n%%local_email%%\r\n','1','<P>This block is emailed to a user when an advertisement he submitted has been approved by a site admin.  It should be plain text and say that the ad has been approved.  The special keys recognised are:</P>\n<DL>\n <DT>REASON</DT>\n  <DD>The reason given by the administrator when approving the ad, if any</DD>\n <DT>TITLE</DT>\n  <DD>The title of the advertisement approved</DD>\n <DT>TEXT1</DT>\n  <DD>The \"TEXT1\" field of the advertisement approved</DD>\n <DT>URL</DT>\n  <DD>The url the advertisement points to</DD>\n <DT>VIEWS_LEFT</DT>\n  <DD>The number of impressions remaining</DD>\n <DT>IMPRESSIONS</DT>\n  <DD>The number of impressions to buy (only used in ad renewal, which is yet another unimplemented ad features)</DD>\n <DT>AD_ID</DT>\n  <DD>The internal ID number of the advertisement approved</DD>\n <DT>sitename</DT>\n  <DD>The contents of the variable <B>sitename</B></DD>\n <DT>site_url</DT>\n  <DD>The contents of the variable <B>site_url</B></DD>\n <DT>local_email</DT>\n  <DD>The contents of the variable <B>local_email</B></DD>\n</DL>\n<P>The last three are not technically special keys, but since emails are not sent through the normal page processing, keys are not substituted normally.  No keys other than the ones listed here will be interpolated.  Not all available keys are necessarily relevant.</P>','Ads,Emails','default','en');
INSERT INTO `blocks` VALUES ('mail_ad_almost_done_msg','The ad that you submitted to %%sitename%% has is almost \r\nfinished with its campaign. You only have %%VIEWS_LEFT%% \r\nimpressions left before it\'s gone.\r\n\r\nAdvertisement details:\r\nTitle: %%TITLE%%\r\nText1: %%TEXT1%%\r\nURL: %%URL%%\r\n\r\nIf you have received this message in error, please reply \r\nand let us know.\r\n\r\n-%%sitename%%\r\n%%local_email%%\r\n','1','<P>This is the text of the email sent to the sponsor of an ad when his ad campaign is almost finished. Whether or not this email is sent at all is determined by the variable <B>mail_ad_reminders</B>. The number of impressions remaining when the email is sent is determined by the variable <B>mail_ad_reminder_on</B>. This block should have no HTML formatting, and recognizes no keys except the special keys listed below, as it is not sent through the normal page processing. The special keys recognized are:</P>\n<DL>\n <DT>sitename</DT>\n  <DD>The value of the sitename variable</DD>\n <DT>site_url</DT>\n  <DD>The value of the site_url variable</DD>\n <DT>local_email</DT>\n  <DD>The value of the local_email variable</DD>\n <DT>TITLE</DT>\n  <DD>The title of the advertisement</DD>\n <DT>TEXT1</DT>\n  <DD>The text field of the advertisement</DD>\n <DT>URL</DT>\n  <DD>The URL in the ads link</DD>\n <DT>VIEWS_LEFT</DT>\n  <DD>The number of impressions remaining until the ad expires</DD>\n <DT>AD_ID</DT>\n  <DD>The internal ID number of the ad</DD>\n</DL>','Ads,Emails','default','en');
INSERT INTO `blocks` VALUES ('mail_ad_done_msg','The ad that you submitted to %%sitename%% has finished its \r\ncampaign.  Thank you for advertising on %%sitename%%; we \r\nlook forward to doing business with you again.\r\n\r\nAdvertisement details:\r\nTitle: %%TITLE%%\r\nText1: %%TEXT1%%\r\nURL: %%URL%%\r\n\r\nIf you have received this message in error, please reply \r\nand let us know.\r\n\r\n-%%sitename%%\r\n%%local_email%%\r\n','1','<P>This is the text of the email sent to the sponsor of an ad when his ad campaign is finished. Whether or not this ad is sent at all is determined by the variable <B>mail_ad_reminders</B> and <B>mail_ad_finished_reminder</B>. Both must be on for the email to be sent. This reminder email is sent when the last impression is used up. For an advance warning, see the block <B>mail_ad_almost_done_msg</B>. This block should have no HTML formatting, and recognizes no keys except the special keys listed below, as it is not sent through the normal page processing. The special keys recognized are:</P>\n<DL>\n <DT>sitename</DT>\n  <DD>The value of the sitename variable</DD>\n <DT>site_url</DT>\n  <DD>The value of the site_url variable</DD>\n <DT>local_email</DT>\n  <DD>The value of the local_email variable</DD>\n <DT>TITLE</DT>\n  <DD>The title of the advertisement</DD>\n <DT>TEXT1</DT>\n  <DD>The text field of the advertisement</DD>\n <DT>URL</DT>\n  <DD>The URL in the ads link</DD>\n <DT>AD_ID</DT>\n  <DD>The internal ID number of the ad</DD>\n</DL>','Ads,Emails','default','en');
INSERT INTO `blocks` VALUES ('buy_ad_impression_message','<P>This is where you can buy ad impressions in a block.  Once you have prepaid impressions on your account, you can distribute them to any ad you have submitted, from the <a href=\"%%rootdir%%/ads/dist\">distribution</a> page.</P>','1','not used.  Yet another unimplemented ad feature.','Ads','default','en');
INSERT INTO `blocks` VALUES ('confirm_purchase_impressions','<P>If you\'re sure that you want to buy this many impressions, click \"Purchase\" below, and proceed to the payment page.  If you need to make a change, change the number and hit confirm again.</P>','1','yet another unimplemented ad feature','Ads','default','en');
INSERT INTO `blocks` VALUES ('editqueuestory_bg','#99ccdd','1','<P>This block is used as a background colour in the story list for stories in the edit queue, to distinguish them from stories that may be voted on.  It should contain a hex colour value or a recognized colour name.It only applies if the edit queue is turned on. This block has no special keys.</P>','Colours','default','en');
INSERT INTO `blocks` VALUES ('author_edit_console','<!-- author_edit_console -->\r\n<DIV id=\"author_console\">\r\n<P>%%norm_font%%As the author of this story, you may cancel the submission at any time during voting. Simply check the confirm box below, and click \"Cancel Submission\". If the story is still in editing, you may also edit it using the \"Edit\" button. To finish the editing period and move the story to voting, click \"Edit\", uncheck \"Request editorial feedback\" and save.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%\r\n%%author_edit_form%%\r\n%%norm_font_end%%</P>\r\n</DIV>\r\n<!-- X author_edit_console -->\r\n','1','<P>This block is displayed below a story in the queue for the author only.  It should be self-contained HTML, and should explain the process for cancelling stories.  The special keys recognised are:</P>\n<DL>\n <DT>author_edit_form</DT>\n  <DD>The form including the delete checkbox and the edit button if the story is in the edit queue</DD>\n <DT>author_edit_instructions</DT>\n  <DD>Instructions to the author for the editing process, displayed only if the story is in the edit queue.  The contents are taken from the block <B>author_edit_instructions</B></DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('edit_instructions','<!-- vote_console -->\r\n<DIV class=\"vote_console\">\r\n<P>%%norm_font%%<b>Please Help.</b> The author of this story has requested editorial help from you, and the rest of the community. Please read, and post your editorial suggestions below. The author can edit at any time, so some suggestions may already have been fixed when you read them. After editing, the story will continue on to voting as usual.%%norm_font_end%%</P>\r\n%%spam_form%%\r\n</DIV>\r\n<!-- X vote_console -->','1','<P>This block is displayed underneath the text of a story in the edit queue, informing readers of its status. This should be a reasonably self-contained bit of HTML and text which explains the process of story editing from the point of view of a reader who is not the author. This block recognizes the following special key:</P>\n<DL>\n <DT>spam_form</DT>\n  <DD>This is replaced with the contents of <B>edit_instructions_abuse</B> if the edit queue anti-spam feature is turned on.</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('renew_ad_message','Renew an ad.  Right here!  Today!','1','<P>This block is displayed on the ad renewal page. It should contain a message encouraging people to renew their ads. There are no special keys. Ad renewals are yet another unimplemented ad feature.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('renew_choose_ad','<P>%%norm_font%%You need to choose an ad to renew.  Check <a href=\"%%rootdir%%/my/ads\">your ad listing page</a> to \r\nchoose an ad to renew and click on the renewal link there.%%norm_font_end%%</P>','1','<P>This block is displayed if a user tries to visit the ad renewal page without specifying which ad to renew. It should contain instructions for finding the ad renewal link. There are no special keys. Ad renewals are yet another unimplemented ad feature.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('renew_ad_no_permission','<P>%%norm_font%%Sorry, but you cannot renew this advertisement.  Please choose an ad from <a href=\"%%rootdir%%/my/ads\">your ad list</a> to renew.%%norm_font_end%%</P>','1','<P>This block is displayed if a user tries to renew somebody else\'s ad. It should contain a message indicating that a given account can only renew ads submitted by that same account. There are no special keys. Ad renewals are yet another unimplemented ad feature.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('rating_format','(<A HREF=\"%%rootdir%%/comments/%%sid%%/%%cid%%?mode=alone;showrate=1#%%cid%%\">%%score%% / %%num_ratings%%</A>)',NULL,'<P>This block is used in the <B>comment</B> and <B>moderation_comment</B> blocks for the rating value display. This allows the entire rating value to disappear if the user has turned off ratings in their user preferences. The following special keys are recognized:</P>\n<DL>\n <DT>sid</DT>\n  <DD>The story ID of the comment.</DD>\n <DT>cid</DT>\n  <DD>The comment ID</DD>\n <DT>score</DT>\n  <DD>The averaged score earned by the comment, or \"none\"</DD>\n <DT>num_ratings</DT>\n  <DD>The number of people who have rated this comment.</DD>\n</DL>','Comments','default','en');
INSERT INTO `blocks` VALUES ('donate_email_pledge','Thank you for your donation. Please remember to send $%%AMOUNT%% to our mailing address.',NULL,'<P>This block is an email sent to a user who has pledged to send a donation. It should be plain text and contain the amount the user has pledged and a reminder to send the amount. Putting the mailing address in this block is probably a good idea too. Because this is an email and is not sent through the usual processing given an HTML page, no keys except the following special keys will work.</P>\n<DL>\n <DT>AMOUNT</DT>\n  <DD>The amount pledged.</DD>\n</DL>','Emails','default','en');
INSERT INTO `blocks` VALUES ('confirm_ad_renew','<P>%%norm_font%% Be sure this is the number of impressions you want to purchase, and hit \"Purchase\" below when you are ready to renew your ad %%norm_font_end%%</P>','1','<P>This block is used during the final confirmation step of ad renewal.  It should be reasonably self-contained HTML and contain a message explaining that this is the final confirmation step before the ad renewal is actually processed.  There are no special keys. Ad renewal is yet another unimplemented ad feature.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('dynamic_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%dynamicmode_javascript%%\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY onload=\"copyContent(%%mainpid%%,%%dynamicmode%%)\">\r\n%%CONTENT%%\r\n</BODY>\r\n</HTML>\r\n','1','<P>This block is a nearly empty page template used for loading individual comments in dynamic mode. It must contain the correct <B>BODY onload</B> event. You probably shouldn\'t change this, since it will never be seen directly anyway. There are two special keys: mainpid and dynamicmode; both are set by the code to indicate whether or not dynamic comments are in use.</P>','Comments,Page Templates','default','en');
INSERT INTO `blocks` VALUES ('dynamic_collapse_thread_link','<img src=\"%%imagedir%%/dyn_cola.gif\" alt=\"--\" title=\"Collapse Subthread\" width=\"12\" height=\"12\" border=\"0\">',NULL,'<P>This block should contain either the text or an image used as the link to collapse an entire subthread of comments when expanded comments are viewed in either of the dynamic modes. If it is an image, it should have an alt element to stand in if the image is missing. It is placed with the actions at the bottom of the comment. This block has no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('ad_renewal_mail','Your ad on %%sitename%% has been renewed.\r\n\r\nAdvertisement details:\r\nTitle: %%TITLE%%\r\nText1: %%TEXT1%%\r\nURL: %%URL%%\r\nAdditional Impressions: %%IMPRESSIONS%%\r\n\r\nIf you have received this message in error, please reply and let us know.\r\n\r\n-%%sitename%%\r\n%%local_email%%\r\n','1','not used.  Yet another unimplemented ad feature.','Ads,Emails','default','en');
INSERT INTO `blocks` VALUES ('paypal_finished','<P>Thank you for your order! An administrator will soon review your ad to ensure that it meets our guidelines. You will receive a notice by email when your ad is reviewed. If your ad is not approved, the charge to your account will be reversed. If it is approved, it will begin running immediately.</P>','1','<P>This block is displayed when an ad purchase paid via paypal is completed. It should be self-contained HTML and should indicate that payment has been received and the advertisement is pending approval by an administrator.</P>','Payments','default','en');
INSERT INTO `blocks` VALUES ('paypal_canceled','<P>We\'re sorry you decided to cancel your order.</P>','1','<P>This block is displayed when an ad purchase paid via paypal is canceled. It should be self-contained HTML and should indicate that the order has been canceled.</P>','Payments','default','en');
INSERT INTO `blocks` VALUES ('dynamic_loading_link','<img src=%%imagedir%%/dyn_wait.gif width=12 height=16 ALT=x border=0>','1','<P>This block contains the image tag that will replace the expand/collapse link when a comment is in the process of being loaded/unloaded. This shouldn\'t actually be a link, just a marker of the same size and format as <B>dynamic_expand_link</B> and <B>dynamic_collapse_link</B>. This block has no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('dynamic_collapse_bottom_link','<img src=%%imagedir%%/dyn_colb.gif width=12 height=12 ALT=- border=0>','1','<P>This block should contain either the text or an image used as the link to collapse a comment when expanded comments are viewed in either of the dynamic modes. If it is an image, it should have an alt element to stand in if the image is missing. It is placed with the actions at the bottom of the comment; the block <B>dynamic_collapse_link</B> is the one placed at the top. This block has no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('block_category_list','<tr>\r\n<td>%%norm_font%%<a href=\"%%rootdir%%/admin/blocks/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n<td>%%norm_font%%<a href=\"%%rootdir%%/admin/blocks/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n<td>%%norm_font%%<a href=\"%%rootdir%%/admin/blocks/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n</tr>\r\n',NULL,'<P>This block is used to build the list of category links in the Blocks Admin Tool.  It is repeated as many times as necessary to display all the categories.  It should contain a complete single line (by default a table row) that can be inserted into the containing block (by default a table with no rows) present in the block <B>edit_block</B> (This block is placed as many times as necessary in the spot designated by the special key <B>catlist</B>).  Multiple instances of the special keys listed below are permitted in this block.  The special keys recognised are:</P>\n<DL>\n <DT>item_url</DT>\n  <DD>The url-safe name of the category; you must insert it into the URL of the hyperlink yourself.</DD>\n <DT>item</DT>\n  <DD>The display name of the category, typically used as the text of the hyperlink</DD>\n</DL>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_block','<form name=\"editblocks\" action=\"%%rootdir%%/admin/blocks/\" method=\"post\">\r\n<input type=\"hidden\" name=\"cat\" value=\"%%category%%\" />\r\n\r\n<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">\r\n<tr><td bgcolor=\"%%title_bgcolor%%\">%%title_font%%Blocks: %%category%%%%title_font_end%%</td></tr>\r\n<tr><td>%%norm_font%%%%update_msg%%%%norm_font_end%%</td></tr>\r\n<tr><td>%%norm_font%%%%theme_sel%%%%norm_font_end%%</td></tr>\r\n<tr><td>%%norm_font%%Choose a category to edit:%%norm_font_end%%</td></tr>\r\n<tr><td>\r\n	<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">%%catlist%%</table>\r\n</td></tr>\r\n<tr><td>%%norm_font%%<input type=\"submit\" name=\"save\" value=\"Save\"> <input type=\"submit\" name=\"edit\" value=\"Get\" />%%norm_font_end%%</td></tr>\r\n<tr><td>%%norm_font%%%%html_check%%%%norm_font_end%%</td></tr>\r\n<tr><td>\r\n	<table border=0 cellpadding=1 cellspacing=0 width=\"100%\">%%form_body%%</table>\r\n</td></tr>\r\n<tr><td>%%norm_font%%<input type=\"submit\" name=\"save\" value=\"Save\"> <input type=\"submit\" name=\"edit\" value=\"Get\" />%%norm_font_end%%</td></tr>\r\n</table>\r\n</form>\r\n',NULL,'<P>This block is used to build the block editing form. It should contain the admin page structure, set up the form, and contain all of the special keys listed below to ensure that block editing is not broken. This block recognizes the following special keys:</P>\n<DL>\n <DT>catlist</DT>\n  <DD>The list of all block categories in the current theme, linkified to bring you to the form with all blocks in that category within the current theme. The list itself is built using the block <B>block_category_list</B> as many times as necessary to display all of the categories.</DD>\n <DT>category</DT>\n  <DD>Either the block name or the category name (depending on whether you\'re in single block or category edit mode) and the name of the theme you\'re currently working in, just so it\'s easier to remember where you are.</DD>\n <DT>update_msg</DT>\n  <DD>Any save, status, or error messages generated due to one of your actions in this admin tool.</DD>\n <DT>theme_sel</DT>\n  <DD>The list of themes across the top of the page that allows you to switch between which theme you\'re working in. The current theme is not linkified, all others are.</DD>\n <DT>html_check</DT>\n  <DD>The checkbox that determines if Scoop should check the HTML of the block when saving. Valid HTML is determined by the block <B>all_html</B>.</DD>\n <DT>form_body</DT>\n  <DD>The body of the block editing form. This will either be the single block form from <B>edit_one_block</B> or the category edit form from <B>edit_cat_blocks</B>, depending on whether you are editing one block or an entire category.</DD>\n</DL>\n<P>Be very careful when changing this block, as it is used to build the interface required to change it back if it is broken. Changing the form elements is strongly not recommended.</P>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_cat_blocks','<!-- category line begin -->\r\n<tr>\r\n	<td>\r\n		%%norm_font%%%%name%%<br />\r\n		%%description%%%%norm_font_end%%\r\n	</td>\r\n	<td>%%norm_font%%%%value%%%%norm_font_end%%</td>\r\n</tr>\r\n<!--category line end -->\r\n',NULL,'<P>This block is used to build the block editing form when in category view. It should contain one line of the category view (that is, the code for one block only). This block recognizes the following special keys:</P>\n<DL>\n <DT>name</DT>\n  <DD>The name of the block, formatted as a link to the single block edit form for that block.</DD>\n <DT>value</DT>\n  <DD>A textarea field containing the value of the block.</DD>\n <DT>description</DT>\n  <DD>The block description.</DD>\n</DL>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_cat_vars','<tr>\r\n	<td>%%norm_font%%%%name%%%%norm_font_end%%</td>\r\n	<td>%%norm_font%%%%value%%%%norm_font_end%%</td>\r\n	<td>%%norm_font%%%%description%%%%norm_font_end%%</td>\r\n</tr>\r\n',NULL,'<P>This block is used to build the Site Control editing form when in category view. It should contain one line of the category view (that is, the code for one variable only). This block recognizes the following special keys:</P>\n<DL>\n <DT>name</DT>\n  <DD>The name of the variable, formatted as a link to the single variable edit form for that variable.</DD>\n <DT>value</DT>\n  <DD>A field containing the value of the variable. Depending on the variable type, this may be a checkbox (boolean), a short text field (number), a longer text field (text), or a textarea field (textarea).</DD>\n <DT>description</DT>\n  <DD>The variable description.</DD>\n</DL>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_one_block','<tr><td>%%norm_font%%Or edit a block directly:%%norm_font_end%%</td></tr>\n<tr><td><table cellspacing=\"2\" cellpadding=\"0\" width=\"100%\">\n<tr>\n	<td colspan=\"2\">%%norm_font%%<b>Delete:</b><input type=\"checkbox\" name=\"delete\" value=\"1\">%%norm_font_end%%</td>\n</tr>\n<tr>\n	<td>%%norm_font%%<b>Select Block:</b>%%norm_font_end%%</td>\n	<td>%%blockselect%%</td>\n</tr>\n<tr>\n	<td>%%norm_font%%<b>Select Categories:</b>%%norm_font_end%%</td>\n	<td>%%catselect%%</td>\n</tr>\n<tr>\n	<td>%%norm_font%%<b>Name:</b>%%norm_font_end%%</td>\n	<td><input type=\"text\" size=\"60\" name=\"name\" value=\"%%bid%%\"></td>\n</tr>\n<tr>\n	<td>%%norm_font%%<b>Theme:</b>%%norm_font_end%%</td>\n	<td><input type=\"text\" size=\"60\" name=\"block_theme\" value=\"%%theme%%\"><input type=\"hidden\" name=\"theme\" value=\"%%curr_theme%%\"></td>\n</tr>\n<tr>\n	<td>%%norm_font%%<b>New Category:</b>%%norm_font_end%%</td>\n	<td><input type=\"text\" size=\"60\" name=\"category\" value=\"\"><br>\n	%%norm_font%%<i>(seperate multiple categories with commas)</i>%%norm_font_end%%\n	</td>\n</tr>\n<tr>\n	<td colspan=\"2\">\n	%%norm_font%%<b>Value:</b>%%norm_font_end%%<br>\n	<textarea cols=\"60\" rows=\"20\" name=\"value\" wrap=\"soft\">%%value%%</textarea>\n	</td>\n</tr>\n<tr>\n	<td colspan=\"2\">%%norm_font%%%%description%%%%norm_font_end%%</td>\n</tr>\n<tr>\n	<td colspan=\"2\">\n	%%norm_font%%<b>Description:</b>%%norm_font_end%%<br>\n	<textarea cols=\"60\" rows=\"5\" name=\"description\"\n	wrap=\"soft\">%%description%%</textarea>\n	</td>\n</tr>\n</table></td></tr>\n',NULL,'<P>This block is used to build the single block edit form for the Blocks Admin Tool. It contains the form elements and special keys required for block editing to work. This block recognizes the following special keys:</P>\n<DL>\n <DT>blockselect</DT>\n  <DD>The select form element listing all the blocks available to edit.</DD>\n <DT>catselect</DT>\n  <DD>The select form element listing all the categories available to file a block in.</DD>\n <DT>bid</DT>\n  <DD>The name of the block (block ID).</DD>\n <DT>value</DT>\n  <DD>The value of the block.</DD>\n <DT>theme</DT>\n  <DD>The name of the theme the block should be saved in.</DD>\n <DT>curr_theme</DT>\n  <DD>The name of the theme you are currently working in. If a new block is created and the theme (above) is left empty, this value is used in its place, so blocks are created where you\'d expect them.</DD>\n <DT>description</DT>\n  <DD>The description of the block.</DD>\n</DL>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_one_var','<tr><td>%%norm_font%%Or edit a variable directly:%%norm_font_end%%</td></tr>\r\n<tr><td><table cellspacing=\"2\" cellpadding=\"0\" width=\"100%\">\r\n	<tr>\r\n		<td colspan=\"2\">%%norm_font%%<b>Delete:</b><input type=\"checkbox\" name=\"delete\" value=\"1\" />%%norm_font_end%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Type:</b>%%norm_font_end%%</td>\r\n		<td>%%typeselect%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Select Variable:</b>%%norm_font_end%%</td>\r\n		<td>%%varselect%%</td>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Select Categories:</b>%%norm_font_end%%</td>\r\n		<td>%%catselect%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Name:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"text\" size=\"60\" name=\"name\" value=\"%%name%%\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>New Category:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"text\" size=\"60\" name=\"category\" value=\"\"><br />\r\n			%%norm_font%%<i>(seperate multiple categories with commas)</i>%%norm_font_end%%\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td colspan=\"2\">\r\n			%%norm_font%%<b>Value:</b>%%norm_font_end%%<br />\r\n			<textarea cols=\"60\" rows=\"12\" name=\"value\" wrap=\"soft\">%%value%%</textarea>\r\n		</td>\r\n	</tr>\n	<tr>\n		<td colspan=\"2\">%%norm_font%%%%description%%%%norm_font_end%%</td>\n	</tr>\r\n	<tr>\r\n		<td colspan=\"2\">\r\n			%%norm_font%%<b>Description:</b>%%norm_font_end%%<br />\r\n			<textarea cols=\"60\" rows=\"3\" name=\"description\" wrap=\"soft\">%%description%%</textarea>\r\n		</td>\r\n	</tr>\r\n</table></td></tr>\r\n',NULL,'<P>This block is used to build the single variable edit form for the Site Controls Admin Tool. It contains the form elements and special keys required for variable editing to work. This block recognizes the following special keys:</P>\n<DL>\n <DT>varselect</DT>\n  <DD>The select form element listing all the variables available to edit.</DD>\n <DT>catselect</DT>\n  <DD>The select form element listing all the categories available to file a variable in.</DD>\n <DT>name</DT>\n  <DD>The name of the variable.</DD>\n <DT>value</DT>\n  <DD>The value of the variable.</DD>\n <DT>typeselect</DT>\n  <DD>The select form element listing the possible variable types.</DD>\n <DT>description</DT>\n  <DD>The description of the variable.</DD>\n</DL>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_var','<form name=\"editvars\" action=\"%%rootdir%%/admin/vars/\" method=\"post\">\r\n<input type=\"hidden\" name=\"cat\" value=\"%%category%%\" />\r\n\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n<tr><td bgcolor=\"%%title_bgcolor%%\">%%title_font%%Site Controls: %%category%%%%title_font_end%%</td></tr>\r\n<tr><td>%%norm_font%%%%update_msg%%%%norm_font_end%%</td></tr>\r\n<tr><td> </td></tr>\r\n<tr><td>%%norm_font%%Choose a category to edit:%%norm_font_end%%</td></tr>\r\n<tr><td>\r\n	<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">%%catlist%%</table>\r\n</td></tr>\r\n<tr><td>%%norm_font%%<input type=\"submit\" name=\"save\" value=\"Save\" /> <input type=\"submit\" name=\"edit\" value=\"Get\" />%%norm_font_end%%</td></tr>\r\n<tr><td><table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">%%form_body%%</table></td></tr>\r\n<tr><td>%%norm_font%%<input type=\"submit\" name=\"save\" value=\"Save\" /> <input type=\"submit\" name=\"edit\" value=\"Get\" />%%norm_font_end%%</td></tr>\r\n</table>\r\n</form>\r\n',NULL,'<P>This block is used to build the Site Controls editing form. It should contain the admin page structure, set up the form, and contain all of the special keys listed below to ensure that variable editing is not broken. This block recognizes the following special keys:</P>\n<DL>\n <DT>catlist</DT>\n  <DD>The list of all variable categories, linkified to bring you to the form with all variables in that category. The list itself is built using the block <B>var_category_list</B> as many times as necessary to display all of the categories.</DD>\n <DT>category</DT>\n  <DD>The name of the category you\'re currently editing.</DD>\n <DT>update_msg</DT>\n  <DD>Any save, status, or error messages generated due to one of your actions in this admin tool.</DD>\n <DT>form_body</DT>\n  <DD>The body of the variable editing form. This will either be the single variable form from <B>edit_one_var</B> or the category edit form from <B>edit_cat_vars</B>, depending on whether you are editing one variable or an entire category.</DD>\n</DL>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('var_category_list','<tr>\r\n <td>%%norm_font%%<a href=\"%%rootdir%%/admin/vars/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n	<td>%%norm_font%%<a href=\"%%rootdir%%/admin/vars/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n	<td>%%norm_font%%<a href=\"%%rootdir%%/admin/vars/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n</tr>\r\n',NULL,'<P>This block is used on the Site Controls Admin Tool, to build the list of categories above the form. This should be one row of a table as many cells wide as desired. The special keys may be repeated; each time they are repeated they will be replaced with the values for a different category. The special keys recognized are:</P>\n<DL>\n <DT>item_url</DT>\n  <DD>The part of the URL after /admin/vars/ that will lead to the category overview form.</DD>\n <DT>item</DT>\n  <DD>The name of the category.</DD>\n</DL>\n<P>The special keys, if repeated, should all be repeated the same number of times, and each set should be associated, so as not to mix up the title and destination of the links.</P>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_macro','<form name=\"editmacros\" action=\"%%rootdir%%/admin/macros/\" method=\"post\">\r\n<input type=\"hidden\" name=\"cat\" value=\"%%category%%\" />\r\n\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n<tr><td bgcolor=\"%%title_bgcolor%%\">%%title_font%%Macros: %%category%%%%title_font_end%%</td></tr>\r\n<tr><td>%%norm_font%%%%update_msg%%%%norm_font_end%%</td></tr>\r\n<tr><td> </td></tr>\r\n<tr><td>%%norm_font%%Choose a category to edit:%%norm_font_end%%</td></tr>\r\n<tr><td>\r\n	<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">%%catlist%%</table>\r\n</td></tr>\r\n<tr><td>%%norm_font%%<input type=\"submit\" name=\"save\" value=\"Save\" /> <input type=\"submit\" name=\"edit\" value=\"Get\" />%%norm_font_end%%</td></tr>\r\n<tr><td><table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">%%form_body%%</table></td></tr>\r\n<tr><td>%%norm_font%%<input type=\"submit\" name=\"save\" value=\"Save\" /> <input type=\"submit\" name=\"edit\" value=\"Get\" />%%norm_font_end%%</td></tr>\r\n</table>\r\n</form>\r\n',NULL,'The main edit macro page.  The special var \"form_body\" is either the single-var edit form, or the category table, depending on which view you\'re using.','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_one_macro','<tr><td>%%norm_font%%Or edit a macro directly:%%norm_font_end%%</td></tr>\r\n<tr><td><table cellspacing=\"2\" cellpadding=\"0\" width=\"100%\">\r\n	<tr>\r\n		<td colspan=\"2\">%%norm_font%%<b>Delete:</b><input type=\"checkbox\" name=\"delete\" value=\"1\">%%norm_font_end%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Select Macro:</b>%%norm_font_end%%</td>\r\n		<td>%%macroselect%%</td>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Select Categories:</b>%%norm_font_end%%</td>\r\n		<td>%%catselect%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Name:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"text\" size=\"60\" name=\"name\" value=\"%%name%%\"></td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>New Category:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"text\" size=\"60\" name=\"category\" value=\"\"><br>\r\n			%%norm_font%%<i>(seperate multiple categories with commas)</i>%%norm_font_end%%\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Parameters:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"text\" size=\"60\" name=\"parameter\" value=\"%%parameter%%\"></td>\r\n	</tr>\r\n	<tr>\r\n		<td colspan=\"2\">\r\n			%%norm_font%%<b>Value:</b>%%norm_font_end%%<br>\r\n			<textarea cols=\"60\" rows=\"6\" name=\"value\" wrap=\"soft\">%%value%%</textarea>\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td colspan=\"2\">\r\n			%%norm_font%%<b>Description:</b>%%norm_font_end%%<br>\r\n			<textarea cols=\"60\" rows=\"3\" name=\"description\" wrap=\"soft\">%%description%%</textarea>\r\n		</td>\r\n	</tr>\r\n</table></td></tr>\r\n',NULL,'','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('macro_category_list','<tr>\r\n	<td>%%norm_font%%<a href=\"%%rootdir%%/admin/macros/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n	<td>%%norm_font%%<a href=\"%%rootdir%%/admin/macros/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n	<td>%%norm_font%%<a href=\"%%rootdir%%/admin/macros/%%item_url%%\">%%item%%</a>%%norm_font_end%%</td>\r\n</tr>\r\n',NULL,'One line of the macro category list.  Usually one table row.','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('edit_instructions_abuse','<P>If this article is abusing the edit queue please indicate this by pressing the button below.</P>\n<FORM NAME=\"storymoderate\" ACTION=\"%%rootdir%%/\" METHOD=\"POST\">\n<P align=\"center\">\n	<INPUT type=\"hidden\" NAME=\"op\" VALUE=\"displaystory\">\n	<INPUT type=\"hidden\" NAME=\"sid\" VALUE=\"%%sid%%\">\n	<INPUT type=\"hidden\" NAME=\"mode\" VALUE=\"spam\">\n	%%formkey%%\n	<INPUT type=\"hidden\" NAME=\"vote\" VALUE=\"-1\">\n	<INPUT type=\"submit\" name=\"save\" value=\"Spam\">\n</P>\n</FORM>',NULL,'<P>This block is displayed underneath the text of a story in the edit queue, if the edit queue anti-spam feature is activated. This should be a reasonably self-contained bit of HTML which explains what the spam button is to be used for and sets up the form for the spam button. All of the hidden form elements are required. This block recognizes the following special keys:</P>\n<DL>\n <DT>sid</DT>\n  <DD>The story ID of the current story.</DD>\n <DT>formkey</DT>\n  <DD>A formkey element used to help prevent duplicate votes, scripted votes, and other form spoofing strategies.</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('admin_boxes_form','<form name=\"boxes\" action=\"%%rootdir%%/admin/boxes\" method=\"post\">\r\n  <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n    <tr>\r\n      <td bgcolor=\"%%title_bgcolor%%\">%%title_font%%Edit Boxes</font></td>\r\n    </tr>\r\n    <tr><td>%%title_font%%<font color=\"#FF0000\">%%admin_boxes_errormsg%%</font></font></td></tr>\r\n    <tr>   \r\n      <td>%%norm_font%%<b>Box:</b> %%admin_boxes_box_menu%%\r\n        <input type=\"submit\" name=\"get\" value=\"Get Box\" /></font></td>\r\n    </tr><tr><td>\r\n%%norm_font%%<b>%%admin_boxes_delete_check%%</b></font>\r\n</td></tr>\r\n    <tr>\r\n      <td>%%norm_font%%<b>Box ID:</b>\r\n        <input type=\"text\" name=\"boxid\" value=\"%%admin_boxes_boxid%%\" size=\"40\" />\r\n      </font></td>\r\n    </tr>\r\n    <tr>\r\n      <td>%%norm_font%%<b>Title:</b>\r\n        <input type=\"text\" name=\"title\" value=\"%%admin_boxes_title%%\" size=\"40\" />\r\n      </font></td>\r\n    </tr>\r\n    <tr>\r\n      <td>%%norm_font%%<b>Template:</b>%%admin_boxes_template_menu%% %%admin_boxes_template_link%%</font></td>\r\n    </tr>\r\n    <tr>\r\n      <td><input type=\"checkbox\" name=\"choose\" value=\"1\" %%admin_boxes_choose_checked%% />\r\n        %%norm_font%%Allow users to toggle box off%%norm_font_end%%\r\n      </td>\r\n    </tr>\r\n    <tr><td>%%norm_font%%<b>Description:</b></td></tr>\r\n    <tr>\r\n      <td>%%norm_font%%\r\n        <textarea cols=\"50\" rows=\"3\" name=\"description\" wrap=\"soft\">%%admin_boxes_description%%</textarea>\r\n      </font></td>\r\n    </tr>\r\n    <tr><td>%%norm_font%%<b>Content:</b></td></tr>\r\n    <tr><td>%%norm_font%%\r\n      <textarea cols=\"50\" rows=\"25\" name=\"content\">%%admin_boxes_content%%</textarea>\r\n    </font></td></tr>\r\n    <tr><td>%%norm_font%%\r\n      <input type=\"submit\" name=\"write\" value=\"Save Box\" /> <input type=\"reset\" />\r\n    </font></td></tr>\r\n  </table>\r\n</form>  \r\n',NULL,'<P>This block is used to create the Box Admin Tool page.  It must contain all of the form elements used in the Box Admin page, and should be self-contained HTML.  The special keys recognised are:</P>\n<DL>\n <DT>admin_boxes_errormsg</DT>\n  <DD>A message indicating whether a save was successful or not, and if not, the text of the error message</DD>\n <DT>admin_boxes_box_menu</DT>\n  <DD>The select box used to choose a box to edit</DD>\n <DT>admin_boxes_delete_check</DT>\n  <DD>The delete checkbox displayed when a box is being edited</DD>\n <DT>admin_boxes_template_menu</DT>\n  <DD>The select box used to choose the box template to use for a particular box</DD>\n <DT>admin_boxes_template_link</DT>\n  <DD>A link to the block admin tool to edit the box template selected for the box currently being edited</DD>\n <DT>admin_boxes_choose_checked</DT>\n  <DD>The \"checked\" status of the checkbox which determines whether or not the users can choose to show or hide that particular box in their display preferences</DD>\n <DT>admin_boxes_boxid</DT>\n  <DD>The name of the box currently being edited</DD>\n <DT>admin_boxes_title</DT>\n  <DD>The title of the box currently being edited</DD>\n <DT>admin_boxes_description</DT>\n  <DD>The description of the box currently being edited</DD>\n <DT>admin_boxes_content</DT>\n  <DD>The perl code of the box currently being edited</DD>\n </DL>\n<P>Do not change the names of the form elements, or remove any form elements, or box editing may fail in unexpected ways.</P>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('login_error_message','%%norm_font%%<FONT COLOR=\"#FF0000\"><B>Login Incorrect</B></FONT>%%norm_font_end%%','2','<P>This is the error message displayed in the <B>login_box</B> if either the username or password (or both) are incorrect. This block contains the special key \"uname\" which is replaced with the username entered in the login form.</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('login_mailed_message','%%norm_font%%<FONT COLOR=\"#FF0000\"><B>New password for %%uname%% mailed.</B></FONT>%%norm_font_end%%','2','<P>This is the status message displayed in the <B>login_box</B> when a new password has successfully been mailed to the user. This block contains the special key \"uname\" which is replaced with the username entered in the login form.</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('login_mail_failed','%%norm_font%%<FONT COLOR=\"#FF0000\"><B>Could not mail password for %%uname%%.</B></FONT>%%norm_font_end%%','2','<P>This is the error message displayed in the <B>login_box</B> when Scoop could not send the email containing the user\'s new password as requested. This block contains the special key \"uname\" which is replaced with the username entered in the login form.</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('user_prefs_message','%%title_font%%Sorry!%%title_font_end%%\r\n<P>%%norm_font%%Sorry, you can only edit user preferences if you have a user account. Why not <A HREF=\"%%rootdir%%/newuser\">make one</A>?%%norm_font_end%%</P>','2','<P>This block is displayed instead of the form when a user who is not logged in tries to change his display or comment preferences. It should be self-contained HTML and explain that accounts are required to set preferences. There are no special keys.</P>','General','default','en');
INSERT INTO `blocks` VALUES ('interface_prefs_main_form','                <DIV>\r\n                  %%title_font%%Edit Interface Preferences for %%nickname%%%%title_font_end%%\r\n                  <P><FONT COLOR=\"#FF0000\">%%title_msg%%</FONT></P>\r\n\r\n                  %%interface_form%%\r\n                </DIV>','2','<P>This block is used to build the page for the interface preferences form, one of the userprefs pages. It should be self-contained HTML and contain the page title and the special keys listed below:</P>\n<DL>\n <DT>nickname</DT>\n  <DD>The nickname of the user changing his preferences</DD>\n <DT>title_msg</DT>\n  <DD>Any error or status messages regarding the save</DD>\n <DT>interface_form</DT>\n  <DD>The entire form containing all preferences supported by Scoop</DD>\n</DL>','Preferences','default','en');
INSERT INTO `blocks` VALUES ('comment_posted_message','<A NAME=\"here\">Comment posted!</A> Thank you for contributing.','2','<P>This block is displayed after a user has successfully posted a message. It should contain a message telling the user so. There are no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('box_title_bg','#999999','1','<P>This block is used wherever a colour value is needed to set the colour of the sidebar box title bars.  It should be a hex colour value, including the #, such as #000000 for black.  There are no special keys.</P>','Colours','greyscale','en');
INSERT INTO `blocks` VALUES ('comment_head_bg','#eeeeee','1','<P>This block is used wherever a colour value is needed to set the background colour of the comment header (which typically contains the subject and poster\'s information, but not the comment itself).  It should be a hex colour value, including the #, such as #000000 for black.  There are no special keys.</P>','Colours','greyscale','en');
INSERT INTO `blocks` VALUES ('title_bgcolor','#aaaaaa','1','<P>This block is used anywhere a title bar needs a background (except in the sidebar boxes, which use <B>box_title_bg</B>). It should be a hex colour value, including the #.</P>','Colours','greyscale','en');
INSERT INTO `blocks` VALUES ('theme_list','<form name=\"themes\" action=\"%%rootdir%%/admin/blocks/overview\" method=\"post\">\n<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">\n<tr><td bgcolor=\"%%title_bgcolor%%\">%%title_font%%Blocks: Themes Overview%%title_font_end%%</td></tr>\n<tr><td>%%norm_font%%<a href=\"%%rootdir%%/admin/blocks\">Back to blocks admin</a>%%norm_font_end%%</td></tr>\n<tr><td>%%norm_font%%%%themesel%%%%norm_font_end%%</td></tr>\n<tr><td>%%norm_font%%<input type=\"submit\" name=\"show\" value=\"Show Selected Themes\">%%norm_font_end%%</td></tr>\n</table>\n</form>\n<table border=1 cellpadding=1 cellspacing=0 width=\"100%\">\n  %%list%%\n</table>\n','1','<P>This block creates the admin tool structure for the block theme overview. It contains a form and two special keys. The form elements are:</P>\n<DL>\n <DT>FORM</DT>\n  <DD>The form should post to |rootdir|/admin/blocks/overview</DD>\n <DT>show</DT>\n  <DD>The submit button should have the name \"show\"</DD>\n</DL>\n<P>The following special keys are recognized:</P>\n<DL>\n <DT>themesel</DT>\n  <DD>A set of checkboxes, one for each theme, to allow the admin to select which themes to display in the overview.</DD>\n <DT>list</DT>\n  <DD>The list of all blocks in the selected theme. Matching blocks in two different themes are displayed in the same row, so you can see at a glance which blocks will be replaced when applying themes.</DD>\n</DL>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('dynamic_loading_message','%%norm_font%%<i>Loading...</i>%%norm_font_end%%',NULL,'<P>This block contains the message that will replace the comment title or comment when that comment is in the process of being loaded or unloaded. This should be small and indicate that Scoop is working on it and the comment or comment title will appear shortly.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('dynamic_expand_thread_link','<img src=\"%%imagedir%%/dyn_expa.gif\" alt=\"++\" title=\"Expand Subthread\" width=\"12\" height=\"12\" border=\"0\">',NULL,'<P>This block should contain either the text or an image used as the link to expand an entire subthread of comments when comments are viewed in either of the dynamic modes. If it is an image, it should have an alt element to stand in if the image is missing. It is placed with the actions at the bottom of the comment. This block has no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('dynamic_js_tag','<script type=\"text/javascript\" src=\"%%rootdir%%/dynamic-comments.js\"></script>',NULL,'<P>This block is what allows dynamic comments to work. On pages where comments are viewed and dynamic comment mode is active, the key <TT>|dynamicmode_javascript|</TT> is replaced with the contents of this block. (That key is best placed in the <B>header</B> block, so it is always available.) This block should only be modified to reflect the location of the dynamic-comments.js file, which it loads. This block has no special keys.','Comments','default','en');
INSERT INTO `blocks` VALUES ('dynamic_expand_link','<img src=%%imagedir%%/dyn_exp.gif width=12 height=16 ALT=+ border=0>',NULL,'<P>This block should contain either the text or an image used as the link to expand a single comment when viewing comments in either of the dynamic modes. If it is an image, it should have an alt element to stand in if the image is missing. It is placed near the subject at the top of the comment. This block has no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('dynamic_collapse_link','<img src=%%imagedir%%/dyn_col.gif width=12 height=16 ALT=- border=0>',NULL,'<P>This block should contain either the text or an image used as the link to collapse a comment when expanded comments are viewed in either of the dynamic modes. If it is an image, it should have an alt element to stand in if the image is missing. It is placed near the subject at the top of the comment; the block <B>dynamic_collapse_bottom_link</B> is the one used at the bottom. This block has no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('subscribe_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n  <!-- Main page block -->\r\n  <TR>\r\n    <!-- Center content section -->\r\n    <TD VALIGN=\"top\" width=\"75%\">\r\n      %%CONTENT%%\r\n    </TD>\r\n    <!-- X center content section -->\r\n        \r\n    <!-- Right boxes column -->\r\n    <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n      %%BOX,main_menu%%\r\n      %%BOX,hotlist_box%%\r\n      %%BOX,user_box%%\r\n      %%BOX,admin_tools%%\r\n      %%BOX,poll_box%%\r\n    </TD>\r\n    <!-- X Right boxes column -->\r\n  </TR>\r\n  <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n</HTML>\r\n',NULL,'<P>This block is the page template used for subscription signup and payment. It must be a full HTML page. The special keys recognized are:</P>\n<DL>\n <DT>subtitle</DT>\n  <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>CONTENT</DT>\n  <DD>This is replaced with any other content specific to the page being requested.  It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.</DD>\n</DL>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('sub_manual_change_email','The user %%NICK%% has subscribed for %%MONTHS%% months of \r\nsubscription \"%%TYPE%%\". The user\'s existing group does \r\nnot allow group changes. Please review this user\'s request \r\nat %%URL%%.\r\n\r\n-%%sitename%%\r\n%%local_email%%','1','<P>This block is the body of an email sent to the site administrator (at the addresses in the variable <B>admin_alert</B>) notifying them of a user who has bought a subscription but cannot be placed in the subscriber group automatically. This is determined by the perm <B>sub_allow_group_change</B>. It should not contain any HTML formatting, and recognizes no keys except the special keys listed below, because it does not go through the normal page processing. The special keys recognized are:</P>\n<DL>\n <DT>NICK</DT>\n  <DD>The nickname of the user who bought the subscription</DD>\n <DT>TYPE</DT>\n  <DD>The name of the type of subscription bought or renewed</DD>\n <DT>MONTHS</DT>\n  <DD>The number of months bought or renewed</DD>\n <DT>URL</DT>\n  <DD>The URL the administrator should visit to review the subscription</DD>\n <DT>sitename</DT>\n  <DD>The value of the variable sitename</DD>\n <DT>site_url</DT>\n  <DD>The value of the variable site_url</DD>\n <DT>local_email</DT>\n  <DD>The value of the variable local_email</DD>\n</DL>','Subscriptions,Emails','default','en');
INSERT INTO `blocks` VALUES ('sub_email_success','Thank you for subscribing!\r\n\r\nYou have added %%MONTHS%% months to your subscription, of \r\nthe type \"%%TYPE%%\". Your subscription will expire on\r\n%%EXP_DATE%%.\r\n\r\n','1','<P>This block is the body of an email sent to a user when Scoop has successfully added to their subscription. It should not contain any HTML formatting, and recognizes no keys except the special keys listed below, because it does not go through the normal page processing before being emailed. The special keys recognized are:</P>\n<DL>\n <DT>TYPE</DT>\n  <DD>The name of the type of subscription bought or renewed</DD>\n <DT>MONTHS</DT>\n  <DD>The number of months bought or renewed</DD>\n <DT>EXP_DATE</DT>\n  <DD>The new expiry date of the subscription</DD>\n <DT>sitename</DT>\n  <DD>The value of the variable sitename</DD>\n <DT>site_url</DT>\n  <DD>The value of the variable site_url</DD>\n <DT>local_email</DT>\n  <DD>The value of the variable local_email</DD>\n</DL>','Subscriptions,Emails','default','en');
INSERT INTO `blocks` VALUES ('content_only_page_template','%%CONTENT%%','1','<P>This block can be used where you want Scoop to output only the content, with no HTML page wrapper at all.  It should contain only the special key CONTENT and nothing else.  The special key CONTENT is replaced with the output of whichever function or box is run using this block as its page template (see the Ops Admin Tool).</P>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('sub_paypal_canceled','Sorry you cenceled.','1','<P>This block is displayed when a user cancels a subscription purchase while using paypal. It should be self-contained HTML and should let the user know that the transaction has been canceled.</P>','Payments,Subscriptions','default','en');
INSERT INTO `blocks` VALUES ('editqueuespam_bg','#f9e5de','1','<P>This block is used as a background colour in the story list for stories in the edit queue that the user has voted \"Spam\" on, to make it easy to remember which ones they can safely ignore while they remain in the edit queue. It should contain a hex colour value or a recognized colour name. It only applies if both the edit queue and the edit queue anti-spam button are turned on. This block has no special keys.</P>','Colours','default','en');
INSERT INTO `blocks` VALUES ('story_vote_form','<FORM NAME=\"storymoderate\" ACTION=\"%%rootdir%%/\" METHOD=\"POST\">\r\n  <INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"displaystory\">\r\n  <INPUT TYPE=\"hidden\" NAME=\"sid\" VALUE=\"%%sid%%\">\r\n  <INPUT TYPE=\"hidden\" NAME=\"mode\" VALUE=\"moderate\">\r\n  %%formkey%%\r\n  <B>Your vote:</B>\r\n  <SELECT NAME=\"vote\" SIZE=1>\r\n    <OPTION VALUE=\"1\">Post it to the Front page! (+1)\r\n    <OPTION VALUE=\"2\">Post it to Section page Only (+1)\r\n    <OPTION VALUE=\"0\" SELECTED>Abstain. (0)\r\n    <OPTION VALUE=\"-1\">Dump it! (-1)\r\n  </SELECT>\r\n  <INPUT TYPE=\"submit\" NAME=\"save\" VALUE=\"Vote\">\r\n</FORM>',NULL,'<P>This is the form used to vote on stories in the voting queue. The following form elements must be present:</P>\n<DL>\n <DT>FORM</DT>\n  <DD>The form should post to the sites rootdir</DD>\n <DT>op</DT>\n  <DD>This should be a hidden field, named op, with a value of \"displaystory\"</DD>\n <DT>sid</DT>\n  <DD>This should be a hidden field, named sid, with a value of \"|sid|\" (see special keys, below)</DD>\n <DT>mode</DT>\n  <DD>This should be a hidden field, named mode, with a value of \"moderate\"</DD>\n <DT>vote</DT>\n  <DD>This should be a select or other multi-value field, with possible values of 1, 2, 0, or -1, representing votes for front page, section only, abstention, or hiding, respectively. Options may be removed or renamed, but the basic meaning of the values cannot be changed.</DD>\n <DT>save</DT>\n  <DD>This submit button should have a value of \"Vote\"</DD>\n</DL>\n<P>The following special keys are recognized:</P>\n<DL>\n <DT>sid</DT>\n  <DD>The story ID</DD>\n <DT>formkey</DT>\n  <DD>A hidden field used for security and form validation, to help stop scripts.</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('trusted_info_message','<P>You are a trusted user.  For more information on the extra rights and responsibilities of trusted users, please see \"<A href=\"%%rootdir%%/special/trusted\">Trusted User Guidelines</A>\".</P>','1','<P>This block is displayed on a user\'s own user info page when they are a trusted user. (See the Scoop Admin Guide for more information on trusted and untrusted users and mojo, which determines trust level.) It should notify the user of their trusted status, and either explain what it means or link to a page that explains what it means.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('untrusted_post_message','<P>You are an untrusted user. Your comment has been posted, but it must be reviewed by a trusted user before it will become visible. For more information, please see \"<A HREF=\"%%rootdir%%/special/untrusted\">Why am I untrusted?</A>\"</P>','1','<P>This block is displayed above the comment posted message when an untrusted user posts a comment. (See the Scoop Admin Guide for more information on trusted and untrusted users and mojo, which determines trust level.) It should notify the user of their untrusted status, and either explain what it means or link to a page that explains what it means.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('subscribe_denied_message','<P>Sorry, but you can\'t subscribe to %%sitename%% at this time.</P>','1','<P>This block is displayed if a user attempts to subscribe while not having the appropriate permissions. It should be self-contained HTML and should explain why the user cannot subscribe.</P>','Subscriptions','default','en');
INSERT INTO `blocks` VALUES ('subscribe_intro_text','<P>This is where you should put some introductory information about your subscription offerings.  Edit the block \"subscribe_intro_text\" with the text you want here.</P>','1','<P>This block is displayed on the subscription page. It should be self-contained HTML and should describe the subscription options and what extra features are available to subscribers.</P>','Subscriptions','default','en');
INSERT INTO `blocks` VALUES ('ad_submit_help','<P>Any general ad help you would like to display should go here. This message can be customized in the block ad_submit_help.</P>','1','<P>This block is displayed at the bottom of ad submission step 3.  It should be self-contained HTML, and should contain general instructions for ad submission.  There are no special keys.</P>','Ads','default','en');
INSERT INTO `blocks` VALUES ('mark_Subscribers','(!)','1','<P>This block is inserted in the comment headers for users in the Subscribers group. It should be a small bit of self-contained HTML. It is placed with a special key in the blocks <B>comment</B> and <B>moderation_comment</B>. This block has no special keys.','Subscriptions','default','en');
INSERT INTO `blocks` VALUES ('new_story_marker','=>','1','<P>This block is inserted in the story summary if the user has not yet read this story, according to Scoop\'s read-tracking system. It replaces the special key <TT>|new|</TT> in the block <B>story_summary</B>.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('comment_word','comment','1','<P>This block contains the word used for comments in the comment count on the front page.  This should be the singular form; the plural suffix is set in the block <B>comment_plural</B>.  There are no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_plural','s','1','<P>This block is used to provide a plural suffix if there is more than one comment attached to a story.  It is simply appended to the value in <B>comment_word</B> where appropriate.  There are no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_num_format_start','','1','<P>This block is used just before the number of total comments attached to a story. It should be a complete opening font or text style indicator, such as a font or b tag. It must be properly closed by the contents of the block <B>comment_num_format_end</B>.  There are no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_num_format_end','','1','<P>This block is used just after the number of total comments attached to a story. It should be a complete closing font or text style indicator, such as a font or b tag. It must properly close the tags opened by the contents of the block <B>comment_num_format_start</B>.  There are no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('new_comment_format_start','<B>','1','<P>This block is used to format the number of new comments in a story on the index page. It should be an opening HTML tag that matches the closing tag used in the block <B>new_comment_format_end</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('new_comment_format_end','</B>','1','<P>This block is used to format the number of new comments in a story on the index page. It should be a closing HTML tag that matches the formatting tag used in the block <B>new_comment_format_start</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('poll_img_width','300','','<P>This block determines the maximum width in pixels of the poll bar, and the width of the bar used for the poll option with 100% of the votes. All poll bar widths are percentages of this value corresponding to the percentage of votes the option received. It should be a number only.</P>','Polls','default','en');
INSERT INTO `blocks` VALUES ('norm_font_end','</FONT>',NULL,'<P>This block is used extensively in the default install. It should be a closing FONT tag, or otherwise close the tag opened in the block <B>norm_font</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('box_title_font','<H2>',NULL,'<P>This block is used in box templates before the box title.  It should be a complete opening font or text style indicator, such as a font or b tag.  It must be properly closed by the contents of the block <B>box_title_font_end</B>.  There are no special keys.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('title_font_end','</H1>',NULL,'<P>This block is used to format titles. It should be a closing font or other formatting tag. It must match the opening tags in the block <B>title_font</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('title_font','<H1>',NULL,'<P>This block is used to format titles. It should be a complete opening font or other formatting tag. It must match the closing tags in the block <B>title_font_end</B>.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('box_title_font_end','</H2>',NULL,'<P>This block is used in box templates after the box title.  It should be a complete closing font or text style indicator, such as a closing font or b tag.  It must properly close the tags opened in the block <B>box_title_font</B>.  There are no special keys.</P>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('norm_font','<FONT FACE=\"verdana, arial, helvetica, sans-serif\" SIZE=2>',NULL,'<P>This block is used extensively in the default install. It should be a complete opening tag, or blank. It must match the closing tag set in the block <B>norm_font_end</b>. The following special keys are recognised:</p>\n<DL>\n <DT>norm_font_face</DT>\n  <DD>The font face specification set in a user\'s prefs or, if not set, the default value for that preference as set in the User Preferences Admin Tool.</DD>\n <DT>norm_font_size</DT>\n  <DD>The font size specification set in a user\'s prefs or, if not set, the default value for that preference as set in the User Preferences Admin Tool.</DD>\n</DL>','Fonts','default','en');
INSERT INTO `blocks` VALUES ('poll_img','pollbar.gif',NULL,'<P>This is the name of the file to use when building the poll image. The file should be in the images directory. The value of this block should not have any path information. The image is stretched horizontally to the desired width, so it should not have any horizontal detail that may be deformed.</P>','Polls','default','en');
INSERT INTO `blocks` VALUES ('slogan','Collaborative Media for the Masses',NULL,'<P>This block is used in the browser\'s title bar. It should contain a witty saying that describes your site and should not contain the name of the site or any HTML formatting commands. It is only used on the site\'s index pages.</P>','General','default','en');
INSERT INTO `blocks` VALUES ('digest_subject','My Site Digest',NULL,'<P>This block is used as the subject line of the story digest email sent to users who request it. This should be plain text, with no HTML formatting. Because this is an email and is not sent through the usual processing given an HTML page, none of the usual keys will work. This block has no special keys.</P>','Story Digests','default','en');
INSERT INTO `blocks` VALUES ('bars','||',NULL,'<P>This block is used as a separator in the page title. It should be short and have no HTML tags in it. There are no special keys.</P>','General','default','en');
INSERT INTO `blocks` VALUES ('edit_ops','<form action=\"%%rootdir%%/admin/ops\" method=\"POST\">\r\n<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\r\n	<tr bgcolor=\"%%title_bgcolor%%\">\r\n		<td colspan=\"2\">%%title_font%%Edit Ops%%title_font_end%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td colspan=\"2\">%%error_font%%<font color=\"#ff0000\">%%msg%%</font>%%error_font_end%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\">\r\n			<input type=\"submit\" name=\"get\" value=\"Get Op\" />\r\n		</td>\r\n		<td>%%op_list%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Op:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"text\" name=\"opcode\" value=\"%%opcode%%\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Template:</b>%%norm_font_end%%</td>\r\n		<td>%%tmpl_list%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Function:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"text\" name=\"func\" value=\"%%func%%\" />%%edit_box%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td>%%norm_font%%\r\n			<input type=\"checkbox\" name=\"is_box\" value=\"1\" %%is_box_checked%% /> Function is a box%%norm_font_end%%\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Permission:</b>%%norm_font_end%%</td>\r\n		<td>%%perm_list%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>Enabled:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"checkbox\" name=\"enabled\" value=\"1\" %%enabled_checked%% /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%<b>OP Aliases:</b>%%norm_font_end%%</td>\r\n		<td><input type=\"text\" name=\"aliases\" value=\"%%aliases%%\" size=\"40\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\">%%norm_font%%<b>URL Templates:</b>%%norm_font_end%%</td>\r\n		<td><textarea cols=\"40\" rows=\"10\" name=\"urltemplates\" wrap=\"no\">%%urltemplates%%</textarea></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\">%%norm_font%%<b>Description:</b>%%norm_font_end%%</td>\r\n		<td><textarea cols=\"40\" rows=\"3\" name=\"desc\" wrap=\"soft\">%%desc%%</textarea></td>\r\n	</tr>\r\n	%%delete_check%%\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td>\r\n			<input type=\"submit\" name=\"save\" value=\"Write Op\" /> \r\n			<input type=\"reset\" value=\"Reset\" />\r\n		</td>\r\n	</tr>\r\n</table>\r\n</form>','1','<P>This block is used to build the ops editing form. It should contain the admin page structure, set up the form, and contain all of the special keys listed below to ensure that op editing is not broken. This block recognizes the following special keys:</p>\n<DL>\n <DT>msg</DT>\n  <DD>Status or error messages from the update just performed.</DD>\n <DT>op_list</DT>\n  <DD>The drop-down box containing all of the ops in the system.</DD>\n <DT>opcode</DT>\n  <DD>The name of the currently loaded op. Not a form field, just the value.</DD>\n <DT>tmpl_list</DT>\n  <DD>The drop-down box containing all of the page templates (blocks ending in _template)</DD>\n <DT>func</DT>\n  <DD>The name of the function or box run when the currently loaded op is requested. Not a form field, just the value.</DD>\n <DT>is_box_checked</DT>\n  <DD>The \"checked\" property of the checkbox that determines whether or not the function named above is a box or not. Not a form field, just the value.</DD>\n <DT>perm_list</DT>\n  <DD>The drop-down box containing all of the permissions in the system.</DD>\n <DT>aliases</DT>\n  <DD>The aliases of the currently loaded op. Not a form field, just the value.</DD>\n <DT>urltemplates</DT>\n  <DD>The URL templates of the currently loaded op. Not a form field, just the value.</DD>\n <DT>enabled_checked</DT>\n  <DD>The \"checked\" property of the checkbox that determines whether or not the currently loaded op is enabled. Not a form field, just the value.</DD>\n <DT>desc</DT>\n  <DD>The description of the currently loaded op. Not a form field, just the value.</DD>\n <DT>delete_check</DT>\n  <DD>If an op is loaded, this is replaced with a table row containing the delete checkbox and label. Otherwise, it\'s removed.</DD>\n <DT>edit_box</DT>\n  <DD>A link to the Boxes Admin Tool and the box associated with the currently loaded op, if the function named is marked as being a box and that box exists in the database.</DD>\n</DL>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('new_user_has_account','<P>Hey!  You already have an account!  I wouldn\'t worry about creating another.  You must have arrived here in error. Please email %%local_email%% if you\'re having troubles with this site.</P>','1','<P>This block is displayed if a logged-in user visits the user creation page. It should be a self-contained bit of HTML letting the user know that they can\'t create an account while logged in. There are no special keys.</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('new_user_is_advertiser','<P>You already have an account that is enabled for advertising. You must have arrived here in error. Please email %%local_email%% if you\'re having troubles with this site.</P>','1','<P>This block is displayed if a logged-in advertiser visits the advertiser account creation page. It should be a self-contained bit of HTML letting the user know that they already have an advertiser account. This only applies if the site control <B>req_extra_advertiser_info</B> is set to 1. There are no special keys.</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('newuser_confirm_page','<h2>User Created!</h2>\r\n<p>You should soon receive an email at %%EMAIL%%. This email will contain instructions and a link to activate your account.</p>\r\n<p>Thanks for creating an account at %%SITENAME%%!</p>','1','<P>This page is displayed when the user has successfully created an account and the email containing their password has been sent. It should be a self-contained bit of HTML telling the user to look for the email, and may contain any welcome message you like. The special keys recognised are:</p>\r\n<DL>\r\n <DT>EMAIL</dt>\r\n  <DD>The email address the confirmation email was sent to</dd>\r\n <DT>SITENAME</dt>\r\n  <DD>The name of the site, as set in the site control <B>sitename</b></dd>\r\n</dl>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('ad_submitted_message','<p> Now that you\'ve submitted your ad, it has to be approved.  Our crack team of site maintainers who pore over all of the ad submissions daily will notice yours has arrived, and approve it so that it can be displayed on the site.  If for some reason they don\'t see fit to approve it, you will get an email sent to your real_email address explaining why.</p>\r\n%%AD_CC_PAY%%\r\n%%AD_PAYPAL_PAY%%\r\n%%AD_FREE_MESSAGE%%','1','This message is displayed when an advert has gone through all the stages of submission, apart from payment, and is waiting to be approved. If the advert needs paying for, then some more message will be displayed at the same time.\r\nIf the total cost of the advert is nothing, then |AD_FREE_MESSAGE| will be replaced by the contents of the block, ad_free_msg. AD_CC_PAY and AD_PAYPAL_PAY will be ignored.\r\nIf the site control ads_use_cc is enabled, then |AD_CC_PAY| will be replaced with the contents of the block ad_pay_cc_msg.\r\nIf the site control ads_use_paypal is enable, then |AD_PAYPAL_PAY| will be replaced with the contents of the block ad_pay_paypal_msg.\r\n','Ads','default','en');
INSERT INTO `blocks` VALUES ('ad_renewed_message','<p>Thank you for renewing your advertisement. As it\'s already been approved, you don\'t have to wait.  As soon as it\'s paid for, it will appear.</p>\r\n%%AD_CC_PAY%%\r\n%%AD_PAYPAL_PAY%%\r\n%%AD_FREE_MESSAGE%%','1','This message is displayed when an advert has gone through all the stages of renewal, apart from payment. As renewals don\'t need approving, the advert will appear as soon as it is paid for. If the advert needs paying for, then some more messages will be displayed at the same time.\r\nIf the total cost of the advert is nothing, then |AD_FREE_MESSAGE| will be replaced by the contents of the block, ad_free_msg. AD_CC_PAY and AD_PAYPAL_PAY will be ignored.\r\nIf the site control ads_use_cc is enabled, then |AD_CC_PAY| will be replaced with the contents of the block ad_pay_cc_msg.\r\nIf the site control ads_use_paypal is enable, then |AD_PAYPAL_PAY| will be replaced with the contents of the block ad_pay_paypal_msg.\r\n','Ads','default','en');
INSERT INTO `blocks` VALUES ('ad_pay_cc_msg','<p>%%norm_font%%<a\r\nhref=\"%%secure_site_url%%%%rootdir%%/special/adpay?type=cc%%payment_args%%\"><img\r\nsrc=\"%%imagedir%%/cclogos.gif\" width=\"87\" height=\"27\"\r\nborder=0 ALT=\"%%sitename%% accepts Visa and MasterCard\">\r\n<br>Pay with Visa or Mastercard</a>%%norm_font_end%%</p>','1','This message is displayed as part of the advert submission process. See the block ad_submitted_message for more information on where it will appear.\r\nThere are three special variables concerned with this. |num_impressions| will be replaced by the number of impressions ordered.\r\n|price| will be replace by the total cost of the order.\r\n|payment_args| must be present somewhere in the link url to correctly pass arguments to the payment method.','Ads','default','en');
INSERT INTO `blocks` VALUES ('ad_pay_paypal_msg','<p>%%norm_font%%<a\r\nhref=\"%%secure_site_url%%%%rootdir%%/special/adpay?type=paypal%%payment_args%%\"><img\r\nsrc=\"%%imagedir%%/paypal.gif\" width=\"87\" height=\"27\"\r\nborder=0 ALT=\"Pay with Paypal\">\r\n<br>Pay with Paypal</a>%%norm_font_end%%</p>','1','This message is displayed as part of the advert submission process. See the block ad_submitted_message for more information on where it will appear.\r\nThere are three special variables concerned with this. |num_impressions| will be replaced by the number of impressions ordered.\r\n|price| will be replace by the total cost of the order.\r\n|payment_args| must be present somewhere in the link url to correctly pass arguments to the payment method.','Ads','default','en');
INSERT INTO `blocks` VALUES ('ad_free_msg','<p>This ad is free, you don\'t have to pay for it.','1','This message is displayed as part of the advert submission process. See the block ad_submitted_message for more information on where it will appear.\r\nThere are two special variables concerned with this. |num_impressions| will be replaced by the number of impressions ordered.\r\n|price| will be replace by the total cost of the order.','Ads','default','en');
INSERT INTO `blocks` VALUES ('main_css','/* this makes IE6 not act retarded */\r\nh1, h2, h3, h4, h5, h6, p, div {\r\n         position: relative;\r\n}\r\n/* main page stuff */\r\nBODY       { background-color: #ffffff;\r\n             color: #000000; }\r\n\r\n:link      { color: #006699; }\r\n:visited   { color: #003366; }\r\n\r\n#main      { width: 100%;\r\n             border-spacing: 7px; }\r\n\r\n#main TD   { vertical-align: top; }\r\n\r\nH1         { background-color: %%title_bgcolor%%;\r\n             font-size: 1.6em;\r\n             padding: 3px;\r\n             margin: 0px; }\r\n\r\n.advert    { border: 1px solid #ff0000; }\r\n\r\n.loginform { text-align: right; }\r\n\r\n/* header and footer */\r\n\r\n#section_links { float: right;\r\n                 padding: 0.5em; }\r\n\r\n#footer    { text-align: center; }\r\n\r\n#footer FORM { display: inline; \r\n               vertical-align: top; }\r\n\r\n/* sidebar boxes */\r\n\r\n.box       { border: 1px solid black;\r\n             padding: 3px;\r\n             margin-bottom: 8px; }\r\n\r\n.box H2    { background-color: %%box_title_bg%%;\r\n             color: #ffffff;\r\n             font-size: 1.2em;\r\n             padding: 5px;\r\n             margin: -3px;\r\n             margin-bottom: 3px; }\r\n\r\n/* sections admin tool */\r\n/* this is because box_title_font is used in the code */\r\n/* and not in a DIV.box - this will be fixed in later */\r\n/* releases of Scoop as HTML is moved out of the code */\r\n\r\nTH H2        { color: #ffffff;\r\n               font-size: 1em; }\r\n\r\nTD H2        { color: #ffffff;\r\n               font-size: 1em; }\r\n\r\n/* story stuff */\r\n\r\n.story_title H2 { font-size: 1.2em;\r\n                  color: #000000;\r\n                  display: inline; }\r\n\r\n.story_summary { border-bottom: 1px dashed black;\r\n                 padding-top: 0.5em; }\r\n\r\n.story_body { padding-top: 0.5em; }\r\n\r\n.story_info { background-color: %%story_mod_bg%%;\r\n              text-align: center; }\r\n\r\n#author_console { border: 1px solid #006699;\r\n                  background-color: %%story_mod_bg%% }\r\n\r\n#vote_console { border: 1px solid #006699;\r\n                background-color: %%story_mod_bg%% }\r\n\r\n/* comment stuff */\r\n\r\n.commenthead { border: 1px solid #006699;\r\n               background-color: %%comment_head_bg%%; }\r\n\r\n.editorialhead { border: 1px solid #FF0000;\r\n                 background-color: %%comment_head_bg%%; }\r\n\r\n\r\n/* misc css */\r\n\r\n.title { font-size: 1.2em;\r\n         fint-weight: bold;\r\n       }\r\n\r\n/* tag-cloud styles */\r\n\r\n.cloud li { list-style-type: none; display: inline; margin-right: 8px; }\r\n\r\n.cloud .tag-popularity-1 { font-size: 80%; }\r\n\r\n.cloud .tag-popularity-5 { font-size: 90%; }\r\n\r\n.cloud .tag-popularity-10 { font-size: 100%; }\r\n\r\n.cloud .tag-popularity-15 { font-size: 110%; }','1','<P>This block contains the CSS stylesheet for the site. It should be what you\'d expect to find in a .css file on the filesystem, except it recognizes the standard keys for interpolation. There are no special keys. This is sent to the client via the URL |rootdir|/css/main - any other stylesheets you create must also have _css at the end of their name if you want them accessible via the css op.</p>','CSS','default','en');
INSERT INTO `blocks` VALUES ('sub_paypal_finished','Thank you, your PayPal payment has been recieved.',NULL,'Message displayed in the body of the page after a user returns from making a paypal payment.','Ads,Subscriptions','default','en');
INSERT INTO `blocks` VALUES ('new_user_email_subject','Welcome to %%sitename%%','1','<P>This block defines the subject line for the email sent to new accounts. It should be short and not have any HTML. Because this is an email it is not processed the way web pages are and the only key recognized is the special key sitename, which is replaced with the contents of the site control <B>sitename</B></P>','Accounts,Emails','default','en');
INSERT INTO `blocks` VALUES ('new_user_email','Someone requested a new user account on %%url%%/\r\nand gave this email address as their contact.\r\n\r\nIf this was you, please use the following link to activate your account:\r\n\r\n    %%url%%/activate/%%pass%%\r\n\r\n%%showprefs%%\r\nIf it wasn\'t you, please ignore this email. Our system will delete the\r\naccount automatically if it remains unused. You will not get any\r\nfurther e-mail from us. The account is free.\r\n\r\nWe hope you enjoy %%sitename%%!\r\n\r\n-- %%from%%','1','<P>This block contains the body of the email send when new accounts are created. It should not have any HTML. Because this is an email it is not processed the way web pages are and the only keys recognized are:</p>\r\n<DL>\r\n <DT>url</dt>\r\n  <DD>The full URL to the front page of the site.</dd>\r\n <DT>nick</dt>\r\n  <DD>The nickname that was just created</dd>\r\n <DT>pass</dt>\r\n  <DD>The generated password sent to the new user</dd>\r\n <DT>showprefs</dt>\r\n  <DD>If the variable <B>show_prefs_on_first_login</b> is set to 1, the contents of the block <B>new_user_email_showprefs</b>, otherwise blank.</dd>\r\n <DT>from</dt>\r\n  <DD>The email address the newuser email was sent from. This is the variable <B>new_user_email_from</b> if set, and <B>local_email</b> otherwise.</dd>\r\n</dl>','Accounts,Emails','default','en');
INSERT INTO `blocks` VALUES ('new_user_email_showprefs','After first logging in, you will be automatically redirected to your\r\nuser preferences page, where you can update your account info if you want to.\r\n\r\n','1','<P>This block contains text that will be included in the block <B>new_user_email</b> if the site control <B>show_prefs_on_first_login</b> is set to 1. It should not have any HTML. Since emails are not sent through the usual page processing, this block cannot use any of the normal keys available to most blocks.</p>','Accounts,Emails','default','en');
INSERT INTO `blocks` VALUES ('email_error','Failed to send mail. It could be a problem with the address you entered, or with the server. Please double-check the email address you entered, make sure that it is receiving email, and if still fails, copy and paste the error message and send it to %%local_email%% for help. The error message is: \"%%error%%\".','1','<P>This block is displayed when somebody attempts to create an account but the email sending process fails. The one special key recognised is <B>error</B>, which is whatever Mail::Sendmail returns as its error string.</P>','Emails,Accounts','default','en');
INSERT INTO `blocks` VALUES ('error_box','<DIV><P>%%title%%</P>\n<P>%%bid%%: %%content%%</P>\n</DIV>','1','<P>This block is used to provide a container for box output, and is not used directly in the page templates. It should be self-contained HTML. It provides the frame for the error message generated by any box that fails with a fatal error. The special keys recognised are:</P>\n<DL>\n <DT>title</DT>\n  <DD>The title of the box; if the box code returns a value for the title, that is used, otherwise the title field set in the Boxes Admin Tool is used</DD>\n <DT>content</DT>\n  <DD>The main body of the box. For a box that fails with a fatal error, the content is set by the block <B>box_failed_msg</B>. (The actual error code will be in your server error log.)</DD>\n <DT>bid</DT>\n  <DD>The internal name for the box.</DD>\n</DL>','Box Templates','default','en');
INSERT INTO `blocks` VALUES ('box_failed_msg','This box seems to be broken. Please <A href=\"mailto:%%local_email%%?subject=broken%20box%20on%20%%sitename%%\">email the site admin</A> and tell them the time and date (and your timezone) so it can be fixed.','1','<P>The message displayed inside the template <B>error_box</B> when a box fails with a fatal error. The actual error message generated will be printed to the site\'s error log. There are no special keys.</P>','Error Messages','default','en');
INSERT INTO `blocks` VALUES ('commentreply_display','<DIV>\r\n  %%title_font%%Replying To:%%title_font_end%%\r\n  %%replying_to%%\r\n  %%post_form%%\r\n</div>','1','<P>This block lays out the comment post form. It recognises the following special keys:</P>\n<DL>\n <DT>replying_to</DT>\n  <DD>The story or comment the user is replying to.</DD>\n <DT>post_form</DT>\n  <DD>The actual comment posting form. This is laid out in the block <B>comment_post_form</B>.</DD>\n</DL>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_not_logged_in','<P>%%norm_font%%You are not logged in. If you don\'t have a user account yet, by all means <A HREF=\"%%rootdir%%/newuser\">go make one</A>! If you do have one, you can post as \"yourself\" by filling in your nickname and password below. Otherwise, your comment will be posted as <B>%%anon_user_nick%%</B>.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%<A HREF=\"%%rootdir%%/newuser\">Create Account</A>\r\n<BR>Nickname: <INPUT TYPE=\"text\" SIZE=\"30\" NAME=\"uname\">\r\n<BR>Password: <INPUT TYPE=\"password\" SIZE=\"30\" NAME=\"pass\">%%norm_font_end%%</P>\r\n','1','<P>This block contains the message and login form shown when an anonymous user tries to post a comment (if anonymous users can post comments). There are no special keys. The login form must have fields named \"uname\" and \"pass\".</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_posted_display','%%comment_controls%%\r\n<div>\r\n  %%post_msg%%\r\n  %%new_comment%%\r\n</div>\r\n','1','<P>This block lays out the comment display after the comment has been posted. The special keys are:</P>\n<DL>\n <DT>comment_controls</DT>\n  <DD>the comment display options</DD>\n <DT>post_msg</DT>\n  <DD>If the user is untrusted (has a mojo below <B>rating_min</B>) the block <B>untrusted_post_message</B> is displayed here, otherwise the block <B>comment_posted_message</B></DD>\n <DT>new_comment</DT>\n  <DD>The comment just posted.</DD>\n</DL>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_post_form','<DIV>\r\n  <FORM NAME=\"postcomment\" ACTION=\"%%rootdir%%/comments/%%sid%%/%%pid%%/post#here\" METHOD=\"POST\">\r\n  %%title_font%%%%preview_msg%%%%title_font_end%%\r\n  <P>%%COMM_ERR%%</P>\r\n  %%PRE_COMMENT%%\r\n  %%title_font%%<A NAME=\"%%here%%\"><B>Post Comment</B></A>%%title_font_end%%\r\n  <P>%%norm_font%%%%not_logged_in%%%%norm_font_end%%</P>\r\n  <P>%%norm_font%%%%commentdisclaimer%%%%norm_font_end%%</P>\r\n  %%formkey_element%%\r\n  <P>%%norm_font%%%%post_as%%%%norm_font_end%%</P>\r\n  <P>%%norm_font%%Subject:%%norm_font_end%%%%pending_form%%<BR>\r\n  %%norm_font%%<INPUT TYPE=\"text\" size=50 name=\"subject\" VALUE=\"%%subject%%\" maxlength=50>%%norm_font_end%%</P>\r\n  <P>%%norm_font%%Comment:%%norm_font_end%%<BR>\r\n  %%norm_font%%<TEXTAREA NAME=\"comment\" COLS=%%textarea_cols%% ROWS=%%textarea_rows%% WRAP=\"soft\">%%comment_body%%</TEXTAREA>%%norm_font_end%%</P>\r\n  <P>%%spellcheck_form%%</P>\r\n  <P>%%sig_behavior_form%%</P>\r\n  <P>%%norm_font%%\r\n    <INPUT TYPE=\"submit\" NAME=\"preview\" VALUE=\"Preview\">\r\n    %%post_opt%%\r\n    <INPUT TYPE=\"submit\" NAME=\"post\" VALUE=\"Post\">%%norm_font_end%%</P>\r\n  <P>%%norm_font%%%%allow_tags%%%%norm_font_end%%</P>\r\n  </FORM>\r\n</DIV>','1','<P>This block lays out the comment post form. The following form elements are used:</P>\n<DL>\n <DT>subject</DT>\n  <DD>The form field for the comment subject. Generally a regular text input.</DD>\n <DT>comment</DT>\n  <DD>The form field for the comment body. Generally a textarea.</DD>\n <DT>preview</DT>\n  <DD>The \"preview\" button. Value can be anything that isn\'t a perl false value (zero or empty string)</DD>\n <DT>post</DT>\n  <DD>The \"post\" button. Value can be anything that isn\'t a perl false value (zero or empty string)</DD>\n</DL>\n<P>The following special keys are used:</P>\n<DL>\n <DT>sid</DT>\n  <DD>The sid of the story the comment will be attached to</DD>\n <DT>pid</DT>\n  <DD>The comment ID of the comment being replied to</DD>\n <DT>preview_msg</DT>\n  <DD>The contents of the block <B>comment_preview_msg</B>, if there\'s a comment currently being previewed.</DD>\n <DT>COMM_ERR</DT>\n  <DD>Any error messages generated during the post or preview process.</DD>\n <DT>PRE_COMMENT</DT>\n  <DD>The formatted comment being previewed</DD>\n <DT>here</DT>\n  <DD>Either \"here\" (if there\'s no comment being previewed) or \"there\" (if there is) so that the anchors work out properly</DD>\n <DT>not_logged_in</DT>\n  <DD>The contents of the block <B>comment_not_logged_in</B> if the user is not currently logged in</DD>\n <DT>formkey_element</DT>\n  <DD>The formkey for the comment post form</DD>\n <DT>post_as</DT>\n  <DD>If anonymous users are allowed to post and the user is logged in, this is a selectbox that allows the user to choose whether to post anonymously or not</DD>\n <DT>pending_form</DT>\n  <DD>If the story is still in the queue, this is a selectbox that allows the user to choose whether to post an editorial or topical comment.</DD>\n <DT>subject</DT>\n  <DD>The comment\'s subject, used as a default value for the subject form element</DD>\n <DT>textarea_cols</DT>\n  <DD>The user preference for size of the textarea</DD>\n <DT>textarea_rows</DT>\n  <DD>The user preference for size of the textarea</DD>\n <DT>comment_body</DT>\n  <DD>The comment\'s body, used as a default value for the comment form element</DD>\n <DT>spellcheck_form</DT>\n  <DD>The contents of the block <B>spellcheck_form_item</B> if spellcheck is turned on</DD>\n <DT>sig_behavior_form</DT>\n  <DD>A form element that allows users to choose whether or how to display their sig, if permitted and if they have a sig</DD>\n <DT>post_opt</DT>\n  <DD>A form element that allows users to choose which post mode (plain text, autoformat, html) they want to use</DD>\n <DT>allow_tags</DT>\n  <DD>The \"allowed HTML\"</DD>\n</DL>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_preview_msg','%%title_font%%<A NAME=\"here\">Preview Comment</A>%%title_font_end%%','1','<P>This is the \"Preview Comment\" title bar. Make sure it has an anchor named \"here\" in it. There are no special keys.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('spellcheck_form_item','%%norm_font%%Spellcheck text (will force \"Preview\"): <INPUT TYPE=\"checkbox\" NAME=\"spellcheck\" VALUE=\"on\"%%checked%%>%%norm_font_end%%','1','<P>This is the form element displayed when spellcheck is available. There is one special key, checked, which makes the checkbox pre-checked or not, depending on user action or preferences.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('invalid_user_msg','Sorry, I can\'t seem to find that user','1','<P>The error message displayed when somebody requests a page for a user that doesn\'t exist</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('selectbox_pref','<DIV class=\"item\">\r\n<P><B>%%required%%%%title%%:</B> %%control%%\r\n<BR>%%description%%</P>\r\n</DIV>','1','<P>The preference item template generally used for selectboxes. This should be a self-contained bit of HTML as it is used to display a single user preference, both on the user info page and the preferences edit forms. The following special keys are recognised:</P>\n<DL>\n <DT>required</DT>\n  <DD>If the preference is required, the contents of <B>required_pref_marker</B>, otherwise blank</DD>\n <DT>title</DT>\n  <DD>The displayed title of the preference, as set in the User Preferences Admin Tool</DD>\n <DT>control</DT>\n  <DD>On the preferences edit form, this is the form field required for the preference, as set in the User Preferences Admin Tool. On the user info page, this is the value of the preference</DD>\n <DT>description</DT>\n  <DD>On the preferences edit form, this is the description as entered in the User Preferences Admin Tool. On the user info page, this is not displayed.</DD>\n <DT>allowed_html</DT>\n  <DD>If the preference supports HTML, displays the \"Allowed HTML\" string.</DD>\n</DL>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('text_pref','<DIV class=\"item\">\r\n<P><B>%%required%%%%title%%:</B> %%description%%\r\n<BR>%%allowed_html%%\r\n<BR>%%control%%</P>\r\n</DIV>','1','<P>The preference item template generally used for text boxes. This should be a self-contained bit of HTML as it is used to display a single user preference, both on the user info page and the preferences edit forms. The following special keys are recognised:</P>\n<DL>\n <DT>required</DT>\n  <DD>If the preference is required, the contents of <B>required_pref_marker</B>, otherwise blank</DD>\n <DT>title</DT>\n  <DD>The displayed title of the preference, as set in the User Preferences Admin Tool</DD>\n <DT>control</DT>\n  <DD>On the preferences edit form, this is the form field required for the preference, as set in the User Preferences Admin Tool. On the user info page, this is the value of the preference</DD>\n <DT>description</DT>\n  <DD>On the preferences edit form, this is the description as entered in the User Preferences Admin Tool. On the user info page, this is not displayed.</DD>\n <DT>allowed_html</DT>\n  <DD>If the preference supports HTML, displays the \"Allowed HTML\" string.</DD>\n</DL>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('user_admin','<DIV class=\"admin_prefs\">\r\n<P><B>Nickname:</B> <INPUT type=\"text\" length=\"30\" name=\"nickname\" value=\"%%nickname%%\">\r\n</P>\r\n<P><B>User ID:</B> %%uid%%</P>\r\n<P><B>User group:</B> %%BOX,user_group_box,%%perm_group%%%%</P>\r\n<P><B>Original Email:</B> %%origemail%%</P>\r\n<P><B>Created At:</B> %%creation_time%%</P>\r\n<P><B>Original IP:</B> %%creation_ip%%</P>\r\n<P><B>User\'s current mojo:</B> %%mojo%%</P>\r\n</DIV>','1','<P>This block displays admin-only user info on the Protected user preference page. This should be a self-contained block of HTML. It is displayed just above the real email and password fields on the Protected user preference page for users with the <B>edit_user</B> perm only. The following special keys are recognised:</P>\n<DL>\n <DT>nickname</DT>\n  <DD>The nickname of the user being edited</DD>\n <DT>perm_group</DT>\n  <DD>The current group of the user being edited</DD>\n <DT>origemail</DT>\n  <DD>The email address used when the account was created</DD>\n <DT>creation_time</DT>\n  <DD>The date and time the account was created</DD>\n <DT>creation_ip</DT>\n  <DD>The IP address the account was created from</DD>\n <DT>mojo</DT>\n  <DD>The user\'s current mojo</DD>\n</DL>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('user_pass','<DIV class=\"prefs\">\r\n<P><B><font color=\"#ff0000\">Protected settings</font></B>\r\n%%passwd%%\r\n<P><B>Real Email:</B> <INPUT type=\"text\" name=\"realemail\" value=\"%%realemail%%\">\r\n<BR>This is the address that will be used to email forgotten passwords. It will not be shown anywhere. Please do not insert any kind of spam protection here, or you will not be able to get a new password!</P>\r\n\r\n<P><B>New Password:</B> Leave both fields blank for no change. This is asked twice to detect typos.\r\n<BR>New Password: <INPUT TYPE=\"password\" SIZE=\"30\" NAME=\"pass1\">\r\n<BR>Confirm: <INPUT TYPE=\"password\" SIZE=\"30\" NAME=\"pass2\">\r\n</DIV>','1','<P>This block displays the user portion of the Protected user preferences page. The following special keys are recognised:</P>\n<DL>\n <DT>passwd</DT>\n  <DD>The entire form field for password entry. If it is a user\'s first login, the form field is hidden.</DD>\n <DT>realemail</DT>\n  <DD>The current value of the user\'s real email</DD>\n</DL>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('user_info_page','%%title_font%%User Info%%title_font_end%%\r\n%%BOX,userpref_menu%%\r\n<DIV>\r\n%%trusted_msg%%\r\n%%BOX,subscriber%%\r\n%%itemlist%%\r\n</DIV>','1','<P>This block contains the content column template for the displayed user info page. It should be self-contained HTML and contain the page title (the title bar most pages have, just under the header). The following special keys are recognised:</P>\n<DL>\n <DT>trusted_msg</DT>\n  <DD>If the user is trusted and viewing his own user info page, the contents of the block <B>trusted_info_message</B> are displayed.</DD>\n <DT>itemlist</DT>\n  <DD>Those user preferences which are visible and have some value, each formatted by their pref template</DD>\n</DL>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('user_pref_page','%%title_font%%User Preferences: %%page%%%%title_font_end%%\r\n%%BOX,userpref_menu%%\r\n%%message%%\r\n<DIV>\r\n<FORM action=\"%%rootdir%%/user/%%nick%%/prefs/%%page%%\" method=\"post\">\r\n%%formkey%%\r\n\r\n%%itemlist%%\r\n\r\n<INPUT type=\"submit\" name=\"write\" value=\"Save Preferences\">\r\n%%userpref_reset%%\r\n</FORM>\r\n</DIV>','1','<P>This block contains the content column template for the user preference edit pages. It should be self-contained HTML and contain the page title (the title bar most pages have, just under the header). The following special keys are recognised:</P>\n<DL>\n <DT>page</DT>\n  <DD>The name of the preference page currently being edited</DD>\n <DT>nick</DT>\n  <DD>The nickname of the user currently being edited</DD>\n <DT>formkey</DT>\n  <DD>A formkey, for a bit of security (mostly against double-clicks on the save button)</DD>\n <DT>message</DT>\n  <DD>Any status or error messages generated by an attempt to save or reset the preferences</DD>\n <DT>itemlist</DT>\n  <DD>The preferences for this page, formatted by their pref item templates</DD>\n <DT>userpref_reset</DT>\n  <DD>The contents of the block <B>userpref_reset</B> (a reset button) if the current page is anything other than Protected; the Protected page has no reset button.</DD>\n</DL>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('firstlogin_message','<p><b>Welcome to %%sitename%%!</b> As this is your first login, you probably want to change some of the settings on this and the other preference pages. None of these changes are required. Enjoy your stay.</p>\r\n<p>If you don\'t want to make any changes, you can <a href=\"%%rootdir%%/\">go to the front page</a>.</p>','1','<P>This block is displayed at the top of the Protected settings page the first time a user logs in, if the variable <B>show_prefs_on_first_login</b> is on. It should be self-contained HTML that encourages the new user to change his password and explore the other preference pages. There are no special keys.</p>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('formkey_err','Invalid form key. You probably tried to save your settings more than once. Do not hit \"BACK\"! If you are certain that your settings have not been saved, try to save them from this screen.','1','<P>The error message displayed if there is a formkey error, such as a user double-clicking a button or going too long between loading the form and submitting it.</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('edit_prefs','%%title_font%%Edit User Preferences%%title_font_end%%\r\n\r\n<P>%%err_font%%%%update_msg%%%%err_font_end%%</P>\r\n\r\n<FORM action=\"%%rootdir%%/admin/prefs\" method=\"post\">\r\n<INPUT type=\"submit\" name=\"save\" value=\"Save\">\r\n<INPUT type=\"submit\" name=\"get\" value=\"Get\">\r\n\r\n<TABLE border=\"0\">\r\n  <TR>\r\n    <TD><B>Select Preference:</B></TD>\r\n    <TD>%%pref_selectbox%%</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD colspan=\"2\"><B>Delete:</B> <INPUT type=\"checkbox\" name=\"delete\" value=\"1\"> Many prefs should be disabled (not deleted) if you want to prevent users from changing them, as Scoop requires their default values in order to run correctly.</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Name:</B></TD>\r\n    <TD><INPUT type=\"text\" size=\"20\" maxlength=\"32\" name=\"prefname\" value=\"%%pref_name%%\"> <B>Enabled:</B><INPUT type=\"checkbox\" name=\"enabled\" value=\"1\"%%pref_enabled%%></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Title:</B></TD>\r\n    <TD><INPUT type=\"text\" size=\"50\" maxlength=\"50\" name=\"title\" value=\"%%pref_title%%\"></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Description:</B>\r\n      <BR>The description may contain any HTML or normal block reference.</TD>\r\n    <TD><TEXTAREA rows=\"%%rows%%\" cols=\"%%cols%%\" name=\"description\">%%pref_desc%%</TEXTAREA></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Default Value:</B></TD>\r\n    <TD><INPUT type=\"text\" size=\"30\" name=\"default_value\" value=\"%%pref_default%%\"></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD colspan=\"2\">&nbsp;</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD colspan=\"2\"><B>Preference Display Settings</B></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Shown on signup page?</B></TD>\r\n    <TD><INPUT type=\"radio\" name=\"signup\" value=\"normal\"%%pref_signup_normal%%> No\r\n    <BR><INPUT type=\"radio\" name=\"signup\" value=\"signup\"%%pref_signup_signup%%> Yes\r\n    <BR><INPUT type=\"radio\" name=\"signup\" value=\"required\"%%pref_signup_required%%> Yes, and it\'s required</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Preferences page:</B></TD>\r\n    <TD><INPUT type=\"text\" size=\"20\" maxlength=\"50\" name=\"page\" value=\"%%pref_page%%\"></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Order on page:</B></TD>\r\n    <TD><INPUT type=\"text\" size=\"5\" maxlength=\"5\" name=\"display_order\" value=\"%%pref_order%%\"></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Control to display:</B>\r\n      <BR>Special key <I>value</I> is the current value of the preference</TD>\r\n    <TD><INPUT type=\"text\" size=\"50\" name=\"field\" value=\"%%pref_field%%\"></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Template:</B></TD>\r\n    <TD>%%pref_template%%</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Visible on public user info page?</B></TD>\r\n    <TD><INPUT type=\"checkbox\" name=\"visible\" value=\"1\"%%pref_visible%%></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Formatting to apply to value</B></TD>\r\n    <TD><INPUT type=\"text\" name=\"display_fmt\" value=\"%%pref_fmt%%\" size=\"50\"></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD colspan=\"2\">&nbsp;</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD colspan=\"2\"><B>Requires</B></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Site Control:</B></TD>\r\n    <TD>%%pref_var%%</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Perm to view:</B></TD>\r\n    <TD>%%pref_perm_view%%</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Perm to edit:</B></TD>\r\n    <TD>%%pref_perm_edit%%</TD>\r\n  </TR>\r\n  <TR>\r\n  <TD><B>Trusted User status:</B></TD>\r\n    <TD><INPUT type=\"checkbox\" name=\"req_tu\" value=\"1\"%%pref_tu%%></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD colspan=\"2\">&nbsp;</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD colspan=\"2\"><B>Validation</B> (blank to allow anything)</TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>HTML allowed?</B></TD>\r\n    <TD><INPUT type=\"checkbox\" name=\"html\" value=\"1\"%%pref_html%%></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Field length:</B></TD>\r\n    <TD><INPUT type=\"text\" size=\"5\" maxlength=\"5\" name=\"length\" value=\"%%pref_length%%\"></TD>\r\n  </TR>\r\n  <TR>\r\n    <TD><B>Box or regular expression:</B>\r\n      <BR>either a perl regex (pipes escaped) or BOX,boxname[,args]</TD>\r\n    <TD><INPUT type=\"text\" size=\"50\" name=\"regex\" value=\"%%pref_regex%%\"></TD>\r\n  </TR>\r\n</TABLE>\r\n\r\n<INPUT type=\"submit\" name=\"save\" value=\"Save\">\r\n<INPUT type=\"submit\" name=\"get\" value=\"Get\">\r\n</FORM>\r\n','1','','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('userpref_reset','<INPUT type=\"submit\" name=\"reset\" value=\"Reset Preferences\">','1','<P>This block contains the reset button for the userpref pages. The button must be named \"reset\" but you can otherwise change how it looks.</p>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('userpref_oldpass_field','You must enter your account password to change protected settings.\r\n<BR><B>Password:</B><INPUT TYPE=\"password\" SIZE=\"30\" NAME=\"verify_me\"></P>\r\n','1','<P>This block is the description and form element in which the user enters his old password to change protected settings. On the user\'s first login, the block <B>userpref_oldpass_hidden</B> is used instead.</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('userpref_oldpass_hidden','<INPUT TYPE=\"hidden\" NAME=\"verify_me\" value=\"%%pass%%\">','1','<P>This block is the hidden form element containing the user\'s old password. It is only used on the user\'s first login; the block <B>userpref_oldpass_field</B> is used the rest of the time.</P>','Accounts','default','en');
INSERT INTO `blocks` VALUES ('required_pref_marker','<FONT color=\"#ff0000\">*</FONT>','1','','Accounts','default','en');
INSERT INTO `blocks` VALUES ('special_page_layout','<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\r\n  <TR>\r\n    <TD\r\nBGCOLOR=\"%%title_bgcolor%%\">%%title_font%%<B>%%title%%</B>%%title_font_end%%</TD>\r\n  </TR>\r\n  <TR><TD> </TD></TR>\r\n  <TR>\r\n<TD>%%norm_font%%%%content%%%%norm_font_end%%</TD>\r\n  </TR>\r\n</TABLE>','1','<P>This is the structure all pages created in the Special Pages admin tool are formatted with. The special keys are:</P>\n<DL>\n <DT>title</DT>\n  <DD>The title of the special page, as set in the Special Pages admin tool</DD>\n <DT>content</DT>\n  <DD>The content of the special page, as set in the Special Pages admin tool</DD>\n</DL>','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('admin_calendar_list','<P>%%msg%%</P>\n\n<TABLE width=\"100%\" cellpadding=\"2px\" cellspacing=\"0\">\n  <TR>\n    <TH>Calendar</TH>\n    <TH>Owner</TH>\n    <TH>Actions</TH>\n  </TR>\n%%calendar_list_rows%%\n</TABLE>\n\n<FORM name=\"newcal\" action=\"%%rootdir%%/admin/calendar/list\" method=\"POST\">\n  <P><B>Create a new site-wide calendar</B></P>\n  <P>Title: <INPUT type=\"text\" name=\"title\" size=\"30\">\n  <FIELDSET><LEGEND>View Permissions:</LEGEND>\n  <INPUT type=\"radio\" name=\"public_view\" value=\"public\"> Everybody\n  <BR><INPUT type=\"radio\" name=\"public_view\" value=\"invite\"> Only people on the invitation list\n  <BR><INPUT type=\"radio\" name=\"public_view\" value=\"private\"> Only admins\n  </FIELDSET><BR>\n  <FIELDSET><LEGEND>Submit permissions:</LEGEND>\n  <INPUT type=\"radio\" name=\"public_submit\" value=\"public\"> Everybody\n  <BR><INPUT type=\"radio\" name=\"public_submit\" value=\"modpublic\"> Everybody, but an admin will review the events before they\'re visible\n  <BR><INPUT type=\"radio\" name=\"public_submit\" value=\"invite\"> Only people on the invitation list\n  <BR><INPUT type=\"radio\" name=\"public_submit\" value=\"modinvite\"> Only people on the invitation list, but an admin will review the events before they\'re visible\n  <BR><INPUT type=\"radio\" name=\"public_submit\" value=\"private\"> Only admins</FIELDSET>\n  <BR><INPUT type=\"submit\" name=\"create\" value=\"Create\"></P>\n  \n</FORM>','1','<P>This block creates the calendar list admin tool. This is inserted into the block <B>admin_calendar_main</b> when you are working specifically with the calendar list. The names of the form elements should not be changed. The following special keys are recognized:</p>\n<DL>\n <DT>msg</dt>\n  <DD>Any status or error messages.</dd>\n <DT>calendar_list_rows</dt>\n  <DD>All of the rows containing the calendars. Each row is built from the block <B>admin_calendar_list_item</b>.</dd>\n</dl>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('admin_calendar_list_item','  <TR>\n    <TD><A href=\"%%rootdir%%/calendar//%%cal_id%%\">%%title%%</A><BR>%%description%%</TD>\n    <TD><A href=\"%%rootdir%%/user/%%owner_nick%%\">%%owner_nick%%</A></TD>\n    <TD>[<A href=\"%%rootdir%%/admin/calendar/list?delete=%%cal_id%%\">delete</A>] [<A href=\"%%rootdir%%/editcalendar/settings/%%cal_id%%\">edit</A>]</TD>\n  </TR>\n','1','<P>This block formats a single item of the calendar list admin tool. The following special keys are recognized:</p>\n<DL>\n <DT>cal_id</dt>\n  <DD>The ID number of the calendar being formatted here</dd>\n <DT>title</dt>\n  <DD>The calendar\'s title</dd>\n <DT>owner</dt>\n  <DD>The calendar\'s owner\'s UID</dd>\n <DT>owner_nick</dt>\n  <DD>The calendar\'s owner\'s nickname</dd>\n <DT>description</dt>\n  <DD>The calendar description</dd>\n <DT>public_view</dt>\n  <DD>The view permission status</dd>\n <DT>public_submit</dt>\n  <DD>The event submission permission status</dd>\n</dl>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('admin_calendar_main','  <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n    <tr>\n      <td bgcolor=\"%%title_bgcolor%%\">%%title_font%%Events and Calendars%%title_font_end%%</td>\n    </tr>\n  </table>\n  <P><a href=\"%%rootdir%%/admin/calendar/list\">Calendar List</A>\n  <A href=\"%%rootdir%%/admin/calendar/eventlist\">Event List</A>\n  <A href=\"%%rootdir%%/admin/calendar/eventproperties\">Event Properties</A></P>\n\n%%calendar_form%%\n','1','<P>This block is used to create the Calendars Admin Tool page.  It should be self-contained HTML.  The special keys recognised are:</p>\n<DL>\n <DT>calendar_form</dt>\n  <DD>The page for the particular tool requested within the calendar admin tool</dd>\n</dl>\n','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('admin_event_list','<P>%%error_font%%%%admin_events_errormsg%%%%error_font_end%%</P>\n<P>%%prevlink%%</P>\n<table width=\"100%\" cellpadding=\"2px\" cellspacing=\"0\">\n  <tr>\n    <th>Event</th>\n    <th>Organizer</th>\n    <th>Calendar(s)</th>\n  </tr>\n%%list%%\n</table>\n<P align=\"right\">%%nextlink%%</P>\n','1','<P>This block is used to create the Event List for the Calendar Admin Tool.</p>\n<DL>\n <DT>admin_events_errmsg</dt>\n  <DD>Any error or status message</dd>\n <DT>prevlink</dt>\n  <DD>If we are not on the first page, a link to the previous page. Formatted with the block <B>prev_page_link</b></dd>\n <DT>nextlink</dt>\n  <DD>If there are more events than those shown on this and earlier pages, a link to the next page. Formatted with the block <B>next_page_link</b></dd>\n <DT>list</dt>\n  <DD>The actual list of events. Each row is formatted using the block <B>admin_event_list_item</b></dd>\n</dl>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('admin_event_list_item','  <tr bgcolor=\"%%rowbg%%\">\n    <td><A href=\"%%rootdir%%/event/%%eid%%\">%%title%%</A> [<A href=\"%%rootdir%%/submitevent/edit/%%eid%%\">edit</A>] (%%date_start%%)</td>\n    <td><A href=\"%%rootdir%%/user/%%owner_nick%%\">%%owner_nick%%</A></td>\n    <td>%%cal_list%%</td>\n  </tr>\n','1','<P>This block is used to format each row in the event list in the calendars admin tool. The following special keys are recognized:</p>\n<DL>\n <DT>eid</dt>\n  <DD>The event ID number</dd>\n <DT>rowbg</dt>\n  <DD>This toggles between blank and the value in <B>story_mod_bg</b> so rows can be easily distinguished</dd>\n <DT>owner_nick</dt>\n  <DD>The event owner\'s nickname</dd>\n <DT>cal_list</dt>\n  <DD>The list of calendars this event is included in, each formatted using the block <B>admin_event_list_item_cals</b></dd>\n</dl>\n<P>Also recognized are all valid event fields, including all built-in fields and all fields defined in Event Properties.</p>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('admin_event_list_item_cals','%%primary_marker%% <A href=\"%%rootdir%%/calendar//%%cal_id%%/%%date_start%%\">%%title%%</A> [<A href=\"%%rootdir%%/editcalendar/settings/%%cal_id%%\">edit</A>] <A href=\"%%rootdir%%/user/%%owner_nick%%\">%%owner_nick%%</A><br>\n','1','<P>This block is used to format each calendar an event is included in, for the event list in the calendars admin tool. The special keys recognized are:</p>\n<DL>\n <DT>primary_marker</dt>\n  <DD>A mark used to indicated which calendar the event is primarily associated with and hence where it draws its permissions from</dd>\n <DT>cal_id</dt>\n  <DD>The ID number of the calendar</dd>\n <DT>owner_nick</dt>\n  <DD>The owner of the calendar\'s nickname</dd>\n</dl>\n<P>Also recognized are all calendar properties and all event properties and event fields which do not share a name with a calendar property.</p>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('admin_event_properties','<form name=\"event_properties\" action=\"%%rootdir%%/admin/calendar/eventproperties\" method=\"post\">\n  <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n    <tr><td>%%error_font%%%%admin_events_errormsg%%%%error_font_end%%</td></tr>\n    <tr>   \n      <td>%%norm_font%%<b>Property:</b> %%admin_events_property_menu%%\n        <input type=\"submit\" name=\"get\" value=\"Get Event Property\" /></font></td>\n    </tr><tr><td>\n%%norm_font%%<b>%%admin_events_delete_check%%</b></font>\n</td></tr>\n    <tr>\n      <td>%%norm_font%%<b>Property ID:</b>\n        <input type=\"text\" name=\"property\" value=\"%%admin_events_property%%\" size=\"40\" />\n      </font></td>\n    </tr>\n    <tr>\n      <td>%%norm_font%%<b>Title:</b>\n        <input type=\"text\" name=\"title\" value=\"%%admin_events_title%%\" size=\"40\" />\n      </font></td>\n    </tr>\n    <tr>\n      <td>%%norm_font%%<b>Format on event page:</b><INPUT type=\"text\" size=\"40\" name=\"template\" value=\"%%admin_events_template%%\">%%norm_font_end%%</td>\n    </tr>\n    <tr>\n      <td>%%norm_font%%<b>Format in calendar view:</b><INPUT type=\"text\" size=\"40\" name=\"calendar_template\" value=\"%%admin_events_calendar_template%%\">%%norm_font_end%%</td>\n    </tr>\n    <tr>\n      <td><input type=\"checkbox\" name=\"enabled\" value=\"1\"%%admin_events_enabled_checked%% />\n        %%norm_font%%Enabled%%norm_font_end%%\n        <input type=\"checkbox\" name=\"required\" value=\"1\"%%admin_events_required_checked%% />\n        %%norm_font%%Required%%norm_font_end%%\n        <input type=\"checkbox\" name=\"html\" value=\"1\"%%admin_events_html_checked%% />\n        %%norm_font%%HTML allowed%%norm_font_end%%\n        <input type=\"checkbox\" name=\"is_date\" value=\"1\"%%admin_events_is_date_checked%% />\n        %%norm_font%%Property is a date%%norm_font_end%%\n      </td>\n    </tr>\n    <tr><td>%%norm_font%%<b>Display order:</b> <input type=\"text\" name=\"display_order\" size=\"5\" value=\"%%admin_events_display_order%%\"></td></tr>\n    <tr><td>%%norm_font%%<b>Form field:</b>\n    %%admin_events_field_list%% %%admin_events_field_edit%%%%norm_font_end%%</td>\n    </tr>\n    <tr><td>%%norm_font%%<b>Validation regex:</b> <INPUT type=\"text\" size=\"30\" name=\"regex\" value=\"%%admin_events_regex%%\">%%norm_font_end%%</td></tr>\n    <tr><td>%%norm_font%%<b>This property requires:</b>%%admin_events_requires_menu%%%%norm_font_end%%</td></tr>\n    <tr><td>%%norm_font%%<b>Description:</b>%%norm_font_end%%</td></tr>\n    <tr>\n      <td>%%norm_font%%\n        <textarea cols=\"50\" rows=\"5\" name=\"description\" wrap=\"soft\">%%admin_events_description%%</textarea>\n      </font></td>\n    </tr>\n    <tr><td>%%norm_font%%\n      <input type=\"submit\" name=\"write\" value=\"Save Event Property\" /> <input type=\"reset\" />\n    </font></td></tr>\n  </table>\n</form>\n','1','<P>This block is used to create the Event Properties Admin Tool page.  It must contain all of the form elements used in the Event Properties Admin page, and should be self-contained HTML.  The special keys recognised are:</p>\n<DL>\n <DT>admin_events_errormsg</dt>\n  <DD>A message indicating whether a save was successful or not, and if not, the text of the error message</dd>\n <DT>admin_events_property_menu</dt>\n  <DD>The select box used to choose an event property to edit</dd>\n <DT>admin_events_delete_check</dt>\n  <DD>The delete checkbox displayed when an event property is being edited</dd>\n <DT>admin_events_template_menu</dt>\n  <DD>The select box used to choose the template block to use for a particular event property</dd>\n <DT>admin_events_template_link</dt>\n  <DD>A link to the block admin tool to edit the event property template selected for the event property currently being edited</dd>\n <DT>admin_events_enabled_checked</dt>\n  <DD>The \"checked\" status of the checkbox which determines whether or not the event property is enabled</dd>\n <DT>admin_events_required_checked</dt>\n  <DD>The \"checked\" status of the checkbox which determines whether or not the event property is required</dd>\n <DT>admin_events_property</dt>\n  <DD>The name of the event property currently being edited</dd>\n <DT>admin_events_title</dt>\n  <DD>The title of the event property currently being edited</dd>\n <DT>admin_events_description</dt>\n  <DD>The description of the event property currently being edited</dd>\n <DT>admin_events_field</dt>\n  <DD>The HTML form field for the event property currently being edited.</dd>\n <DT>admin_events_order</dt>\n  <DD>The display order for the current event property</dd>\n </dl>\n<P>Do not change the names of the form elements, or remove any form elements, or event property editing may fail in unexpected ways.</p>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('calendar_body_daily','<table border=0 cellpadding=0 cellspacing=0 width=\"100%\"><tr><td>\r\n<DIV class=\"cal_head\">\r\n<div class=\"title\">%%calendar_title%% - %%dow%% <a href=\"%%rootdir%%/calendar/monthly/%%cal_id%%/%%year%%-%%monthnum%%\">%%month%%</a> %%day_num%%, %%year%%</div>\r\n%%BOX,calendar_actions%%\r\n<table align=\"center\" border=0 cellpadding=0 cellspacing=0><tr><td>\r\n<UL>\r\n%%BOX,calendar_datenav%%\r\n</UL>\r\n</td></tr></table>\r\n</DIV>\r\n</td></tr></table>\r\n<p>\r\n<DIV class=\"cal_body\">\r\n\r\n<table width=\"100%\" border=0 cellpadding=0 cellspacing=0 style=\"border-right: 1px solid black; border-bottom: 1px solid black;\">\r\n<tr>%%day%%</tr>\r\n</table>\r\n</div>','1','<P>This block formats the body of the calendar in \"daily\" view. This should be a self-contained block of HTML that can be inserted anywhere. The following special keys are recognized:</P>\n<DL>\n <DT>day</DT>\n  <DD>the contents of <B>calendar_body_one_day</B> for the given date</DD>\n <DT>subscribe_link</DT>\n  <DD>The link to subscribe (or unsubscribe) to this calendar, if viewing one calendar.</DD>\n <DT>calendar_title</dt>\n  <DD>The title of the current calendar</dd>\n <DT>date</dt>\n  <DD>The date being viewed (YYYY-MM-DD)</dd>\n <DT>mediumdate</dt>\n  <DD>The date being viewed (DD-Mmm-YYYY)</dd>\n <DT>longdate</dt>\n  <DD>The date being viewed (Wwwwww, DD Mmmmmmm YYYY)</dd>\n <DT>dow</dt>\n  <DD>The name of the day of the week being viewed (Monday, Tuesday, etc)</dd>\n <DT>dow_short</dt>\n  <DD>The abbreviated day of the week being viewed (Mon, Tues, etc)</dd>\n <DT>day_num</dt>\n  <DD>The day number</dd>\n <DT>day_ord</dt>\n  <DD>The day number in ordinal form (1st, 2nd, 3rd, etc)</dd>\n <DT>month</dt>\n  <DD>The name of the month</dd>\n <DT>monthnum</dt>\n  <DD>The number of the month</dd>\n <DT>year</dt>\n  <DD>The year.</dd>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_body_monthly','<table border=0 cellpadding=0 cellspacing=0 width=\"100%\"><tr><td>\r\n<DIV class=\"cal_head\">\r\n<div class=\"title\">%%calendar_title%% - %%longdate%%</div>\r\n%%BOX,calendar_actions%%\r\n<table align=\"center\" border=0 cellpadding=0 cellspacing=0><tr><td>\r\n<UL>\r\n%%BOX,calendar_datenav%%\r\n</UL>\r\n</td></tr></table>\r\n</DIV>\r\n</td></tr></table>\r\n<p>\r\n<DIV class=\"cal_body\">\r\n\r\n<TABLE width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-right: 1px solid black; border-bottom: 1px solid black;\">\r\n<TR>\r\n <TH>Monday</TH>\r\n <TH>Tuesday</TH>\r\n <TH>Wednesday</TH>\r\n <TH>Thursday</TH>\r\n <TH>Friday</TH>\r\n <TH>Saturday</TH>\r\n <TH>Sunday</TH>\r\n <TH> </TH>\r\n</TR>\r\n%%rows%%\r\n</TABLE>\r\n</DIV>\r\n%%subscribe_link%%','1','<P>This block formats the body of the calendar in \"monthly\" view. This should be a self-contained block of HTML that can be inserted anywhere. The following special keys are recognized:</P>\n<DL>\n <DT>wk*_d*</DT>\n  <DD>The week number within the month and day number within the week. The code replaces each of these with the contents of <B>calendar_body_one_day</B> formatted for the appropriate day.</DD>\n <DT>wk*</DT>\n  <DD>The week number within the month. The code replaces each of these with the date of the monday of that week.</DD>\n <DT>cal_id</DT>\n  <DD>The ID of the calendar currently being viewed, or zero for the current user\'s personal calendar view.</DD>\n <DT>subscribe_link</DT>\n  <DD>The link to subscribe (or unsubscribe) to this calendar, if viewing one calendar.</DD>\n <DT>calendar_title</dt>\n  <DD>The title of the current calendar</dd>\n <DT>date</dt>\n  <DD>The month being viewed (YYYY-MM)</dd>\n <DT>longdate</dt>\n  <DD>The month being viewed (Mmmmmmm YYYY)</dd>\n <DT>month</dt>\n  <DD>The name of the month</dd>\n <DT>monthnum</dt>\n  <DD>The number of the month</dd>\n <DT>year</dt>\n  <DD>The year.</dd>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_body_monthly_mini','<DIV class=\"cal_body\">\r\n<P align=\"center\"><A href=\"%%rootdir%%/calendar/monthly/\">%%month%% %%year%%</A></P>\r\n<TABLE width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\r\n<TR>\r\n <TH>M</TH>\r\n <TH>T</TH>\r\n <TH>W</TH>\r\n <TH>T</TH>\r\n <TH>F</TH>\r\n <TH>S</TH>\r\n <TH>S</TH>\r\n</TR>\r\n<TR>\r\n %%wk1_d1%%\r\n %%wk1_d2%%\r\n %%wk1_d3%%\r\n %%wk1_d4%%\r\n %%wk1_d5%%\r\n %%wk1_d6%%\r\n %%wk1_d7%%\r\n</TR>\r\n<TR>\r\n %%wk2_d1%%\r\n %%wk2_d2%%\r\n %%wk2_d3%%\r\n %%wk2_d4%%\r\n %%wk2_d5%%\r\n %%wk2_d6%%\r\n %%wk2_d7%%\r\n</TR>\r\n<TR>\r\n %%wk3_d1%%\r\n %%wk3_d2%%\r\n %%wk3_d3%%\r\n %%wk3_d4%%\r\n %%wk3_d5%%\r\n %%wk3_d6%%\r\n %%wk3_d7%%\r\n</TR>\r\n<TR>\r\n %%wk4_d1%%\r\n %%wk4_d2%%\r\n %%wk4_d3%%\r\n %%wk4_d4%%\r\n %%wk4_d5%%\r\n %%wk4_d6%%\r\n %%wk4_d7%%\r\n</TR>\r\n<TR>\r\n %%wk5_d1%%\r\n %%wk5_d2%%\r\n %%wk5_d3%%\r\n %%wk5_d4%%\r\n %%wk5_d5%%\r\n %%wk5_d6%%\r\n %%wk5_d7%%\r\n</TR>\r\n<TR>\r\n %%wk6_d1%%\r\n %%wk6_d2%%\r\n %%wk6_d3%%\r\n %%wk6_d4%%\r\n %%wk6_d5%%\r\n %%wk6_d6%%\r\n %%wk6_d7%%\r\n</TR>\r\n</TABLE>\r\n\r\n</DIV>','1','<P>This block formats the body of the mini monthly calendar on the front page. This should be a self-contained block of HTML that can be inserted anywhere. The following special keys are recognized:</p>\n<DL>\n <DT>wk*_d*</dt>\n  <DD>The week number within the month and day number within the week. The code replaces each of these with the contents of <B>calendar_body_one_day</b> formatted for the appropriate day.</dd>\n <DT>cal_id</dt>\n  <DD>The ID of the calendar currently being viewed, or zero for the current user\'s personal calendar view.</dd>\n <DT>month</dt>\n  <DD>The current month</dd>\n <DT>year</dt>\n  <DD>The current year</dd>\n</dl>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_body_one_day','<TD%%hilight%% valign=\"top\"><DIV class=\"cal_day\">\r\n<DIV class=\"date_number\"><A href=\"%%rootdir%%/calendar/daily/%%cal_id%%/%%year%%-%%month%%-%%date_number%%\">%%date_number%%</A></DIV>\r\n%%events%%\r\n</DIV></TD>','1','<P>This block formats the inside of a single day from either <B>calendar_body_monthly</B>, <B>calendar_body_weekly</B>, or <B>calendar_body_daily</B>. By default it is a single table cell, so all three of the calendar templates must treat it as such and encapsulate it in the appropriate table structure. The following special keys are recognized:</P>\n<DL>\n <DT>hilight</DT>\n  <DD>If the date being formatted is the current date, this is replaced with the contents of <B>calendar_today_hilight</B>, otherwise it is cleared.</DD>\n <DT>cal_id</DT>\n  <DD>The ID of the calendar currently being viewed, or zero for the current user\'s personal calendar view.</DD>\n <DT>year</DT>\n  <DD>The year being viewed</DD>\n <DT>month</DT>\n  <DD>The month being viewed</DD>\n <DT>date_number</DT>\n  <DD>The day being viewed</DD>\n <DT>usercal</dt>\n  <DD>If viewing another user\'s personal calendar view, the \"/user/nickname\" portion of the URL, otherwise blank</dd>\n<DT>events</DT>\n  <DD>All of the events for this day, each formatted according to <B>event_format_monthly</B>, <B>event_format_weekly</B>, or <B>event_format_daily</B>, depending on which calendar view is currently being used.</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_body_weekly','<table border=0 cellpadding=0 cellspacing=0 width=\"100%\"><tr><td>\r\n<DIV class=\"cal_head\">\r\n<div class=\"title\">%%calendar_title%% - Week starting %%dow%% <a href=\"%%rootdir%%/calendar/monthly/%%cal_id%%/%%year%%-%%monthnum%%\">%%month%%</a> %%day_num%%, %%year%%</div>\r\n%%BOX,calendar_actions%%\r\n<table align=\"center\" border=0 cellpadding=0 cellspacing=0><tr><td>\r\n<UL>\r\n%%BOX,calendar_datenav%%\r\n</UL>\r\n</td></tr></table>\r\n</DIV>\r\n</td></tr></table>\r\n<p>\r\n\r\n\r\n<DIV class=\"cal_body\">\r\n\r\n<TABLE width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-right: 1px solid black; border-bottom: 1px solid black;\">\r\n<TR>\r\n <TH>Monday</TH>\r\n <TH>Tuesday</TH>\r\n <TH>Wednesday</TH>\r\n <TH>Thursday</TH>\r\n <TH>Friday</TH>\r\n <TH>Saturday</TH>\r\n <TH>Sunday</TH>\r\n</TR>\r\n<TR>\r\n %%d1%%\r\n %%d2%%\r\n %%d3%%\r\n %%d4%%\r\n %%d5%%\r\n %%d6%%\r\n %%d7%%\r\n</TR>\r\n\r\n</TABLE>\r\n</div>','1','<P>This block formats the body of the calendar in \"weekly\" view. This should be a self-contained block of HTML that can be inserted anywhere. The following special keys are recognized:</P>\n<DL>\n <DT>d*</DT>\n  <DD>The day number within the current week. Each one is replaced with the block <B>calendar_body_one_day</B> formatted for the appropriate day.</DD>\n <DT>subscribe_link</DT>\n  <DD>The link to subscribe (or unsubscribe) to this calendar, if viewing one calendar.</DD>\n <DT>date</dt>\n  <DD>The monday of the week being viewed (YYYY-MM-DD)</dd>\n <DT>mediumdate</dt>\n  <DD>The monday of the week being viewed (DD-Mmm-YYYY)</dd>\n <DT>longdate</dt>\n  <DD>The monday of the week being viewed (Wwwwww, DD Mmmmmmm YYYY)</dd>\n <DT>dow</dt>\n  <DD>Monday (the date displayed is always the monday of the week being viewed)</dd>\n <DT>dow_short</dt>\n  <DD>Mon (see above)</dd>\n <DT>day_num</dt>\n  <DD>The day number of the week\'s monday</dd>\n <DT>day_ord</dt>\n  <DD>The day number of the week\'s monday in ordinal form (1st, 2nd, 3rd, etc)</dd>\n <DT>month</dt>\n  <DD>The name of the month (if the week spans the end/beginning of a month, it is the month of the week\'s monday)</dd>\n <DT>monthnum</dt>\n  <DD>The number of the month</dd>\n <DT>year</dt>\n  <DD>The year (if the week spans the end/beginning of a year, it is the year of the week\'s monday)</dd>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_error_body','%%title_font%%No Such Calendar%%title_font_end%%\r\n\r\n<P>Sorry, the calendar you requested either doesn\'t exist or is private. <A href=\"%%rootdir%%/my/calendar\">Your personal calendar view</A>.</P>','1','<P>This is the error message displayed when a user requests a calendar that either doesn\'t exist or which they don\'t have permission to see.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_invitations','%%title_font%%Invite users%%title_font_end%%\r\n\r\n%%edit_calendar_links%%\r\n\r\n<P>%%msg%%</P>\r\n\r\n<P><B>Users invited to view this calendar</B></P>\r\n\r\n<UL>\r\n%%view_list%%\r\n</UL>\r\n%%view_add%%\r\n\r\n<P><B>Users invited to submit events to this calendar</B></P>\r\n\r\n<UL>\r\n%%submit_list%%\r\n</UL>\r\n%%submit_add%%','1','<P>This block formats the page where a calendar owner manages the invitation lists for their calendar. The following special keys are recognized:</p>\n<DL>\n <DT>msg</dt>\n  <DD>Any status or error message produced</dd>\n <DT>view_list</dt>\n  <DD>The list of users invited to view the calendar</dd>\n <DT>view_add</dt>\n  <DD>The form used to add users to the above list</dd>\n <DT>submit_list</dt>\n  <DD>The list of users invited to submit events to the calendar</dd>\n <DT>submit_add</dt>\n  <DD>The form used to add users to the above list</dd>\n</dl>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_invitations_add','<FORM action=\"%%rootdir%%/%%op%%/invite/%%cal_id%%\" method=\"POST\">\r\n<INPUT type=\"hidden\" name=\"action\" value=\"%%list%%_add\">\r\nNickname: <INPUT type=\"text\" name=\"nick\" size=\"20\"> <INPUT type=\"submit\" name=\"add\" value=\"Add\">\r\n</FORM>','1','<P>This block contains the form used in the block <B>calendar_invitations</b> and <B>event_invitations</b> to add to either list available in those two pages. The special keys recognized are:</p>\n<DL>\n <DT>op</dt>\n  <DD>The current op, either editcalendar or submitevent depending on whether we\'re working on a calendar or an event</dd>\n <DT>cal_id</dt>\n  <DD>The internal ID of either the calendar or the event, depending on which we\'re working on</dd>\n <DT>list</dt>\n  <DD>Which list, view or submit, this form is being used for</dd>\n</dl>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_invitations_item','<LI><A href=\"%%rootdir%%/user/%%urlnick%%\">%%nickname%%</A> (<A href=\"%%rootdir%%/%%op%%/invite/%%cal_id%%?action=%%list%%_remove;nick=%%nickname%%\">remove</A>)</LI>','1','<P>This block formats a single item in either list in either calendar or event invitation management. The special keys recognized are:</p>\n<DL>\n <DT>urlnick</dt>\n  <DD>the user\'s url-escaped nickname</dd>\n <DT>op</dt>\n  <DD>the current op, either for the calendar or the event</dd>\n <DT>cal_id</dt>\n  <DD>the ID number of the calender or event currently being edited</dd>\n <DT>list</dt>\n  <DD>the name of the list, either view or submit, currently being displayed</dd>\n <DT>nickname</dt>\n  <DD>the user\'s nickname</dd>\n</dl>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_navigation_hilight',' id=\"current\"','1','<P>The text placed in <B>calendar_navigation_item</B> to indicate the currently selected calendar date. By default this is an HTML id property for use with CSS, but it can be anything.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_navigation_item','<LI><A href=\"%%link_url%%\"%%css_id%%>%%nav_link%%</A></LI>','1','<P>This block formats a single item in the calendar navigation bar. By default it is a single list item, so the block <B>calendar_header</B> must contain the appropriate list start and end HTML. The following special keys are recognized:</P>\n<DL>\n <DT>type</DT>\n  <DD>The current calendar view: monthly, weekly, or daily.</DD>\n <DT>cal_id</DT>\n  <DD>The calendar ID of the current calendar, or zero for the user\'s personal calendar view.</DD>\n <DT>date</DT>\n  <DD>The link\'s destination date.</DD>\n <DT>css_id</DT>\n  <DD>The contents of <B>calendar_navigation_hilight</B> if this is the item for the current calendar, blank otherwise.</DD>\n <DT>nav_link</DT>\n  <DD>The formatted destination date.</DD>\n <DT>usercal</DT>\n  <DD>If viewing a user\'s personal calendar view, this becomes /user/nickname; otherwise blank</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_other_month_hilight',' id=\"other_month\"','1','<P>The text placed in <B>calendar_body_one_day</b> to indicate days which are outside the range being displayed. This is only used in the monthly view, to fill in the grid. By default this is an HTML id property for use with CSS, but it can be anything.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_settings','%%title_font%%%%pagetitle%%%%title_font_end%%\r\n\r\n%%edit_calendar_links%%\r\n\r\n<DIV>\r\n<FORM name=\"calendar_settings\" action=\"%%rootdir%%/editcalendar/settings/%%cal_id%%\" method=\"POST\">\r\n<P>%%msg%%</P>\r\n<P><B>Calendar Title:</B> <INPUT type=\"text\" size=\"50\" maxlength=\"100\" name=\"title\" value=\"%%title%%\"></P>\r\n<P><B>Description:</B><BR>\r\n<TEXTAREA name=\"description\" rows=\"%%textarea_rows%%\" cols=\"%%textarea_cols%%\">%%description%%</TEXTAREA></P>\r\n<FIELDSET><LEGEND>Who can see this calendar?</LEGEND>\r\n<INPUT type=\"radio\" name=\"public_view\" value=\"public\"%%view_public_checked%%> Everybody<BR>\r\n<INPUT type=\"radio\" name=\"public_view\" value=\"invite\"%%view_invite_checked%%> Only people on <A href=\"%%rootdir%%/editcalendar/invite/%%cal_id%%\">the invitation list</A><BR>\r\n<INPUT type=\"radio\" name=\"public_view\" value=\"private\"%%view_private_checked%%> Only me</FIELDSET>\r\n<FIELDSET><LEGEND>Who can submit events to this calendar?</LEGEND>\r\n<INPUT type=\"radio\" name=\"public_submit\" value=\"public\"%%submit_public_checked%%> Everybody<BR>\r\n<INPUT type=\"radio\" name=\"public_submit\" value=\"modpublic\"%%submit_modpublic_checked%%> Everybody, but I will review the events before they\'re visible<BR>\r\n<INPUT type=\"radio\" name=\"public_submit\" value=\"invite\"%%submit_invite_checked%%> Only people on <A href=\"%%rootdir%%/editcalendar/invite/%%cal_id%%\">the invitation list</A><BR>\r\n<INPUT type=\"radio\" name=\"public_submit\" value=\"modinvite\"%%submit_modinvite_checked%%> Only people on <A href=\"%%rootdir%%/editcalendar/invite/%%cal_id%%\">the invitation list</A>, but I will review the events before they\'re visible<BR>\r\n<INPUT type=\"radio\" name=\"public_submit\" value=\"private\"%%submit_private_checked%%> Only me</FIELDSET>\r\n<P><INPUT type=\"submit\" name=\"save\" value=\"Save\"></P>\r\n</FORM>\r\n<P><A href=\"%%rootdir%%/calendar//%%cal_id%%\">View this calendar</A></P>\r\n</DIV>','1','<P>This block is the form used to edit a particular calendar. The special keys recognized are:</P>\n<DL>\n <DT>submit_*_checked, view_*_checked</DT>\n  <DD>The checked indicator for the permissions radio buttons</DD>\n <DT>pagetitle</DT>\n  <DD>The title of the page</DD>\n <DT>cal_id</DT>\n  <DD>The internal ID of the calendar we\'re editing</DD>\n <DT>msg</DT>\n  <DD>Any status or error message that comes up when we save a calendar</DD>\n <DT>title</DT>\n  <DD>The calendar title</DD>\n <DT>description</DT>\n  <DD>A description of what the calendar is for</DD> </DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_subscribe_item','<INPUT type=\"checkbox\" name=\"subscribe_item\" value=\"%%cal_value%%\"%%cal_checked%%> <A href=\"%%rootdir%%/calendar/%%view%%/%%cal_value%%/%%date%%\">%%cal_title%%</A><BR>\r\n','1','<P>This is one item in the list of calendars we can subscribe to. It is shown in the personal calendar view. If this is a list item, the block <B>calendar_subscribe_multi_form</B> must contain the list start and end tags. The following special keys are recognized:</P>\n<DL>\n <DT>cal_value</DT>\n  <DD>The calendar number for the calendar being displayed on this line</DD>\n <DT>cal_checked</DT>\n  <DD>the \'checked\' toggle to indicate if this calendar is in our subscription list or not</DD>\n <DT>view</DT>\n  <DD>monthly, weekly, or daily, depending on the current view</DD>\n <DT>date</dt>\n  <DD>The date of the calendar currently being viewed</dd>\n <DT>cal_title</DT>\n  <DD>The title of the calendar</DD>\n<DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_subscribe_link','<P><A href=\"/calendar/%%view%%/%%cal_id%%/%%date%%?subscribe=add\">Subscribe to this calendar</A></P>','1','<P>This block is the subscribe link shown underneath a calendar to which the user is not currently subscribed, if the site control <B>allow_personal_calendar_view</B> is on. The special keys recognized are:</P>\n<DL>\n <DT>view</DT>\n  <DD>The current view (monthly, weekly, or daily)</DD>\n <DT>cal_id</DT>\n  <DD>The ID number of the current calendar</DD>\n <DT>date</DT>\n  <DD>The current calendar\'s date</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_subscribe_multi_form','<P>Calendars in your personal calendar view:<BR>\r\n<FORM name=\"calendar_subscribe\" action=\"%%rootdir%%%%usercal%%/calendar/%%view%%/%%cal_id%%/%%date%%\" method=\"post\">\r\n<INPUT type=\"hidden\" name=\"subscribe\" value=\"multi\">\r\n%%calendar_checks%%\r\n<BR>\r\n<INPUT type=\"submit\" name=\"save\" value=\"Update Calendar\">\r\n</FORM>','1','<P>This is the framework for the calendar subscription form shown underneath the personal calendar view, if the site control <B>allow_personal_calendar_view</B> is on. The special keys recognized are:</P>\n<DL>\n <DT>view</DT>\n  <DD>The current view (monthly, weekly, or daily)</DD>\n <DT>cal_id</DT>\n  <DD>The ID number of the current calendar</DD>\n <DT>date</DT>\n  <DD>The current calendar\'s date</DD>\n <DT>usercal</DT>\n  <DD>If we\'re in the user op, the user op and nickname, otherwise blank.</DD>\n <DT>calendar_checks</DT>\n  <DD>one copy of <B>calendar_subscribe_item</B> for each calendar the current user is allowed to subscribe to, checked appropriately.</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_today_hilight',' id=\"today\"','1','<P>The text placed in <B>calendar_body_one_day</B> to indicate today. By default this is an HTML id property for use with CSS, but it can be anything.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_unsubscribe_link','<P><A href=\"/calendar/%%view%%/%%cal_id%%/%%date%%?subscribe=remove\">Unsubscribe from this calendar</A></P>','1','<P>This block is the unsubscribe link shown underneath a calendar to which the user is currently subscribed, if the site control <B>allow_personal_calendar_view</B> is on. The special keys recognized are:</P>\n<DL>\n <DT>view</DT>\n  <DD>The current view (monthly, weekly, or daily)</DD>\n <DT>cal_id</DT>\n  <DD>The ID number of the current calendar</DD>\n <DT>date</DT>\n  <DD>The current calendar\'s date</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('edit_calendar_links','<DIV class=\"caledit_menu\">\r\n<A href=\"%%rootdir%%/editcalendar/settings/%%cal_id%%\">Edit Calendar Settings</A>\r\n<A href=\"%%rootdir%%/editcalendar/moderate/%%cal_id%%\">Approve Submitted Events</A>\r\n<A href=\"%%rootdir%%/editcalendar/listevents/%%cal_id%%\">Event List</A>\r\n<A href=\"%%rootdir%%/editcalendar/invite/%%cal_id%%\">Invitation List</A>\r\n</DIV>','1','<P>This is the menu at the top of the calendar edit page which links to the other pages available through the calendar edit form. The only special key recognized is cal_id, the ID number of the calendar being edited.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event','%%title_font%%%%title%%%%title_font_end%%\r\n\r\n<DIV class=\"event_body\">\r\n<P id=\"description\">%%description%%</P>\r\n<P>Organizer: <A href=\"%%rootdir%%/user/uid:%%owner%%\">%%owner_nick%%</A></P>\r\n<P>Date: %%date_start%%</P><P>Calendar: <A href=\"%%rootdir%%/calendar//%%cal_id%%/%%date_start%%\">%%calendar_title%%</A></P>\r\n%%deadline%%\r\n%%address%%\r\n%%City%%\r\n%%state%%\r\n%%country%%\r\n%%rsvp%%\r\n<P>%%edit_link%% %%add_cal_link%% %%add_child_link%% %%event_sub_link%% %%add_story_link%%</P>\r\n</DIV>\r\n%%child_events%%\r\n\r\n<HR>\r\n\r\n<DIV class=\"event_stories\">\r\n%%BOX,event_stories%%\r\n</DIV>\r\n','1','<P>This block formats the page when viewing a single event in full detail. This should be a fully self-contained block of HTML. The special keys recognized are any defined event property name. Each one is replaced with the value of that property, formatted according to the template defined for that event property. If no template is defined, the value alone is used.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_add_child_link','[<A href=\"%%rootdir%%/submitevent/submit/%%eid%%?newchild=1\">Add a sub-event</A>]','1','<P>This is the link shown on the event page when the event displayed is a parent event and may have sub-events added, and the user viewing the event has permission to submit an event. The only special key recognized is eid, the current event\'s ID number.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_add_story_link','[<A href=\"%%rootdir%%/submitstory/?event=%%eid%%\">Write a story</A>]','1','<P>This is the link displayed when the current user has permission to submit a story to the event being displayed. The only special key recognized is eid, the current event\'s event ID number.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_also_submit','<INPUT type=\"checkbox\" name=\"other_cals\" value=\"%%cal_value%%\"%%cal_checked%%> <A href=\"%%rootdir%%/calendar//%%cal_value%%\">%%cal_title%%</A><BR>\r\n','1','<P>This is a single item in the list of alternate calendars to submit an event to, on the event edit form. The following special keys are recognized:</p>\n<DL>\n <DT>cal_value</dt>\n  <DD>The ID number of the calendar in this list item</dd>\n <DT>cal_checked</dt>\n  <DD>The checked/unchecked indicator showing if the current event has been submitted to the calendar in this list item</dd>\n <DT>cal_title</dt>\n  <DD>The calendar\'s display title</dd>\n</dl>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_child_list','<P>Local events:</P>\r\n<UL>\r\n%%child_list%%\r\n</UL>\r\n','1','<P>This sets up the list of child events (or sub-events) on the display of a parent event. The only special key is child_list, which is built from one copy of event_child_list_item per child event.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_child_list_item','  <LI><A href=\"%%rootdir%%/event/%%eid%%\">%%title%%</A></LI>\r\n','1','<P>This is one item in the list of child events (or sub-events) for a parent event. The special keys recognized are any defined event property.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_edit_displaystatus','<SELECT name=\"displaystatus\" size=\"1\">\r\n  <OPTION value=\"-2\"%%pending_selected%%>Pending Moderation</OPTION>\r\n  <OPTION value=\"-1\"%%never_selected%%>Never Display</OPTION>\r\n  <OPTION value=\"0\"%%always_selected%%>Always Display</OPTION>\r\n</SELECT>','1','<P>This is the displaystatus selectbox shown on the event edit form to those users who have admin permissions for an event. The special keys recognized are the three *_selected keys, which show which option is currently set for the event being displayed.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_edit_form','%%title_font%%Edit Event%%title_font_end%%\r\n<P>%%msg%%</P>\r\n<FORM name=\"event_edit\" action=\"%%rootdir%%/submitevent/%%action%%/%%id%%\" method=\"POST\"><INPUT type=\"hidden\" name=\"parent\" value=\"%%parent%%\">\r\n<INPUT type=\"hidden\" name=\"newchild\" value=\"%%newchild%%\">\r\n\r\n<TABLE>\r\n<tr><td>%%required_pref_marker%%<B>Display event?</B></td>\r\n<td>%%displaystatus%%</td></tr>\r\n<tr><td>%%required_pref_marker%%<B>Submit to Calendar:</B></td>\r\n<td>%%BOX,calendar_selectbox%%</td></tr>\r\n\r\n%%event_form_items%%\r\n\r\n<tr><td><B>Event needs volunteers?</B></td>\r\n<td><input type=\"checkbox\" name=\"volunteers\" value=\"1\"%%volunteers%%></td></tr>\r\n<tr><td>%%required_pref_marker%%<B>Event is public?</B></td>\r\n<td><input type=\"radio\" name=\"public_view\" value=\"public\"%%public_checked%%> Public\r\n<BR><input type=\"radio\" name=\"public_view\" value=\"private\"%%private_checked%%> Private\r\n<BR><input type=\"radio\" name=\"public_view\" value=\"invite\"%%invite_checked%%> Invitation Only%%invite_link%%</td></tr><tr><td>%%required_pref_marker%%<B>Who can submit stories to this event?</B></td>\r\n<td><input type=\"radio\" name=\"public_submit\" value=\"public\"%%public_submit_checked%%> Public\r\n<BR><input type=\"radio\" name=\"public_submit\" value=\"private\"%%private_submit_checked%%> Private\r\n<BR><input type=\"radio\" name=\"public_submit\" value=\"invite\"%%invite_submit_checked%%> Invitation Only%%invite_link%%</td></tr>\r\n\r\n<tr><td>%%required_pref_marker%%<B>Start date</B>:</td><td><INPUT type=\"hidden\" name=\"date_start\" value=\"%%date_start%%\">\r\n<SELECT name=\"date_start_year\">\r\n%%BOX,cal_year_select,%%date_start_year%%%%</SELECT>\r\n<SELECT name=\"date_start_month\">\r\n%%BOX,cal_month_select,%%date_start_month%%%%</SELECT>\r\n<SELECT name=\"date_start_day\">\r\n%%BOX,cal_day_select,%%date_start_day%%%%</SELECT></td></tr>\r\n\r\n<tr><td><B>End date</B>:<br>(Only for multi-day events)</td>\r\n<td><INPUT type=\"radio\" name=\"date_end\" value=\"\"%%one_day%%> One Day Event\r\n<BR><INPUT type=\"radio\" name=\"date_end\" value=\"%%date_end%%\"%%multi_day%%> This date:\r\n<SELECT name=\"date_end_year\">\r\n%%BOX,cal_year_select,%%date_end_year%%%%</SELECT> \r\n<SELECT name=\"date_end_month\">\r\n%%BOX,cal_month_select,%%date_end_month%%%%</SELECT> \r\n<SELECT name=\"date_end_day\">\r\n%%BOX,cal_day_select,%%date_end_day%%%%</SELECT></td></tr>\r\n\r\n\r\n%%also_submit_line%%\r\n\r\n%%parent_event_line%%\r\n\r\n</TABLE>\r\n<BR><INPUT type=\"submit\" name=\"save\" value=\"Save Event\">\r\n</FORM>','1','<P>This block builds the single event edit and submit form. The special keys recognized are:</p>\n<DL>\n <DT>msg</dt>\n  <DD>Any status or error messages</dd>\n <DT>action</dt>\n  <DD>The \"action\" part of the URL (edit or submit)</dd>\n <DT>id</dt>\n  <DD>The ID of the calendar (if we\'re submitting an event) or the event (if we\'re editing an event)</dd>\n <DT>eid</dt>\n  <DD>The event ID</dd>\n <DT>cal_id</dt>\n  <DD>The event\'s calendar ID</dd>\n <DT>parent</dt>\n  <DD>The event ID of the parent event, if this is a sub-event</dd>\n <DT>newchild</dt>\n  <DD>True if this is a new sub-event</dd>\n <DT>displaystatus</dt>\n  <DD>The displaystatus control. A selectbox if the user can administer this event</dd>\n <DT>event_form_items</dt>\n  <DD>The form elements for each event property. The formatting of each event is determined by that event property\'s template</dd>\n <DT>volunteers</dt>\n  <DD>the checked indicator, if the event is marked as needing volunteers or not</dd>\n <DT>*_checked</dt>\n  <DD>The checked indicator for the permissions radio buttons</dd>\n <DT>date_start</dt>\n  <DD>The current start date</dd>\n <DT>date_start_*</dt>\n  <DD>the year, month and day parts of the date, individually</dd>\n <DT>one_day</dt>\n  <DD>The radio button checked indicator if this is a one-day event</dd>\n <DT>multi_day</dt>\n  <DD>The radio button checked indicator if this is a multi-day event</dd>\n <DT>date_end</dt>\n  <DD>The current end date</dd>\n <DT>date_end_*</dt>\n  <DD>The year, month, and day parts of the date, individually</dd>\n <DT>also_submit_line</dt>\n  <DD>The form elements to submit the current event to other calendars; formatted according to <B>event_other_calendars</b>. Not shown for child events (sub-events)</dd>\n <DT>parent_event_line</dt>\n  <DD>The form element to set an event as a parent (or umbrella) event which can have child events attached. Not shown for child events.</dd>\n <DT>invite_link</DT>\n  <DD>The link to the event\'s invitation management page. Not shown for new events, only existing events.</DD>\n</dl>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_error_body','%%title_font%%%%title%%%%title_font_end%%\r\n\r\n<P>Sorry, the event you requested either doesn\'t exist or is private. <A href=\"%%rootdir%%/my/calendar\">Your personal calendar view</A>.</P>','1','<P>This is the error message displayed in place of the event body if the event requested is not viewable either because it doesn\'t exist or because the user doesn\'t have permission to see it.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_error_title','No Such Event','1','<P>This is the title used for the page if the event requested is not viewable either because it doesn\'t exist or because the user doesn\'t have permission to see it.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_format_daily','%%title%%\r\n%%description%%\r\n%%deadline%%','1','<P>This block formats a single event for use in <B>calendar_body_one_day</B> for the daily view. Zero, one, or more copies of this block may be displayed in a single day. The special keys recognized are any defined event property name. Each one is replaced with the value of that property, formatted according to the calendar_template defined for that event property. If no calendar_template is defined, the value alone is used.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_format_monthly','%%title%%','1','<P>This block formats a single event for use in <B>calendar_body_one_day</B> for the monthly view. Zero, one, or more copies of this block may be displayed in a single day. The special keys recognized are any defined event property name. Each one is replaced with the value of that property, formatted according to the calendar_template defined for that event property. If no calendar_template is defined, the value alone is used.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_format_weekly','%%title%%\r\n%%description%%','1','<P>This block formats a single event for use in <B>calendar_body_one_day</B> for the weekly view. Zero, one, or more copies of this block may be displayed in a single day. The special keys recognized are any defined event property name. Each one is replaced with the value of that property, formatted according to the calendar_template defined for that event property. If no calendar_template is defined, the value alone is used.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_invitation_link',' <A href=\"%%rootdir%%/submitevent/invite/%%eid%%\">Invite users to view this event</A>','1','<P>This is the link to the event invitation management page. It is placed in <B>event_edit_form</B> for existing events.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_invitations','%%title_font%%Invite users%%title_font_end%%\r\n\r\n<P>%%msg%%</P>\r\n<P><A href=\"%%rootdir%%/submitevent/edit/%%id%%\">Edit this event</A></P>\r\n<P><B>Users invited to view this event</B></P>\r\n\r\n<UL>\r\n%%view_list%%\r\n</UL>\r\n%%view_add%%\r\n\r\n<P><B>Users invited to attach stories to this event</B></P>\r\n<UL>\r\n%%submit_list%%\r\n</UL>\r\n%%submit_add%%\r\n','1','<P>This block formats the event invitation management page. The following special keys are used:</p>\n<DL>\n <DT>msg</dt>\n  <DD>Any status or error messages generated</dd>\n <DT>id</dt>\n  <DD>The event ID number</dd>\n <DT>view_list</dt>\n  <DD>The list of users invited to view the event. Each list item is formatted using <B>calendar_invitations_item</b>.</dd>\n <DT>view_add</dt>\n  <DD>The form used to add a user to the invitation list above. The form is in <B>calendar_invitations_add</b>.</dd>\n <DT>submit_list</dt>\n  <DD>The list of users invited to submit stories to the event. Each list item is formatted using <B>calendar_invitations_item</b>.</dd>\n <DT>submit_add</dt>\n  <DD>The form used to add a user to the invitation list above. The form is in <B>calendar_invitations_add</b>.</dd>\n</dl>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_invite_mail','%%nick%%:\r\n\r\n%%sender_nick%% has invited you to attend the following event:\r\n\r\n%%title%%\r\n%%date_start%%\r\n\r\n%%description%%\r\n\r\n----------\r\n\r\nFor more information about this event, and to RSVP and/or \r\nsign up for updates, go to:\r\n\r\n%%event_url%%\r\n\r\n-- %%sitename%%','1','<P>This is the email sent to users invited to view a particular event. It is sent to the real email address of the invitee. Because this is an email and not a regular Scoop page, only the special keys listed below will work.</p>\n<DL>\n <DT>nick</dt>\n  <DD>The nickname of the invitee</dd>\n <DT>sender_nick</dt>\n  <DD>The nickname of the user who sent the invitation</dd>\n <DT>event_url</dt>\n  <DD>The URL of the event display page</dd>\n <DT>sitename</dt>\n  <DD>The contents of the sitename Site Control</dd>\n</dl>\n<P>Any defined event property may also be used.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_invite_mail_subject','You\'re invited!','1','<P>The subject line for the email sent when a user is invited to attend (view) an event. Because this is used in an email and does not go through Scoop\'s usual page out process, no regular keys may be used. There are no special keys for this block.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_list','%%title_font%%Events in %%title%%%%title_font_end%%\r\n\r\n%%edit_calendar_links%%\r\n\r\n<P>%%msg%%</P>\r\n\r\n<P>%%prevlink%%</P>\r\n<TABLE width=\"100%\" cellspacing=0 cellpadding=\"2px\">\r\n <TR>\r\n  <TH>Event</TH>\r\n  <TH>Submitted By</TH>\r\n  <TH>Start Date</TH>\r\n  <TH>Actions</TH>\r\n </TR>\r\n%%eventlist%%\r\n</TABLE>\r\n<P align=\"right\">%%nextlink%%</P>','1','<P>This is the structure of the event list page. By default, it creates a table, and <B>event_list_item</B> contains each row of the table\'s data. The number of columns and associated headings should match the structure and data in <B>event_list_item</B>. The following special keys are recognized:</P>\n<DL>\n <DT>cal_title</DT>\n  <DD>The display title of the calendar whose events are in the list</DD>\n <DT>prevlink</DT>\n  <DD>The link to the previous page of events if we\'re not on the first page</DD>\n <DT>eventlist</DT>\n  <DD>The actual list of events. Each line is built using <B>event_list_item</B> and the number of items displayed is limited by the site control <B>storylist</B>, which also controls the number of items in many other lists</DD>\n <DT>nextlink</DT>\n  <DD>The link to the next page in the event list, if there are more items.</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_list_action_approve',' (<A href=\"%%rootdir%%/editcalendar/moderate/%%cal_id%%\">approve</A>)','1','<P>This is the link used in the event list to a calendar\'s event moderation page, where events can be approved or disapproved for inclusion in a calendar. The only special key is cal_id, the ID number of the calendar currently being edited.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_list_action_edit',' (<A href=\"%%rootdir%%/submitevent/edit/%%eid%%\">edit</A>)','1','<P>This is the link used in the event list to the event\'s edit form. The only special key is eid, the event\'s ID number.</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_list_action_remove','(<A href=\"%%rootdir%%/editcalendar/addevent/%%cal_id%%/remove/%%eid%%\">remove</A>)','1','<P>This is the link used to remove an event from the calendar being edited, if this is a \"secondary\" calendar for the event (the \"also show this event in...\" item on the event edit form)</p>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_list_item',' <TR bgcolor=\"%%event_bg%%\">\r\n  <TD><A href=\"%%rootdir%%/event/%%eid%%\">%%title%%</A></TD>\r\n  <TD>%%owner_nick%%</TD>\r\n  <TD>%%date_start%%</TD>\r\n  <TD>%%actions%%</TD>\r\n </TR>\r\n','1','<P>This is one line (one event) in the event list page. It should have the same number of columns as the table in the block <B>event_list</B>, and its data should match the table headers. The following special keys are recognized:</P>\n<DL>\n <DT>event_bg</DT>\n  <DD>Background colours taken from the story list to distinguish between events filed primarily in this calendar, and events included in this calendar separately.</DD>\n <DT>eid</DT>\n <DD>The internal event ID of the event in this line</DD>\n <DT>owner_nick</DT>\n  <DD>The nickname of the event owner (submitter)</DD>\n  <DT>actions</dt>\n  <DD>the actions (edit, remove, etc) that the current user has permission to do.</dd>\n <DT>any other field in the events or event_properties table</DT>\n <DD>Any event property defined can have its name used in this block and the value of that property will be entered exactly as-is</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_moderate','%%title_font%%Moderate Events%%title_font_end%%\r\n\r\n%%edit_calendar_links%%\r\n\r\n<P>%%msg%%</P>\r\n\r\n<FORM name=\"moderate_events\" action=\"%%rootdir%%/editcalendar/moderate/%%cal_id%%\" method=\"POST\">\r\n<TABLE cellspacing=0 cellpadding=\"3px\">\r\n <TR>\r\n  <TD> </TD>\r\n  <TH>Event</TH>\r\n  <TH>Submitted By</TH>\r\n  <TH colspan=\"2\">Date(s)</TH>\r\n </TR>\r\n%%eventlist%%\r\n</TABLE>\r\n<P>With selected events:<BR>\r\n<INPUT type=\"radio\" name=\"action\" value=\"approve\"> Approve for display<BR>\r\n<INPUT type=\"radio\" name=\"action\" value=\"reject\"> Do not display</P>\r\n<P><INPUT type=\"submit\" name=\"save\" value=\"Moderate\">\r\n</FORM>','1','<P>This provides the page structure for the event moderation. The following special keys are recognized:</P>\n<DL>\n <DT>msg</DT>\n  <DD>Any status or error messages</DD>\n <DT>cal_id</DT>\n <DD>The internal ID of the calendar whose events we\'re moderating</DD>\n <DT>eventlist</DT>\n  <DD>The list of events waiting for moderation. The individual events are formatted with the block <B>event_moderate_item</B></DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_moderate_item',' <TR>\r\n  <TD><INPUT type=\"checkbox\" name=\"%%eid%%\" value=\"1\"></TD>\r\n  <TD><A href=\"%%rootdir%%/event/%%eid%%\">%%title%%</A></TD>\r\n  <TD>%%owner_nick%%</TD>\r\n  <TD>%%date_start%%</TD>\r\n  <TD>%%date_delim%%%%date_end%%</TD>\r\n </TR>\r\n','1','<P>This formats each item in the event moderation list. The structure must match the structure set out in the block <B>event_moderate</B>. The following special keys are recognized:</P>\n<DL>\n <DT>eid</DT>\n  <DD>The event ID number</DD>\n <DT>date_delim</DT>\n  <DD>If there is an end date, this is a separator to show that it\'s a date range. Otherwise blank.</DD>\n <DT>owner_nick</DT>\n  <DD>The nickname of the event owner (submitter)</DD>\n <DT>any event property</DT>\n  <DD>Any property defined in the events or event_properties table may be used here. The value is substituted as-is</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_other_calendars','<tr><td><B>Also show in</B>:</td><td>%%also_submit%%</td></tr>\r\n','1','<P>This is the portion of the event edit form that displays checkboxes for each calendar the user can submit the event to, excluding the one the event is primarily submitted to. The only special key is also_submit, which is replaced with the actual checkboxes</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_parent_item','<P><A href=\"%%rootdir%%/event/%%eid%%\">Related events</A></P>','1','<P>This is the link back to the parent event, shown if the event currently displayed is actually a child event (sub-event). The only special key is eid, the parent event\'s ID</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_parent_line','<tr><td><B>This is an \"umbrella\" event</B>:<br>(ie, a country-wide \"meetup\"<br>If so, don\'t set a location.)</td><td><INPUT type=\"checkbox\" name=\"is_parent\" value=\"1\"%%is_parent%%></td></tr>','1','<P>This is the part of the event edit form that sets whether or not an event is a \"parent\" event or not. The only special key recognized is is_parent, a checkbox checked indicator used for the current status of the event.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_property_date','<tr><td><B>%%title%%</B><br>%%description%%</td>\r\n<td><INPUT type=\"radio\" name=\"%%property%%\" value=\"\"%%no_date%%> Not Applicable\r\n<BR><INPUT type=\"radio\" name=\"%%property%%\" value=\"%%value%%\"%%use_date%%> This date:\r\n<SELECT name=\"%%property%%_year\">\r\n%%BOX,cal_year_select,%%year%%%%\r\n</SELECT>\r\n<SELECT name=\"%%property%%_month\">\r\n%%BOX,cal_month_select,%%month%%%%\r\n</SELECT>\r\n<SELECT name=\"%%property%%_day\">\r\n%%BOX,cal_day_select,%%day%%%%\r\n</SELECT></td></tr>\r\n','1','<P>This block formats any date event properties on the submit/edit event form. It should be one item in the structure defined in <B>event_edit_form</B>. The following special keys are recognized:</P>\n<DL>\n <DT>title</DT>\n  <DD>The title of the event property</DD>\n <DT>description</DT>\n  <DD>The description of the event property</DD>\n <DT>property</DT>\n  <DD>The internal name of the event property</DD>\n <DT>no_date</DT>\n  <DD>The radio button checked indicator if this property is not being set for a particular event</DD>\n <DT>use_date</DT>\n  <DD>The radio button checked indicator if this property is being set for a particular event</DD>\n <DT>value</DT>\n  <DD>The current value of this property</DD>\n <DT>year, month, day</DT>\n  <DD>The three parts of the event date, individually</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_property_text','<tr><td>%%required%%<B>%%title%%:</B><br>%%description%%</td><td><INPUT type=\"text\" name=\"%%property%%\" value=\"%%value%%\"></td></tr>\r\n','1','<P>This block formats any plain text format event properties on the submit/edit event form. It should be one item in the structure defined in <B>event_edit_form</B>. The following special keys are recognized:</P>\n<DL>\n <DT>title</DT>\n  <DD>The title of the event property</DD>\n <DT>description</DT>\n  <DD>The description of the event property</DD>\n <DT>property</DT>\n  <DD>The internal name of the event property</DD>\n <DT>value</DT>\n  <DD>The current value of this property</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_property_textarea','<tr><td>%%required%%<B>%%title%%:</B><br>%%description%%</td><td><TEXTAREA name=\"%%property%%\" rows=\"%%textarea_rows%%\" cols=\"%%textarea_cols%%\">%%value%%</textarea></td></tr>\r\n','1','<P>This block formats any textarea format event properties on the submit/edit event form. It should be one item in the structure defined in <B>event_edit_form</B>. The following special keys are recognized:</P>\n<DL>\n <DT>title</DT>\n  <DD>The title of the event property</DD>\n <DT>description</DT>\n  <DD>The description of the event property</DD>\n <DT>property</DT>\n  <DD>The internal name of the event property</DD>\n <DT>value</DT>\n  <DD>The current value of this property</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_saved_msg','%%title_font%%Event saved.%%title_font_end%%\r\n\r\n<UL>\r\n  <LI><A href=\"%%rootdir%%/event/%%eid%%\">View this event</A></LI>\r\n  <LI><A href=\"%%rootdir%%/calendar//%%cal_id%%\">Go to this event\'s calendar</A></LI>\r\n  <LI><A href=\"%%rootdir%%/my/calendar\">Go back to your personal calendar view</A></LI>\r\n  <LI><A href=\"%%rootdir%%/submitevent/submit/%%cal_id%%\">Submit another event</A></LI>\r\n</UL>','1','<P>This is the message displayed when a new event has been submitted. It should provide useful links to things the user might want to do after submitting an event. The following special keys are recognized:</P>\n<DL>\n <DT>cal_id</DT>\n  <DD>The ID of the calendar the user has just submitted an event to</DD>\n <DT>eid</DT>\n  <DD>The ID of the event just submitted</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_search','%%title_font%%Event Search Results%%title_font_end%%\r\n\r\n<P>Any fields left blank will not be used in the search.</P>\r\n\r\n<FORM name=\"Search\" action=\"%%rootdir%%/eventsearch\" method=\"GET\">\r\n<INPUT type=\"hidden\" name=\"page\" value=\"%%page%%\">\r\nEvents between \r\n<SELECT name=\"year_start\">%%BOX,cal_year_select,%%year_start%%%%</SELECT>\r\n<SELECT name=\"month_start\">%%BOX,cal_month_select,%%month_start%%%%</SELECT>\r\n<SELECT name=\"day_start\">%%BOX,cal_day_select,%%day_start%%%%</SELECT>\r\nand <SELECT name=\"year_end\">%%BOX,cal_year_select,%%year_end%%%%</SELECT>\r\n<SELECT name=\"month_end\">%%BOX,cal_month_select,%%month_end%%%%</SELECT>\r\n<SELECT name=\"day_end\">%%BOX,cal_day_select,%%day_end%%%%</SELECT>\r\n<BR>\r\n%%prop_search%%\r\n%%BOX,num_results%% results: <INPUT type=\"submit\" name=\"search\" value=\"Search\">\r\n\r\n<P>%%prev_button%%</P>\r\n%%results%%\r\n<P align=\"right\">%%next_button%%</P>\r\n</FORM>\r\n','1','<P>This is the page for event searching. The following special keys are recognized:</p>\n<DL>\n <DT>page</dt>\n  <DD>The current page number, for pages of search results</dd>\n <DT>year_start, month_start, day_start</dt>\n  <DD>The currently selected value for the start date\'s year, month, and day</dd>\n <DT>year_end, month_end, day_end</dt>\n  <DD>The currently selected value for the end date\'s year, month, and day</dd>\n <DT>prop_search</dt>\n  <DD>The form elements for searching event properties. The number of form elements is set in the Site Control <B>event_search_num_options</b>, and the formatting for each element is set in the block <B>event_search_property_item</b>.</dd>\n <DT>prev_button</dt>\n  <DD>A button to return to the previous page of search results. Only shown if we\'re not on page 1 of results</dd>\n <DT>next_button</dt>\n  <DD>A button to go to the next page of search results. Only shown if there are more search results after the last result shown</dd>\n</dl>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_search_property_item','%%propertysel%% contains <INPUT type=\"text\" size=\"30\" name=\"value_%%num%%\" value=\"%%value_%%num%%%%\"><BR>\r\n','1','<P>This formats one event property form element in the event search form. The special keys are:</P>\n<DL>\n <DT>propertysel</DT>\n  <DD>A selectbox containing a list of all event properties</DD>\n <DT>num</DT>\n  <DD>A counter to distinguish this form element from the others, when it is repeated multiple times</DD>\n <DT>value_|num|</DT>\n  <DD>The value entered by the user. |num| is substituted as above before the value is substituted.</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_search_result_item','<DIV class=\"search_result\">\r\n<P><A href=\"%%rootdir%%/event/%%eid%%\">%%title%%</A> (%%date_start%%)<BR>\r\n%%description%%</P>\r\n</DIV>\r\n','1','<P>This formats one event search result. It should be HTML suitable for repeating an arbitrary number of times.</P>\n<P>The special keys are any defined event property.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_submit','%%title_font%%Submit an Event%%title_font_end%%\r\n\r\n','1','<P>The page title for event submission</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_subscribe_link','[<A href=\"%%rootdir%%/event/%%eid%%?subscribe=add\">Notify me of changes to this event</A>]\r\n','1','<P>This is the link displayed on the event display page when the current user is not subscribed to the event being viewed. The only special key is eid, the event ID number.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('event_unsubscribe_link','[<A href=\"%%rootdir%%/event/%%eid%%?subscribe=remove\">Stop notifying me of changes to this event</A>]\r\n','1','<P>This is the link displayed on the event display page when the current user is already subscribed to the event being viewed. The only special key is eid, the event ID number.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('month_link_up','<LI><A href=\"%%rootdir%%%%usercal%%/calendar/monthly/%%cal_id%%/%%year%%-%%month%%\">This Month</A></LI>\r\n','1','<P>This block is the link used in weekly and daily calendar views to allow the user to move back up to monthly view. The following special keys are recognized:</P>\n<DL>\n <DT>usercal</DT>\n  <DD>If viewing another user\'s personal calendar view, the \"/user/nickname\" portion of the URL, otherwise blank</DD>\n <DT>cal_id</DT>\n  <DD>The calendar ID of the current calendar, or zero for the user\'s personal calendar view</DD>\n <DT>year</DT>\n  <DD>The currently selected year</DD>\n <DT>month</DT>\n  <DD>The currently selected month. If in weekly view and the week spans a month change, the Monday\'s month is used.</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('personal_calendar_title','%%nick%%\'s Personal Calendar View','1','<P>The title used when in a user\'s personal calendar view. The special key <B>nick</B> is replaced with the user\'s nickname.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('primary_calendar_marker','<B>*</B>','1','<P>The text used to indicate that a calendar is the event\'s primary calendar in the admin event list.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('rsvp_form','<FORM name=\"event_rsvp\" action=\"%%rootdir%%/event/%%eid%%\" method=\"POST\">\r\n<FIELDSET>\r\n<LEGEND>RSVP</LEGEND>\r\n<INPUT type=\"checkbox\" name=\"attend\" value=\"1\">I will attend\r\n%%volunteer%%\r\n<BR><INPUT type=\"submit\" name=\"rsvp\" value=\"Send RSVP\">\r\n</FIELDSET>\r\n</FORM>','1','<P>The form shown on the event display page for users who have not yet replied via this form for RSVP. The special keys are:</P>\n<DL>\n <DT>eid</DT>\n  <DD>The event ID number</DD>\n <DT>volunteer</DT>\n  <DD>If the event owner indicated that volunteers are needed, the contents of <B>rsvp_volunteer_form</B> is inserted.</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('rsvp_list','<P>%%number%% people signed up.</P>\r\n<UL>\r\n%%attending%%\r\n</UL>','1','<P>This is displayed in place of the RSVP form for the event owner, so the number and names of people signed up (and volunteering) can be easily seen. The special keys are:</P>\n<DL>\n <DT>number</DT>\n  <DD>The total number of people signed up</DD>\n <DT>attending</DT>\n  <DD>The list of people who have signed up via the RSVP form, and whether or not they have offered to help out, sorted with volunteers first. Formatted using <B>rsvp_list_item</B></DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('rsvp_list_item','  <LI><A href=\"%%rootdir%%/user/%%nick%%\">%%nick%%</A> volunteering? %%volunteer%%</LI>','1','<P>This is one item in the list of people who have indicated that they are coming via the RSVP form. It is used in the block <B>rsvp_list</B>. The special keys are:</P>\n<DL>\n <DT>nick</DT>\n  <DD>The user\'s nickname</DD>\n <DT>urlnick</DT>\n  <DD>The user\'s nickname, url-escaped</DD>\n <DT>volunteer</DT>\n  <DD>Whether or not, and when, the user has offered to volunteer. This is usually \"during\", \"prior\", or \"no\".</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('rsvp_received','<P>You have indicated that you\'re coming to this event</P>','1','<P>This is shown in place of the RSVP form when a user has submitted that form.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('rsvp_volunteer_email','%%owner_nick%%:\r\n\r\n%%volunteer_nick%% has just volunteered to help out at the \r\nevent %%title%%.\r\n<%%url%%>\r\n\r\n%%volunteer_nick%% can be reached at %%volunteer_email%%\r\n\r\n-- %%sitename%%','1','<P>This is the text of the email sent to an event owner when somebody uses the RSVP form and indicates that they wish to volunteer. Because this is an email and does not go through the same processing as a normal Scoop page, only the keys listed below may be used. The following special keys are used:</P>\n<DL>\n <DT>owner_nick</DT>\n  <DD>The nickname of the event owner</DD>\n <DT>volunteer_nick</DT>\n  <DD>The nickname of the volunteer</DD>\n <DT>url</DT>\n  <DD>The URL for the event display page</DD>\n <DT>volunteer_email</DT>\n  <DD>The volunteer\'s \"real email\"</DD>\n <DT>sitename</DT>\n  <DD>The contents of the Site Control sitename</DD>\n</DL>\n<P>Any defined event property may also be used.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('rsvp_volunteer_form','<BR><INPUT type=\"checkbox\" name=\"volunteer\" value=\"during\">I would like to volunteer the day of the event\r\n<BR><INPUT type=\"checkbox\" name=\"volunteer\" value=\"before\">I would like to volunteer prior to the day of the event\r\n<BR><B>Note:</B> by signing up to volunteer, you give %%sitename%% permission to send your \"real email\" as set in <A href=\"%%rootdir%%/my/prefs/Protected\">your user preferences</A> to the organizer of this event.\r\n','1','<P>This is the portion of the RSVP form displayed when the event owner has indicated that volunteers would be appreciated. Since the system emails the volunteer\'s realemail to the event owner, and the realemail is generally considered secret information, a notice informing the user of this is strongly recommended.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('story_event_link','Attached to event <A href=\"%%rootdir%%/event/%%eid%%\">%%title%%</A>\r\n','1','<P>This is the text placed in the story_summary block if the story is attached to an event. Any defined event property may be used.</P>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('week_link_up','<LI><A href=\"%%rootdir%%/calendar/weekly/%%cal_id%%/%%year%%-%%month%%-%%day%%\">This Week</A></LI>\r\n','1','<P>This block is the link used in the daily calendar view to allow the user to move back up to weekly view. The following special keys are recognized:</P>\n<DL>\n <DT>cal_id</DT>\n  <DD>The calendar ID of the current calendar, or zero for the user\'s personal calendar view</DD>\n <DT>year</DT>\n  <DD>The currently selected year</DD>\n <DT>month</DT>\n  <DD>The currently selected month.</DD>\n <DT>day</DT>\n  <DD>The currently selected day.</DD>\n</DL>','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_monthly_one_week','<TR>\r\n %%wk%%week%%_d1%%\r\n %%wk%%week%%_d2%%\r\n %%wk%%week%%_d3%%\r\n %%wk%%week%%_d4%%\r\n %%wk%%week%%_d5%%\r\n %%wk%%week%%_d6%%\r\n %%wk%%week%%_d7%%\r\n <td style=\"width: 20px;\"><a href=\"%%rootdir%%/calendar/weekly/%%cal_id%%/%%wk%%week%%%%\">W<br>E<br>E<br>K</a></td>\r\n</TR>','1','','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('calendar_css','/* calendar stuff */\r\n\r\n.cal_head { }\r\n\r\n.cal_head ul  {\r\n               border: 0;\r\n               margin-top: 10px;\r\n               margin-left: 0;\r\n               padding-left: 0;\r\n               list-style-type: none;\r\n               text-align: center;\r\n               }\r\n\r\n.cal_head ul li  {\r\n               display: inline;\r\n               text-align: center;\r\n               float: left;\r\n               padding: 0;\r\n               margin: 0;\r\n               }\r\n\r\n.cal_head ul li a  {\r\n               border: 1px solid #006;\r\n               margin: 0;\r\n               padding: 5px;\r\n               color: #3B3B3B;\r\n               text-decoration: none;\r\n               display: block;\r\n               text-align: center;\r\n               font: normal 10px/18px \"Lucida Grande\", \"Lucida Sans Unicode\", verdana, lucida, sans-serif;\r\n               }\r\n\r\n.cal_head ul li a:hover  {\r\n                color: #fff;\r\n                background: #3B3B3B;\r\n                }\r\n\r\n.cal_head UL LI A#current { background-color: #ff0000;\r\n                            color: #ffffff;\r\n                            font-weight: bold; }\r\n\r\n.cal_body {  }\r\n\r\n.cal_body TD { border-top: 1px solid black;\r\n               border-left: 1px solid black;\r\n               border-right: 0px;\r\n               border-bottom: 0px;\r\n               padding: 3px; \r\n               height: 25px;\r\n             }\r\n\r\n.cal_body TD { width: 100px;\r\n               height: 100px;\r\n             }\r\n\r\n.cal_body TH { border-right: 0px;\r\n               border-bottom: 0px;\r\n             }\r\n\r\n.cal_mini_body TD,TH { border: 1px solid black;\r\n                  padding: 1px; \r\n                  height: 5px;\r\n                }\r\n.cal_mini_body TD { width: 10px;\r\n               height: 10px;\r\n             }\r\n\r\n.cal_day_head { height: 25px; }\r\n\r\n.cal_body #today { background-color: #eeeeee; }\r\n.cal_body #other_month { background-color: #cccccc; }\r\n\r\n.date_number a { font-size: 12px; \r\n               border-right: 1px solid black;\r\n               border-bottom: 1px solid black;\r\n               padding: 3px;\r\n               min-wdth: 14px;\r\n               margin-left: -3px;\r\n               margin-top -3px;\r\n}\r\n\r\n.tinylink   { font-size: 9px;\r\n              font-weight: normal;\r\n              font-stretch: wider;\r\n            }\r\n\r\n.event_body { border: 1px solid #222; \r\n              background-color: #F5F5CE;\r\n              margin-left: 25px;\r\n              margin-right:25px;\r\n            }\r\n\r\n.event_title { background-color: #9E7B1B;\r\n               color: #fff;\r\n               font-size: 15px;\r\n               font-weight: bold;\r\n               padding-top:5px;\r\n               padding-bottom:6px;\r\n             }\r\n\r\n.event_details { padding-left: 10px;\r\n                 padding-right:10px;\r\n               }\r\n\r\n.child_event_list { padding-left: 10px;\r\n                    padding-right:10px;\r\n                    margin-left: 25px;\r\n                    margin-right:25px;\r\n\r\n               }','1','','CSS','default','en');
INSERT INTO `blocks` VALUES ('css_includes','<LINK rel=\"stylesheet\" type=\"text/css\" href=\"%%rootdir%%/css/main\">\r\n<LINK rel=\"stylesheet\" type=\"text/css\" href=\"%%rootdir%%/css/calendar\">','1','','CSS','default','en');
INSERT INTO `blocks` VALUES ('anonymous_rsvp_form','<FIELDSET>\r\n<LEGEND>RSVP</LEGEND>\r\nPlease <a href=\"/login\">sign in</a> or <a href=\"/newuser\">create an account</a> to RSVP.\r\n</FIELDSET>\r\n','1','','Calendars and Events','default','en');
INSERT INTO `blocks` VALUES ('comment_remove_link',' (<A CLASS=\"light\" HREF=\"%%rootdir%%/comments/%%sid%%/%%cid%%/remove\">suppress comment</A>)','1','<P>The link to remove a comment (replace with a placeholder indicating that the comment has been deleted), if the user has the <B>comment_remove</B> perm. Special keys sid and cid identify the comment.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_delete_link',' (<A CLASS=\"light\" HREF=\"%%rootdir%%/comments/%%sid%%/%%cid%%/delete\">delete</A>)','1','<P>The link to delete a comment (remove entirely and make replies to this comment become replies to this comment\'s parent), if the user has the <B>comment_delete</B> perm. Special keys sid and cid identify the comment.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_toggle_link',' (<A CLASS=\"light\" HREF=\"%%rootdir%%/comments/%%sid%%/%%cid%%/%%toggle%%\">toggle</A>)','1','<P>The link to toggle a comment between topical and editorial, if the user has the <B>comment_toggle</B> perm. Special keys sid and cid identify the comment, and toggle sets the type (topical or editorial).</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('removed_comment_body','<P><EM>This comment has been deleted by %%nick%%</EM></P>','1','<P>The body of a removed comment. One special key, nick, contains the nickname of the admin who removed the comment. If you have jokers on your site who may claim that their comments have been wiped, I recommend putting something in this block that users can normally not put in their comments, as an \"authenticity\" marker.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('removed_comment_subject','(Comment Deleted)','1','<P>The subject of a removed comment. One special key, nick, contains the nickname of the admin who removed the comment.</P>','Comments','default','en');
INSERT INTO `blocks` VALUES ('submit_page_title','Submit Story','1','','','default','en');
INSERT INTO `blocks` VALUES ('story_list_title','Story List','1','','','default','en');
INSERT INTO `blocks` VALUES ('archive_list_title','Archived Stories','1','','','default','en');
INSERT INTO `blocks` VALUES ('pending_list_title','Pending Stories','1','','','default','en');
INSERT INTO `blocks` VALUES ('poll_form_multi','<INPUT type=\"checkbox\" name=\"is_multiple_choice\" value=\"1\"%%allow_multiple%%> Allow multiple selections in poll','1','Allow multiple choice portion of the poll edit form. Included if var \"allow_multiple_choice\" is on.','Polls','default','en');
INSERT INTO `blocks` VALUES ('poll_form_question','%%last_update%%\r\n%%attached_to%%\r\n%%current%%\r\n%%hidden_form_input%%\r\n%%multiple_choice%%\r\n<p>\r\nPoll Question:<br>\r\n<INPUT type=\"text\" size=\"30\" name=\"question\" value=\"%%question%%\"><br><br>\r\nPoll Answers:<br>\r\n\r\n','1','','Polls','default','en');
INSERT INTO `blocks` VALUES ('edit_story_archive_success','<table>\r\n<TR><TD>%%norm_font%%<B>Story archived.</B>%%norm_font_end%%</TD></TR>\r\n</table>','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('edit_story_archive_fail','<table>\r\n<TR><TD>%%norm_font%%<B>Could not archive story.</B>%%norm_font_end%%</TD></TR>\r\n</table>','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('edit_story_deleted','<table>\r\n<TR><TD>%%norm_font%%<B>Story deleted.</B>%%norm_font_end%%</TD></TR>\r\n</table>','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_edit_updatetxt','<br>Insert <B>[UPDATE]</B> to create an \"[Update]\"','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_edit_edittxt','<br>Insert <B>[ED]</B> to create an \"[editor\'s note]\"','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_edit_notes','<TR>\r\n  <TD>\r\n    special functions:\r\n  </td>\r\n  <td>\r\n    Insert <B>[UPDATE]</B> to create an \"[Update]\"<br>\r\n    Insert <B>[ED]</B> to create an \"[editor\'s note]\"\r\n  </TD>\r\n</TR>','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('edit_story_admin_page','<div class=\"title\">Edit Story</div>\r\n<div class=\"error\">%%error%%</div>\r\n%%story%%\r\n<p>\r\n%%edit_form%%','1','','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('story_edit_spellcheck','<tr>\r\n<td valign=\"top\">spellcheck:</td>\r\n<td valign=\"top\"><INPUT TYPE=\"checkbox\" NAME=\"spellcheck\" VALUE=\"on\"%%check%%></td>\r\n</tr>\r\n','1','','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('story_edit_editqueue','<tr>\r\n<td></td>\r\n<td><INPUT TYPE=\"checkbox\" NAME=\"edit_in_queue\" VALUE=\"1\" %%check%%> Request editorial feedback</td>\r\n</tr>\r\n','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_edit_timeupdate','<tr>\r\n<td valign=\"top\">update timestamp:</td>\r\n<td valign=\"top\"><input type=\"checkbox\" name=\"timeupdate\" value=\"now\"></td>\r\n</tr>','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_edit_upload','<tr>\r\n  <td>&nbsp;</td>\r\n  <td>%%form%%</td>\r\n</tr>','1','Story submit form element for file uploads. Special key |form| will be replaced with the form, if used.','','default','en');
INSERT INTO `blocks` VALUES ('story_edit_dept','<tr>\r\n<td>department:</td>\r\n<td><INPUT TYPE=\"text\" NAME=\"dept\" VALUE=\"%%dept%%\" SIZE=50></td>\r\n</tr>','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_hide_message','Story %%sid%% hidden.','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_delete_message','Story %%sid%% deleted.','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('navbar','<TABLE WIDTH=\"100%\" BORDER=0 CELLPADDING=0 CELLSPACING=0>\n  <TR BGCOLOR=\"%%story_nav_bg%%\">\n    <TD WIDTH=\"100%\" ALIGN=\"center\">\n      %%smallfont%%%%last%%%%sep%%%%next%%%%smallfont_end%%\n    </TD>\n  </TR>\n</TABLE>','1','<P>This provides the overall layout for the story navigation bar which links to the previous and next stories at the bottom of the story text and should be a self-contained block of HTML. This navigation bar can be turned off entirely using the Site Control <B>disable_story_navbar</B>. The special keys are:</P>\n<DL>\n <DT>last</DT>\n  <DD>The previous story. This is formatted using the block <B>navbar_last</B></DD>\n <DT>next</DT>\n  <DD>The next story. This is formatted using the block <B>navbar_next</B></DD>\n <DT>sep</DT>\n  <DD>A separator, only shown if both \"last\" and \"next\" above are used. (The most recent story, for example, will only have a \"last\" entry, as there is no \"next\" story yet.)</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('navbar_comments',' (%%num%% comments)','1','<P>This displays the number of comments attached to a story listed in the story navigation bar, if the current user can read comments in the story\'s section. The special key <B>num</B> is replaced with the number of comments in the relevant story.','Stories','default','en');
INSERT INTO `blocks` VALUES ('navbar_last','<B>&lt;</B> <A HREF=\"%%rootdir%%/story/%%sid%%\">%%title%%</A> %%comments%%','1','<P>This formats the \"last story\" entry in the story navigation bar. The special keys are:</P>\n<DL>\n <DT>sid</DT>\n  <DD>The story ID of the \"last story\"</DD>\n <DT>title</DT>\n  <DD>The title of the \"last story\"</DD>\n <DT>comments</DT>\n  <DD>The contents of <B>navbar_comments</B>, if the user has permission to view comments on the \"last story\"</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('navbar_next','<A HREF=\"%%rootdir%%/story/%%sid%%\">%%title%%</A> %%comments%% <B>&gt;</B> ','1','<P>This formats the \"next story\" entry in the story navigation bar. The special keys are:</P>\n<DL>\n <DT>sid</DT>\n  <DD>The story ID of the \"next story\"</DD>\n <DT>title</DT>\n  <DD>The title of the \"next story\"</DD>\n <DT>comments</DT>\n  <DD>The contents of <B>navbar_comments</B>, if the user has permission to view comments on the \"next story\"</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('navbar_sep',' | ','1','<P>This is the divider used to separate the \"next\" and \"last\" stories in the story navigation bar, if both have an entry. (The most recent story, for example, will only have a \"last\" entry, as there is no \"next\" story yet.) There are no special keys.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_already_post_msg','<P><B>This story has already been posted. It must have gone up while you were voting. Thanks for your vote anyway!</B></P>','1','<P>This message is displayed when a user has just voted on a story that was posted after they started reading it but before they voted. There are no special keys.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_post_message','<P><B>You\'re the straw that broke the camel\'s back!</B><BR>Your vote put this story over the threshold, and it should now appear on the %%where%% page. Enjoy!</P>','1','<P>This message is displayed when a user has just voted on a story and that vote caused the story to reach the post threshold. The special key <B>where</B> is replaced by either \"front\" or \"section\", depending on how the votes were cast.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_dumped_message','<P><b>You were the last vote,</b> and the voters have decided that this story will be hidden. Thank you for voting.</P>','1','<P>This message is displayed when a user has just voted and that vote caused the story to reach the hide threshold. There are no special keys.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_autopost_message','<P><B>You were the last vote. We\'ve considered the votes and comments, and decided the story should be %%status%%. Thank you!</B></P>','1','<P>This message is displayed when a user has just voted and the auto-post calculations have been triggered. The special key <B>status</B> will contain either \"posted\" or \"hidden\", depending on the auto-post calculation results.','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_spam_vote_msg','<P><B>Your vote was recorded for consideration.</B></P>','1','<P>This message is displayed when a user has pressed the \"Spam\" button on a story in the edit queue. There are no special keys.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_vote_msg','<P><B>Your vote (%%vote%%) was recorded.</B><BR>This story currently has a total score of %%curr_score%%.</P>','1','<P>This message is displayed when a user votes on a story. There are two special keys:</P>\n<DL>\n <DT>vote</DT>\n  <DD>The vote cast by the user.</DD>\n <DT>curr_score</DT>\n  <DD>The story\'s current score.</DD>\n</DL>','Stories','default','en');
INSERT INTO `blocks` VALUES ('post_message','<P><FONT SIZE=\"+1\">Your entry has been automatically posted</FONT></P>','1','<P>This block is displayed below the story body when it has been auto-posted. It should be self-contained HTML.</P>','Stories','default','en');
INSERT INTO `blocks` VALUES ('story_edit_tags','<tr>\r\n<td valign=\"top\">tags:</td>\r\n<td valign=\"top\"><input type=\"text\" name=\"tags\" value=\"%%value%%\" size=\"50\"></td>\r\n</tr>','1','Field for tag input in story edit form. This only shows up if the Site Control <B>use_tags</B> is set. \r\n<p>\r\nSpecial keys:\r\n<ul><li> value: the list of tags, as a comma-delimited string</ul>','Stories,Tags','default','en');
INSERT INTO `blocks` VALUES ('tag_item_format','<a href=\"%%rootdir%%/tag/%%urltag%%\">%%tag%%</a>','1','A single item in the list of tags. \r\n<p>\r\nSpecial keys:\r\n<ul>\r\n<li> tag: the tag\r\n<li> urltag: the tag, escaped for use in a url\r\n</ul>','Stories,Tags','default','en');
INSERT INTO `blocks` VALUES ('tag_list_format','<br>Tags: %%tags_list%% (<a href=\"%%rootdir%%/tag\">all tags</a>)','1','The overall formatting for the tag display list, used in story_summary. Only appears if the Site Control <B>use_tags</B> is set.\r\n<p>\r\nSpecial keys:\r\n<ul><li> list: The list of tags, formatted according to <B>tag_item_format</B> and joined together with <B>tag_list_joinwith</B>.</ul>','Stories,Tags','default','en');
INSERT INTO `blocks` VALUES ('tag_list_joinwith',', ','1','When the tag list is built for display, the formatted tag items will be joined together with this block. Especially useful for commas and such, but whatever you can think of to do with it.','Stories,Tags','default','en');
INSERT INTO `blocks` VALUES ('tag_page_format','%%title_font%%All Tags:%%title_font_end%%\r\n<ul class=\"cloud\">\r\n%%tags_list%%\r\n</ul>','1','Page formatting for the tags cloud page generated by the tag OP. The only special key found here is <b>tags_list</b>','Tags','default','en');
INSERT INTO `blocks` VALUES ('tag_page_item','<li class=\"%%cssclass%%\"><a href=\"/tag/%%urltag%%\">%%tag%%</a> (%%num%%)</li>','1','A single item on the tags cloud page. Special keys:\n<ul><li>cssclass: the CSS class name taken from the site control <B>tag_threshold_classes</B></li>\n<li>tag: the tag</li>\n<li>urltag: the tag, filtered for use in a URL</li></ul>','Tags','default','en');
INSERT INTO `blocks` VALUES ('tag_page_joinwith',' ','1','When the list of tags on the tags cloud page is built, the formatted tags will be joined together with this block.','Tags','default','en');
INSERT INTO `blocks` VALUES ('max_intro_warning','<p>Hey, you didn\'t read the rules! You have too much text in the introtext box. Please edit your submission accordingly and use the bodytext box for the bulk of your diary.</p>','1','A warning message for users who have too much stuff in their intro.','Stories','default','en');
INSERT INTO `blocks` VALUES ('min_intro_warning','<p>Sorry, your story/diary is not long enough. Please edit it so it has more content.</p>\r\n\r\nThe minumum is __MININTRO__ __UNIT__.','1','','Stories','default','en');
INSERT INTO `blocks` VALUES ('comment_ip_display','From: <a href=\"/iplookup/%%ip%%\">%%ip%%</a>','19','Format for the IP display/link attached to comments. \r\n<p>\r\nSpecial keys:\r\n<ul><li>ip: Replaced with the ip</li></ul>','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_default_start','<UL>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_default_levelstart','<UL>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_default_end','</UL>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_default_levelend','</UL>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_default_itemstart','<LI>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_default_itemend','</LI>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_dyn_start','<DIV STYLE=\"margin-left: 2.5em\">','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_dyn_itemstart','<TABLE><TR>\r\n<TD VALIGN=\"top\">%%norm_font%%<TT><A ID=\"toggle!cid!\" STYLE=\"text-decoration:none\" HREF=\"javascript:void(toggle(!cid!))\">%%text%%</A></TT>&nbsp;%%norm_font_end%%</TD>\r\n<TD><DIV CLASS=\"%%class%%\" ID=\"content!cid!\">','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_dyn_end','</DIV>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_dyn_itemend','</DIV></TD></TR></TABLE>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_nested_start','<DL>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_nested_levelstart','<DT></DT><DD>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_nested_end','</DL>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('delimiter_nested_levelend','</DD>','1','','Comments','default','en');
INSERT INTO `blocks` VALUES ('comment_search_item','<B>%%count%%) <A HREF=\"%%rootdir%%/comments/%%sid%%/%%cid%%#%%cid%%\">%%subject%%</A></B>\r\n[<A HREF=\"%%rootdir%%/comments/%%sid%%/%%cid%%?mode=alone;showrate=1#%%cid%%\">%%score%% / %%num_rate%%</A>]\r\nReplies: <B>%%replies%%</B>\r\n<BR>posted by <A HREF=\"%%rootdir%%/user/%%urlnick%%\">%%nick%%</A> on %%ftime%%\r\n<BR>\r\nattached to <a href=\"%%attached_link%%\">%%attached_title%%</a>\r\n<p>','19','Formatting for an item in a comment search result list.\r\n<p>\r\nSpecial keys:\r\n<ul>\r\n<li> count: the result number\r\n<li> sid: story id\r\n<li> cid: comment id\r\n<li> pid: parent comments id (or 0)\r\n<li> uid: uid fo the poster\r\n<li> nick: nickname of the poster\r\n<li> urlnick: nickname of the poster escaped for url use (like \"/user/|urlnick|\")\r\n<li> date: comment posting date (raw)\r\n<li> ftime: comment post date (formatted and timezone adjusted)\r\n<li> subject: comment subject\r\n<li> comment: comment text\r\n<li> score: rating score\r\n<li> num_rate: number of ratings\r\n<li> rank: rank value (if you\'re using mysql fulltext search)\r\n<li> attached_link: url for the story or poll the comment is attached to\r\n<li> attached_title: title of the story or poll the comment is attached to\r\n</ul>','Comments','default','en');
INSERT INTO `blocks` VALUES ('tag_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n  <TR>\r\n    <!-- Left info column -->\r\n    <TD VALIGN=\"top\" WIDTH=\"20%\" HEIGHT=20>\r\n      <!-- About Scoop -->\r\n      %%scoop_intro%%\r\n      <!-- X About Scoop -->\r\n    </TD>\r\n    <!-- X Left info column -->\r\n\r\n    <!-- Center content section -->\r\n    <TD VALIGN=\"top\" width=\"55%\">\r\n      %%BOX,section_title%%\r\n      %%BOX,tag_sort_change%%\r\n      %%CONTENT%%\r\n    </TD>\r\n    <!-- X center content section -->\r\n\r\n    <!-- Right boxes column -->\r\n    <TD VALIGN=\"top\" width=\"25%\">\r\n        \r\n      %%BOX,main_menu%%\r\n      %%BOX,ad_box%%\r\n      %%BOX,user_box%%\r\n      %%BOX,rdf_feeds%%\r\n      %%BOX,hotlist_box%%\r\n      %%BOX,admin_tools%%\r\n      %%BOX,poll_box%%\r\n      %%BOX,older_list_box%%\r\n\r\n    </TD>\r\n    <!-- X Right boxes column -->\r\n\r\n  </TR>        \r\n  <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n</HTML>\r\n','2','<P>This block is used to build the front and section story index pages. It must be a full HTML page; dynamic content is added through the use of special keys. The special keys recognised are:</p>\r\n<DL>\r\n <DT>subtitle</dt>\r\n  <DD>This is replaced with the display name of the section being displayed.</dd>\r\n <DT>CONTENT</dt>\r\n  <DD>This is replaced with the story summaries for all of the stories that should be displayed on this page. It is built using the block <B>story_summary</b> once for each story displayed.</dd>\r\n</dl>\r\n','Page Templates','default','en');
INSERT INTO `blocks` VALUES ('special_edit_form','<form name=\"special\" action=\"%%rootdir%%/admin/special\" method=\"post\" enctype=\"multipart/form-data\">\r\n<div class=\"title\">Edit Special Pages</div>\r\n\r\n<div class=\"error\">%%msg%%</div>\r\n\r\n<div>%%preview%%</div>\r\n\r\n<div>\r\n<b>Page:</b> %%page_list%% <input type=\"submit\" name=\"get\" value=\"Get Page\" />\r\n<br /><br />\r\n<b>Page ID:</b><br />\r\n<input type=\"text\" name=\"pageid\" value=\"%%pageid%%\" size=\"25\" />\r\n<br /><br />\r\n<b>Title:</b><br />\r\n<input type=\"text\" name=\"title\" value=\"%%title%%\" size=\"40\" />\r\n<br /><br />\r\n<b>Description:</b><br />\r\n<textarea cols=\"50\" rows=\"3\" name=\"description\" wrap=\"soft\">%%description%%</textarea>\r\n<br /><br />\r\n<b>Content:</b><br />\r\n<textarea cols=\"50\" rows=\"25\" name=\"content\" wrap=\"soft\">%%content%%</textarea><br />\r\n%%upload_page%%\r\n<br /><br />\r\n<b>Options:</b><br />\r\n<input type=\"checkbox\" name=\"direct_link\" value=\"1\"%%directlink_checked%% /> Create direct page link (i.e. http://example.com/pageid)<br />\r\n<input type=\"checkbox\" name=\"html_check\" value=\"1\"%%chkhtml_checked%% /> Check the HTML of this page<br />\r\n%%spellcheck%%\r\n%%delete%%\r\n<br /><br />\r\n<input type=\"submit\" name=\"write\" value=\"Save Page\"> <input type=\"reset\" />\r\n</div>\r\n</form>','1','The special page editing form.\r\n<p>\r\nKeys:\r\n<ul>\r\n<li> |msg|: For error or success messages\r\n<li> |preview|: When looking at a page, the view page link. Formatted with special_edit_preview\r\n<li> |page_list|: Select list of special pages. \r\n<li> |delete|: Delete page checkbox item. Formatted with special_edit_delete\r\n<li> |pageid|: The current page ID\r\n<li> |title|: The current page title\r\n<li> |description|: The current page description\r\n<li> |content|: the current page content\r\n<li> |upload_page|: The upload content form, if available\r\n<li> |directlink_checked|: Selected indicator for the direct-link options\r\n<li> |chkhtml_checked|: Selected indicator for the check html option\r\n<li> |spellcheck|: Spellcheck option form, if available\r\n</ul>','Admin Templates','default','en');
INSERT INTO `blocks` VALUES ('special_edit_preview','View <a href=\"%%rootdir%%/special/%%pageid%%\" target=\"new\">%%title%%</a> (opens in new window)\r\n<br /><br />','1','Preview line for special page editing form.\r\n<p>\r\nKeys:\r\n<ul>\r\n<li> |pageid|: The page\'s ID for linking.\r\n<li> |title|: The page\'s title.\r\n</ul>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('special_edit_delete','<input type=\"checkbox\" name=\"delete\" value=\"1\" /> Delete this page<br />\r\n','1','Delete page line for Special page edit form.','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('special_edit_upload','%%upload_form%%','1','Formatting for upload form for special page edit form.\r\n<p>\r\nKeys:\r\n<ul>\r\n<li> |upload_form|: The actual form to include.\r\n</ul>','Admin Pages','default','en');
INSERT INTO `blocks` VALUES ('special_edit_spellcheck','<input type=\"checkbox\" name=\"spell_check\" value=\"1\"%%splchk_checked%% /> Spellcheck this page<br />','1','Spellcheck option for special page edit form.\r\n<p>\r\nKeys: \r\n<ul>\r\n<li> |splchk_checked|: Checked indicator\r\n</ul>','Admin Pages','default','en');
UNLOCK TABLES;
/*!40000 ALTER TABLE `blocks` ENABLE KEYS */;

--
-- Table structure for table `box`
--

DROP TABLE IF EXISTS `box`;
CREATE TABLE `box` (
  `boxid` varchar(50) NOT NULL default '',
  `title` varchar(50) NOT NULL default '',
  `content` text NOT NULL,
  `description` text,
  `template` varchar(39) NOT NULL default '',
  `user_choose` int(1) default '0',
  PRIMARY KEY  (`boxid`),
  KEY `user_choose_idx` (`user_choose`)
) TYPE=MyISAM;

--
-- Dumping data for table `box`
--


/*!40000 ALTER TABLE `box` DISABLE KEYS */;
LOCK TABLES `box` WRITE;
INSERT INTO `box` VALUES ('cron_edit_queue','','#main sub\r\n\r\n# Get the expire time\r\nmy $expire = $S->{UI}->{VARS}->{queue_edit_max_time};\r\nmy $factors = {\r\n	d => \'86400\',\r\n	h => \'3600\',\r\n	m => \'60\',\r\n	s => \'1\'\r\n};\r\n$expire =~ s/([^\\d])$//;\r\nmy $time_sub = $expire * $factors->{$1};\r\n\r\nmy $select = {\r\n	DEBUG => 0,\r\n	WHAT => \"sid, score, time, displaystatus\",\r\n	FROM => \'stories\',\r\n	WHERE => \"displaystatus = -3 AND UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(time) >= $time_sub\",\r\n	ORDER_BY => \'time DESC\'\r\n};\r\n\r\nmy ($rv, $sth) = $S->db_select($select);\r\n\r\nmy $sid_move_to_moderate;\r\nwhile (my $story = $sth->fetchrow_hashref()) {\r\n	# only move if the time has expired\r\n	$sid_move_to_moderate = $story->{sid};\r\n	$S->move_story_to_voting($story->{sid});\r\n}\r\n\r\n$sth->finish();\r\n\r\nreturn 1;\r\n','','empty_box',0);
INSERT INTO `box` VALUES ('user_box','Login','my $content;\r\nif ($S->{UID} > 0) {\r\n  if ($S->have_perm(\'moderate\')) {\r\n    my ($nstories, $tstories) = $S->_count_new_sub();\r\n    my $color = \'\';\r\n    my $c_end = \'\';\r\n    if ($nstories) {\r\n       $color = \'<font color=\"#FF0000\"><b>\';\r\n       $c_end = \'</b></font>\';\r\n    }\r\n    $content = qq|\r\n    %%dot%% <a class=\"light\" href=\"%%rootdir%%/modsub\">Moderate Submissions</a> ($tstories/$color$nstories$c_end new)<BR>|;\r\n  }\r\n\r\n  if ($S->{TRUSTLEV} == 2 || $S->have_perm(\'super_mojo\')) {\r\n    $content .= qq{%%dot%% <a class=\"light\" href=\"%%rootdir%%/search?type=comment;hidden_comments=show\">Review Hidden Comments</a><br />};\r\n  }\r\n  \r\n  my $urlnick = $S->urlify($S->{NICK});\r\n  my $diary_link = $S->{UI}->{VARS}->{use_diaries} ? \r\n		qq{\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/user/$urlnick/diary\">Your Diary</a><br />\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/submitstory/Diary\">New Diary Entry</a><br /> \r\n		} : \'\';\r\n	my $upload_link = ($S->{UI}->{VARS}->{allow_uploads} && ($S->have_perm(\'upload_user\') || $S->have_perm(\'upload_admin\'))) ?\r\n		qq{%%dot%% <a class=\"light\" href=\"%%rootdir%%/user/$urlnick/files\">Your Files</a><br />} : \'\';\r\n\r\n	my $ad_link = $S->{UI}->{VARS}->{use_ads} ?\r\n		qq{\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/user/$urlnick/ads\">Your Advertisements</a><br />\r\n	  %%dot%% <a class=\"light\" href=\"%%rootdir%%/submitad\">Submit Ad</a><br />\r\n		} : \'\';\r\n\r\n  $content .= qq|\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/user/$urlnick\">User Info</a><br />\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/user/$urlnick/comments\">Your Comments</a><br />\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/user/$urlnick/stories\">Your Stories</a><br?>\r\n      $diary_link\r\n	  $ad_link\r\n      $upload_link\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/user/$urlnick/prefs\">User Preferences</a><br />\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/my/prefs/Interface\">Display Preferences</a><br />\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/my/prefs/Comments\">Comment Preferences</a><br />\r\n      %%dot%% <a class=\"light\" href=\"%%rootdir%%/logout\">Logout $S->{NICK}</a><BR>|;\r\n\r\n    $title = $S->{NICK};\r\n} else {\r\n    $content = $S->{UI}->{BLOCKS}->{login_box};\r\n    $content =~ s/%%LOGIN_ERROR%%/$S->{LOGIN_ERROR}/;\r\n}\r\nreturn {content => $content, title => $title };\r\n','the login box','box',0);
INSERT INTO `box` VALUES ('hotlist_box','Your Hotlist','if ($S->{HOTLIST} && $#{$S->{HOTLIST}} >= 0) {\r\n	my $box_content;\r\n\r\n	foreach my $sid (@{$S->{HOTLIST}}) {\r\n		my $stories = $S->getstories(\r\n			{-type => \'fullstory\',\r\n			-sid => $sid});\r\n		my $story = $stories->[0];\nnext unless ($story);\n\r\n\r\n		my $show = $S->{UI}->{VARS}->{show_new_comments};\r\n		my $num_new = $S->new_comments_since_last_seen($sid) if ($show eq \"hotlist\" || $show eq \"all\");\r\n\r\n		my $end_s = ($story->{commentcount} == 1) ? \'\' : \'s\';\r\n		$box_content .= qq~%%dot%% <A CLASS=\"light\" HREF=\"%%rootdir%%/story/$sid\">$story->{title}</a> ($story->{commentcount} comment$end_s~;\r\n		$box_content .= \", $num_new new\" if defined($num_new);\r\n		$box_content .= \")<BR>\";\r\n	}\r\n\r\n	return unless $box_content;\nmy $title = \"$S->{NICK}\'s Hotlist\";\r\n	return {title => $title, content => $box_content };\r\n}\r\n','the hotlist box','box',1);
INSERT INTO `box` VALUES ('menu_footer','','my $submit = \'\';\r\nmy $acct = \'\';\r\n\r\nif ( $S->have_perm(\'story_post\') ) {\r\n    $submit = \'<A HREF=\"%%rootdir%%/submit\">submit story</A> |\';\r\n}\r\n\r\nif ($S->{UID} < 0) {\r\n    $acct = \'<A HREF=\"%%rootdir%%/newuser\">create account</A> |\';\r\n}\r\n\r\nmy $content = qq{\r\n%%norm_font%%\r\n$submit\r\n$acct\r\n<A HREF=\"%%rootdir%%/special/faq\">faq</A> |\r\n<A HREF=\"%%rootdir%%/search\">search</A>\r\n%%norm_font_end%%};\r\n\r\nreturn $content;','Text-mode main menu','blank_box',0);
INSERT INTO `box` VALUES ('older_list_box','Front Page','my $section = $S->{CGI}->param(\'section\') || \'front\';\r\nmy $stories = [];\r\n\r\nif ($section eq \'front\') {\r\n    $stories = $S->getstories({-type => \'titlesonly\', -displaystatus => \'0\'});\r\n} elsif ($section eq \'__all__\') {\r\n    $stories = $S->getstories({-type => \'titlesonly\', -section => \'!Diary\'});\r\n} else {\r\n    $stories = $S->getstories({-type => \'titlesonly\', -section => $section});\r\n}\r\nmy $box_content;\r\n\r\nmy $date = undef;\r\nforeach my $story (@{$stories}) {\r\n    if (($story->{ftime} ne $date) || !$date) {\r\n        $date = $story->{ftime};\r\n        $box_content .= qq|\r\n	<P>\r\n                <B>$story->{ftime}</B>|;\r\n    }\r\n    $box_content .= qq|\r\n    <BR>%%dot%% <A CLASS=\"light\" HREF=\"%%rootdir%%/story/$story->{sid}\">$story->{title}</A> ($story->{commentcount} comments)|;\r\n    \r\n	if ($S->have_perm(\'story_list\')) {\r\n        $box_content .= qq| [<A CLASS=\"light\" HREF=\"%%rootdir%%/admin/story/$story->{sid}\">edit</A>]|;\r\n    }\r\n}\r\n\r\nmy $offset = $S->{UI}->{VARS}->{maxstories} + $#{$stories};\r\nmy $search_url = qq{%%rootdir%%/?op=search;offset=$offset};\r\n$search_url .= \';section=\'.$section if ($section ne \'front\');\r\n\r\n$box_content .= qq|\r\n            <P>\r\n            <A CLASS=\"light\" HREF=\"$search_url\">Older Stories...</A>\r\n            </P>|;\r\nmy $return = {content => \"%%smallfont%%$box_content%%smallfont_end%%\"};\r\nif ($section ne \'front\' && $section ne \'__all__\') {\r\n    $return->{title} = $S->{SECTION_DATA}->{$section}->{title};\r\n} elsif ($section eq \'__all__\') {\r\n    $return->{title} = \'All Stories\';\r\n}\r\n\r\nreturn $return;','\"Older stories\" list','box',0);
INSERT INTO `box` VALUES ('fortune_box','Inspiration','my $content = `/usr/games/fortune -s`;\r\n$content =~ s/\\n\\s+-/%%norm_font_end%%<\\/I><\\/TD><\\/TR><TR><TD ALIGN=\"right\" BGCOLOR=\"%%box_content_bg%%\">%%norm_font%%<I>/g;\r\n\r\nreturn \"%%norm_font%%<I>$content</I>%%end_norm_font%%\";\r\n','Output of the fortune program, for kicks.','box',0);
INSERT INTO `box` VALUES ('main_menu','Menu','my $submit = \'\';\r\nmy $acct = \'\';\r\n\r\nif ( $S->have_perm(\'story_post\') ) {\r\n    $submit = qq{%%dot%% <A HREF=\"%%rootdir%%/submit\">submit story</A><BR>};\r\n}\r\nif ($S->{UID} < 0) {\r\n    $acct = \'%%dot%% <A HREF=\"%%rootdir%%/newuser\">create account</A><BR>\';\r\n}\r\n\r\nmy $content = qq{\r\n%%smallfont%%\r\n$submit\r\n$acct\r\n%%dot%% <A HREF=\"%%rootdir%%/special/faq\">faq</A><BR>\r\n%%dot%% <A HREF=\"%%rootdir%%/search\">search</A>\r\n%%smallfont_end%%};\r\n\r\nreturn $content;','The menu block-- variable for perms','box',0);
INSERT INTO `box` VALUES ('poll_box','Poll','my $pollqid = shift @ARGS;\r\nmy $preview = 0;\r\n\r\nmy ($pollqid, $action) = $S->get_qid_to_show();\r\n$preview = 1 if ($action eq \'preview\');\r\nreturn \'\' if ($pollqid == 0);\r\n\r\n# if this is an attached poll, don\'t display if the story is hidden, unless\r\n# the current user can view all polls. also make sure the current user has\r\n# permission to view stories in this section\r\nif (my $sid = $S->get_sid_from_qid($pollqid)) {\r\n	return \'\'\r\n		if (($S->_check_story_mode($sid) == -1) && !$S->have_perm(\'list_polls\'))\r\n		|| (!$S->have_section_perm(\'norm_read_stories\', $S->_get_story_section($sid)));\r\n}\r\n\r\nmy $poll_hash = $S->get_poll_hash( $pollqid, $action );\r\n\r\n# first get the poll form all set up except for the answers\r\nmy $poll_form = qq|\r\n	<!-- begin poll form -->\r\n	<FORM ACTION=\"%%rootdir%%/\" METHOD=\"POST\">\r\n    <INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"view_poll\">\r\n    <INPUT TYPE=\"hidden\" NAME=\"qid\" VALUE=\"$poll_hash->{\'qid\'}\">\r\n    <INPUT type=\"hidden\" name=\"ispoll\" value=\"1\">|;\r\n\r\n$poll_form .= \"<b>$poll_hash->{\'question\'}</b><br>\";\r\n\r\n# here is where all the answer fields get filled in\r\nmy $answer_array = $S->get_poll_answers($poll_hash->{\'qid\'}, $action);\r\n\r\n# now check if they have already voted or haven\'t logged in\r\nmy $row;\r\nif ( $S->_can_vote($poll_hash->{\'qid\'}) ) {\r\n    my $polltype = ($S->_is_poll_multiple_choice($poll_hash->{\'qid\'}) || ($preview && $S->{CGI}->param(\'is_multiple_choice\'))) ? \'checkbox\' : \'radio\';\r\n    foreach $row ( @{$answer_array} ) {	\r\n        $poll_form .= qq|\r\n   	        <INPUT TYPE=\"$polltype\" NAME=\"aid\" VALUE=\"$row->{\'aid\'}\"> $row->{\'answer\'}<BR>|;\r\n   	}\r\n} else {\r\n    my $total_votes = $poll_hash->{\'voters\'};\r\n\r\n    if($total_votes == 0) {\r\n        $total_votes = 1;  # so we don\'t get a divide by 0 error\r\n    }\r\n\r\n	$poll_form .= qq|\r\n		<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0>|;\r\n\r\n	foreach $row ( @{$answer_array} ) {\r\n		my $percent = int($row->{\'votes\'} / $total_votes * 100);\r\n		$poll_form .= qq|\r\n			<TR>\r\n				<TD valign=\"top\">%%norm_font%%%%dot%%%%norm_font_end%%</TD>\r\n				<TD valign=\"top\">%%norm_font%%$row->{\'answer\'}%%norm_font_end%%</TD>\r\n				<TD valign=\"top\">%%norm_font%% $percent% %%norm_font_end%%</TD>\r\n			</TR>|;\r\n   	}\r\n	$poll_form .= qq|\r\n		</TABLE>|;\r\n		\r\n}\r\n\r\n# get the # of comments\r\nmy $sid = $S->get_sid_from_qid($poll_hash->{\'qid\'});\r\nmy $comment_num;\r\n$comment_num = $S->poll_comment_num($sid) if ($sid);\r\n$comment_num = $S->poll_comment_num($poll_hash->{\'qid\'}) unless ($sid);\r\n   \r\n# only show the vote button if they havn\'t voted\r\nif ( $S->_can_vote($poll_hash->{\'qid\'}) && ! $preview ) {\r\n	$poll_form .= qq|<BR><INPUT TYPE=\"submit\" name=\"vote\" VALUE=\"Vote\">|;\r\n}\r\n\r\n\r\n# now finish up the form\r\nmy $op = $S->{CGI}->param(\'op\');\r\nmy $comm_disp = ($op ne \'displaystory\') ? \r\n	qq{\r\n	<TD>%%norm_font%%Votes: <b>$poll_hash->{\'voters\'}</b>%%norm_font_end%%</TD>\r\n	<TD ALIGN=\"center\" WIDTH=15>%%norm_font%%|%%norm_font_end%%</TD>\r\n	<TD ALIGN=\"right\">%%norm_font%% Comments: <b>$comment_num</b>%%norm_font_end%%</TD></TR>\r\n	} : \r\n	qq{\r\n	<TD COLSPAN=\"3\" ALIGN=\"center\">%%norm_font%%Votes: <b>$poll_hash->{\'voters\'}</b>%%norm_font_end%%</TD>\r\n	};\r\n\r\n$poll_form .= qq{\r\n	</FORM>\r\n	<!-- end poll form -->\r\n	<P>\r\n	%%norm_font%%\r\n    <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 ALIGN=\"center\">\r\n	<TR>\r\n		$comm_disp\r\n	<TR> };\r\n\r\nif( $preview ) {\r\n    $poll_form .= qq{\r\n	<TD>%%norm_font%%Results%%norm_font_end%%</TD>\r\n	<TD ALIGN=\"center\" WIDTH=15>%%norm_font%%|%%norm_font_end%%</TD>\r\n    <TD ALIGN=\"right\">%%norm_font%% Other Polls%%norm_font_end%%</TD></TR>\r\n	};\r\n\r\n} else {\r\n    $poll_form .= qq{\r\n	<TD>%%norm_font%%<a href=\"%%rootdir%%/poll/$poll_hash->{\'qid\'}\">Results</a>%%norm_font_end%%</TD>\r\n	<TD ALIGN=\"center\" WIDTH=15>%%norm_font%%|%%norm_font_end%%</TD>\r\n    <TD ALIGN=\"right\">%%norm_font%% <a href=\"%%rootdir%%/?op=search;type=polls;search=Search\">Other Polls</a>%%norm_font_end%%</TD></TR>\r\n	};\r\n}\r\n\r\n$poll_form .= qq{\r\n	</TABLE>\r\n	%%norm_font_end%%\r\n	<!-- end poll content -->};\r\n\r\n## don\'t forget to tell them its a poll preview if it is\r\nif( $preview ) {\r\n	$title = \"Poll Preview\";\r\n}\r\n\r\nif ($poll_form) {\r\n	return {content => qq{%%norm_font%%$poll_form%%norm_font_end%%}, title => $title};\r\n} else {\r\n	return \'\';\r\n}\r\n','Box to display polls.','box',1);
INSERT INTO `box` VALUES ('comment_controls','Comment Controls','my $op = $S->{CGI}->param(\'op\');\r\nmy $tool = $S->{CGI}->param(\'tool\');\r\nreturn \'\' unless ($op eq \'displaystory\' || \r\n                            $op eq \'comments\' ||\r\n                            $op eq \'view_poll\'  ||\r\n                            $op eq \'poll_vote\' );\r\nreturn \'\' if( $op eq \'comments\' && $tool eq \'post\' );\r\n\r\nmy $sid = $S->{CGI}->param(\'sid\');\r\nmy $pid = $S->{CGI}->param(\'pid\');\r\nmy $cid = $S->{CGI}->param(\'cid\');\r\nmy $qid = $S->{CGI}->param(\'qid\');\r\n\nreturn \'\' unless ($S->{STORIES}->{$sid}->{commentstatus} == 0);\n\r\nreturn \'\' unless( $S->have_section_perm(\'norm_read_comments\',$S->_get_story_section($sid)));\r\n\r\nmy $form_extra;\r\nmy $anchor = qq{#$cid};\r\nif ($cid) {\r\n    $form_extra = qq{\r\n	<INPUT TYPE=\"hidden\" NAME=\"cid\" VALUE=\"$cid\">};\r\n} elsif ($pid) {\r\n    $form_extra = qq{\r\n	<INPUT TYPE=\"hidden\" NAME=\"pid\" VALUE=\"$pid\">};\r\n}\r\n\r\nmy $commentmode_select = $S->_comment_mode_select();\r\nmy $comment_order_select = $S->_comment_order_select();\r\nmy $comment_rating_select = $S->_comment_rating_select();\r\nmy $rating_choice = $S->_comment_rating_choice();\r\nmy $comment_type_select = $S->_comment_type_select();\r\n\r\nmy $form_op = \'op\';\r\nmy $form_op_value = $op;\r\nmy $id = \'sid\';\r\n\r\nif ( $qid ) {\r\n	$form_op = \'op\';\r\n	$form_op_value = \'view_poll\';\r\n	$id = \'qid\';\r\n	$sid = $qid;\r\n}\r\n	\r\nmy $comment_sort = qq|\r\n		<FORM NAME=\"commentmode\" ACTION=\"%%rootdir%%/$anchor\" METHOD=\"post\">\r\n		<INPUT TYPE=\"hidden\" NAME=\"$form_op\" VALUE=\"$form_op_value\">\r\n		<INPUT TYPE=\"hidden\" NAME=\"$id\" VALUE=\"$sid\">\r\n		$form_extra\r\n	<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"%%box_content_bg%%\" align=\"center\">\r\n	\r\n		<TR>\r\n			<TD VALIGN=\"middle\">\r\n				%%smallfont%%|;\nif ($comment_type_select) {\n	$comment_sort .= qq|\nView:\r\n				<SMALL>\r\n					$comment_type_select\r\n				</SMALL>|;\n}\n$comment_sort .= qq|\r\n				Display:\r\n				<SMALL>\r\n				$commentmode_select\r\n				</SMALL>\r\n				Sort:\r\n				<SMALL>\r\n				$comment_rating_select\r\n				</SMALL>\r\n				<SMALL>\r\n				$comment_order_select\r\n				</SMALL>\r\n|;\r\n	\r\n		\r\nif ($S->have_perm( \'comment_rate\' )) {\r\n	$comment_sort .= qq|\r\n	Rate?\r\n	<SMALL>$rating_choice</SMALL>|;\r\n}\r\n\r\n$comment_sort .= qq|\r\n<INPUT TYPE=\"submit\" NAME=\"setcomments\" VALUE=\"Set\">\r\n%%smallfont_end%%\r\n</TD></TR>\r\n</TABLE>\r\n</FORM>|;\r\n\r\n$template =~ s/CELLSPACING=0>/CELLSPACING=0 ALIGN=\"center\">/;\r\n\r\nreturn { content => $comment_sort, template => $template };','Comment display prefs','blank_box',0);
INSERT INTO `box` VALUES ('mod_stats','Moderation Stats','my $sid = $ARGS[0];\r\n$sid = $S->{CGI}->param(\'sid\') unless $sid;\r\nreturn unless $sid;\r\n\r\nmy $q_sid = $S->{DBH}->quote($sid);\r\n\r\nmy ($rv, $t_sth) = $S->db_select({\r\n    WHAT => \'displaystatus\',\r\n    FROM => \'stories\',\r\n    WHERE => qq{sid = $q_sid}});\r\n\r\nmy $disp = $t_sth->fetchrow();\r\n\r\nreturn unless ($disp == \'-2\');\r\n\r\nmy ($stat, $trash) = $S->_mod_or_show($sid);\r\nreturn \'\' unless ($stat eq \'show\');\r\n\r\nmy ($totalvotes, $score) = $S->_get_total_votes($sid);\r\nmy $sth = $S->_get_story_mods($sid);\r\n\r\nmy $head = $S->{UI}->{BLOCKS}->{moderate_head};\r\n\r\n$head =~ s/%%votes%%/$totalvotes/g;\r\n$head =~ s/%%score%%/$score/g;\r\n\r\nmy ($this_row, $user);\r\n\r\nmy $for = qq{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\nmy $against = qq{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\nmy $neutral = qq{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\n#\'\r\nmy $f = 0;\r\nmy $a = 0;\r\nmy $n = 0;\r\n\r\n$for .= qq{<small>\r\n	<SELECT NAME=\"uid\" SIZE=1>\r\n	<OPTION VALUE=\"\">Voted for: (%%for%%)};\r\n$against .= qq{<small>\r\n	<SELECT NAME=\"uid\" SIZE=1>\r\n	<OPTION VALUE=\"\">Voted against: (%%against%%)};\r\n$neutral .= qq{<small>\r\n	<SELECT NAME=\"uid\" SIZE=1>\r\n	<OPTION VALUE=\"\">Didn\'t care: (%%neutral%%)};	\r\n\r\nwhile (my $mod_rec = $sth->fetchrow_hashref) {\r\n	my $nick = $S->get_nick($mod_rec->{uid});\r\n	$nick =~ s/^(.{0,20})/$1/;\r\n	my $link = qq{\r\n	<OPTION VALUE=\"$mod_rec->{uid}\">$nick};\r\n	if ($mod_rec->{vote} == 1) {\r\n		$for .= qq|\r\n		$link|;\r\n		$f++;\r\n	} elsif ($mod_rec->{vote} == 0) {\r\n		$neutral .= qq|\r\n		$link|;\r\n		$n++;\r\n	} elsif ($mod_rec->{vote} == -1) {\r\n		$against .= qq|\r\n		$link|;\r\n		$a++;\r\n	}\r\n}\r\n$sth->finish;\r\n\r\n$for .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n$against .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n$neutral .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n\r\n$for =~ s/%%for%%/$f/;\r\n$against =~ s/%%against%%/$a/;\r\n$neutral =~ s/%%neutral%%/$n/;\r\n\r\nmy $content = $head.\'%%smallfont%%\'.$for.$against.$neutral.\'%%smallfont_end%%\';\r\n\r\nreturn { content => $content };','Show the stats for story mod','box',0);
INSERT INTO `box` VALUES ('section_title','null','my $content = \'Latest News\';\r\n\r\nmy $op = $S->{CGI}->param(\'op\');\r\nmy $page_num = $S->cgi->param(\'page\');\r\nmy $page = \'\';\r\nif ($page_num && $page_num != 1) {\r\n  $page = \"(page $page_num)\";\r\n}\r\n\r\nif ($op eq \'section\') {\r\n  my $section = $S->{CGI}->param(\'section\');\r\n  unless($S->have_section_perm(\'hide_read_stories\',$section)) {\r\n    $content = $S->{SECTION_DATA}->{$section}->{title} || \'All Stories\';\r\n  } else {\r\n    $content = \'\';\r\n  }\r\n} elsif ($op eq \'tag\') {\r\n  my $tag = $S->cgi->param(\'tag\');\r\n  $content = ($tag) ? qq{Tag: $tag} : \'\';\r\n}\r\n\r\nreturn {\'content\' => \"%%title_font%%$content $page%%title_font_end%%\" };','Display title of current section','blank_box',0);
INSERT INTO `box` VALUES ('show_comment_raters','Others have rated this comment as follows:','my $content = qq{\r\n	<table width=\"100%\" border=0 cellpadding=2 cellspacing=0>};\r\n\r\nmy $cid = $S->{CGI}->param(\'cid\');\r\nmy $sid = $S->{CGI}->param(\'sid\');\nmy $archive = $S->_check_archivestatus($sid);\r\n\r\nmy $f_cid = $S->{DBH}->quote($cid);\r\nmy $f_sid = $S->{DBH}->quote($sid);\r\n\r\n#Check for hidden\r\nmy ($rv, $sth) = $S->db_select({\n	ARCHIVE => $archive,\r\n	WHAT => \'points\',\r\n	FROM => \'comments\',\r\n	WHERE => qq{sid = $f_sid AND cid = $f_cid}});\r\n\r\nmy $points = $sth->fetchrow();\r\n$sth->finish();\r\n\r\nif (($points < $S->{UI}->{VARS}->{rating_min}) && ($S->{TRUSTLEV} != 2)) {\r\n	return \'\';\r\n}\r\n\r\nmy ($rv, $sth) = $S->db_select({\n	ARCHIVE => $archive,\r\n	WHAT => \'uid, rating\',\r\n	FROM => \'commentratings\',\r\n	WHERE => qq{sid = $f_sid AND cid = $f_cid}});\r\n\r\nmy $zeros = 0;\r\n\r\nwhile (my $rating = $sth->fetchrow_hashref()) {\r\n	my $user = $S->user_data($rating->{uid});\r\n	\r\n	if (($rating->{\'rating\'} < $S->{UI}->{VARS}->{rating_min}) && ($S->{TRUSTLEV} != 2)) {\r\n		$zeros++;\r\n	} else {\r\n		$content .= qq{\r\n			<tr>\r\n			<td>%%norm_font%%<A HREF=\"%%rootdir%%/user/uid:$rating->{uid}\">$user->{nickname}</A>%%norm_font_end%%</td>\r\n			<td>%%norm_font%%$rating->{rating}%%norm_font_end%%</td>\r\n			</tr>};\r\n	}\r\n}\r\n\r\n$sth->finish();\r\n\r\nif ($zeros) {\r\n	my $word = ($zeros == 1) ? \"Rating\" : \"Ratings\";\r\n	\r\n	$content .= qq{\r\n		<tr>\r\n			<td colspan=2>%%norm_font%%Zero $word: $zeros%%norm_font_end%%</td>\r\n		</tr>};\r\n}\r\n\r\n$content .= qq{\r\n    </table>};\r\n\r\nreturn {\'content\' => $content};','Display who rated a comment what','',0);
INSERT INTO `box` VALUES ('rdf_feeds','External Feeds','return unless $S->{UI}->{VARS}->{use_rdf_feeds} || $S->have_perm(\'rdf_admin\');\r\n\r\nmy $to_display = {};\r\nif (@ARGS || $S->{CGI}->param(\'rdf\')) {\r\n	my $rdf_arg = $S->{CGI}->param(\'rdf\');\r\n	if ($rdf_arg eq \'all\') {\r\n		$to_display->{\'all\'} = 1;\r\n	} else {\r\n		@ARGS = split(/,/, $rdf_arg) if $rdf_arg;\r\n		foreach (@ARGS) {\r\n			$to_display->{$_} = 1;\r\n		}\r\n	}\r\n}\r\n\r\nmy $content;\r\nmy $channels = $S->rdf_channels();\r\nmy $user_feeds = $S->rdf_get_prefs() unless @ARGS;\r\nmy $item_limit = defined($S->{prefs}->{rdf_max_headlines}) ?\r\n	$S->{prefs}->{rdf_max_headlines} :\r\n	defined($S->{UI}->{VARS}->{rdf_max_headlines}) ?\r\n	$S->{UI}->{VARS}->{rdf_max_headlines} : 15;\r\n\r\nforeach my $c (@{$channels}) {\r\n	unless ($to_display->{all} == 1) {\r\n		if (@ARGS) {\r\n			next unless $to_display->{ $c->{rid} };\r\n		} else {\r\n			next unless $user_feeds->{ $c->{rid} };\r\n		}\r\n	}\r\n	next unless $c->{title};\r\n	unless ($S->have_perm(\'rdf_admin\')) {\r\n		next if $c->{submitted} || !$c->{enabled};\r\n	}\r\n\r\n	if ($S->{UI}->{VARS}->{rdf_use_images} && $c->{image_url}) {\r\n		$content .= qq|<a href=\"$c->{image_link}\"><img src=\"$c->{image_url}\" alt=\"$c->{image_title}\" border=\"1\"></a><br>\\n|;\r\n	} else {\r\n		$content .= qq|<b><a class=\"light\" href=\"$c->{link}\">$c->{title}</a></b><br />\\n|;\r\n	}\r\n\r\n	my $items = $S->rdf_items($c->{rid}, $item_limit);\r\n	foreach my $i (@{$items}) {\r\n		$content .= qq|%%dot%% <a class=\"light\" href=\"$i->{link}\">$i->{title}</a><br />\\n|;\r\n	}\r\n\r\n	if ($S->{UI}->{VARS}->{rdf_use_forms} && $c->{form_link}) {\r\n		$content .= qq|<form action=\"$c->{form_link}\" method=\"GET\">$c->{form_title}: <input type=\"text\" name=\"$c->{form_name}\"></form><br />\\n|;\r\n	}\r\n\r\n	$content .= \"<br />\\n\";\r\n}\r\n\r\nif ($content && $S->have_perm(\'submit_rdf\')) {\r\n	$content = qq|<a class=\"light\" href=\"%%rootdir%%/submitrdf\">Submit Feed</a><br /><br />\\n| . $content;\r\n}\r\n\r\nreturn $content;\r\n','contains RDF feeds from other sites','box',1);
INSERT INTO `box` VALUES ('submit_rdf','Submit Feed','return \"Sorry, you don\'t have permission to submit a feed.\"\r\n\r\nunless $S->have_perm(\'submit_rdf\');\r\n\r\nmy $action = $S->{CGI}->param(\'action\') || \'showform\';\r\n\r\nif ($action eq \'showform\') {\r\n\r\nreturn &disp_form();\r\n\r\n} elsif ($action eq \'save\') {\r\n\r\nmy $url = $S->{CGI}->param(\'url\');\r\n\r\nreturn (\'Please fill in the URL field\') unless $url;\r\n\r\n# check to see if this RDF already exists\r\n\r\nmy $is_dup = 0;\r\n\r\nmy $channels = $S->rdf_channels;\r\n\r\nforeach my $c (@{$channels}) {\r\n\r\n$is_dup = 1 if $c->{rdf_link} eq $url;\r\n\r\n}\r\n\r\nreturn &disp_form(\'That RDF already exists, or has been submitted already.\') if $is_dup;\r\n\r\n\r\n\r\nmy $do_fetch = $S->{UI}->{VARS}->{allow_rdf_fetch} ? 1 : 0;\r\n\r\nmy ($id, $res) = $S->rdf_add_channel($url, $do_fetch, $S->{NICK});\r\n\r\nunless ($res) {\r\n\r\n$S->rdf_remove_channel($id);\r\n\r\nreturn &disp_form(\'Error adding RDF file: $res\');\r\n\r\n}\r\n\r\nmy $fetched_msg = qq|\r\n\r\n%%norm_font%%Your RDF has been fetched. An admin will check it out as soon as possible%%norm_font_end%%|;\r\n\r\nreturn $fetched_msg;\r\n\r\n}\r\n\r\n\r\n\r\nsub disp_form {\r\n\r\nmy $form = qq|\r\n\r\n%%norm_font%% %%submit_rdf_message%% %%norm_font_end%%\r\n\r\n<p>\r\n\r\n<form action=\"%%rootdir%%/?\" method=\"GET\">\r\n\r\n<input type=\"hidden\" name=\"op\" value=\"submitrdf\">\r\n\r\n<input type=\"hidden\" name=\"action\" value=\"save\">\r\n\r\n<table border=0 cellspacing=0 cellpadding=0>|;\r\n\r\n$form .= qq|\r\n\r\n<tr>\r\n\r\n<td><FONT color=\"#FF0000\">%%norm_font%%$_[0]%%norm_font_end%%</font></td>\r\n\r\n</tr>| if $_[0];\r\n\r\n$form .= qq|\r\n\r\n<tr>\r\n\r\n<td>%%norm_font%%URL of RDF file:%%norm_font_end%% <input type=\"text\" name=\"url\" size=\"50\"></td>\r\n\r\n</tr>\r\n\r\n<tr>\r\n\r\n<td><input type=\"submit\" value=\"Submit\"></td>\r\n\r\n</tr>\r\n\r\n</table>\r\n\r\n</form>\r\n\r\n|;\r\n\r\nreturn $form;\r\n\r\n}\r\n\r\n','Box to do submitrdf op and such.','titled_box',0);
INSERT INTO `box` VALUES ('whos_online','Who\'s online','## New Who\'s Online Box\n## Quite a bit of stuff borrowed from the old one.\n\n# return if anonymous for now\nreturn if $S->{UID} == -1;\n\n# The time stuff can be changed to taste\n\n# The query\n\nmy ($rv,$sth) = $S->db_select({\n   FROM => \'whos_online\',\n   WHAT => \'ip, uid\',\n   WHERE => \'last_visit > DATE_SUB(NOW(), INTERVAL 30 MINUTE)\',\n   ORDER_BY => \'uid\'\n});\n\nmy %uids;\nmy $total;\nmy $anontotal;\n\nwhile (my $s = $sth->fetchrow_hashref()) {\n      if ($s->{\'uid\'} == -1) {\n        $anontotal++;\n        next;\n        }\n   $total++;\n   $uids{ $s->{\'uid\'} }++;\n}\n\n$sth->finish;\n\nmy @sorted = sort keys %uids;\n\nmy $out;\nmy $hidden;\nforeach (@sorted) {\n   if ($S->user_data($_)->{prefs}->{online_cloak} eq \'on\') {\n      $hidden++;\n      next;\n   }\n   my $nick = $S->user_data($_)->{nickname};\n   $out .= qq~%%dot%% <A HREF=\"%%rootdir%%/user/uid:$_\">$nick</A>~;\n   $out .= \" ($uids{$_})\" if $uids{$_} > 1;\n   $out .= \"<BR>\\n\";\n}\nif($anontotal){\n   my $anon_user_nick = $S->{UI}->{VARS}->{anon_user_nick};\n   $out .= \"%%dot%% $anon_user_nick ($anontotal)<BR>\";\n   }\nif ($hidden) {\n   $out .= qq~%%dot%% Cloaked Users ($hidden)<p>~;\n} else {\n   $out .= \'<p>\';\n}\n$total = $total + $anontotal;\n$out .= qq~<small>Note: You may cloak yourself from appearing here in your <A HREF=\"%%rootdir%%/my/prefs/Interface\">Display Preferences</A></small>.~;\nreturn {content => $out, title => \"Who\'s Online? ($total)\"};\n','','box',1);
INSERT INTO `box` VALUES ('show_ad','Show Advertisement','my $arg0 = $ARGS[0];\r\nmy $arg1 = $ARGS[1];\r\nmy $ad_id;\r\nmy $adhash = {};\r\nmy $content = \'\';\r\n\r\n# if the ad_id is in the url, use the url\r\nif( $arg0 eq \'fromurl\' || $arg0 eq \'allcgi\' ) {\r\n $ad_id = $S->{CGI}->param(\'ad_id\');\r\n\r\n# if they want to see what the fields are...\r\n} elsif( $arg0 eq \'showfields\' ){\r\n\r\n	my $ex_ad = $S->get_example_ad($arg1);\r\n	return \'\' unless( defined($ex_ad) && (ref($ex_ad) eq \'HASH\') );\r\n\r\n	if( exists $S->{UI}->{BLOCKS}->{\"preview_\" . $ex_ad->{ad_tmpl}} ) {\r\n		$content = $S->{UI}->{BLOCKS}->{ \"preview_\". $ex_ad->{ad_tmpl} };\r\n	} else {\r\n		$content = $S->{UI}->{BLOCKS}->{ $ex_ad->{ad_tmpl} };\r\n	}\r\n\r\n	$content =~ s/%%FILE_PATH%%//g;\r\n	$content =~ s/%%TEXT1%%/This is text1/g;\r\n	$content =~ s/%%TEXT2%%/This is text2/g;\r\n	$content =~ s/%%TITLE%%/This is the title/g;\r\n	$content =~ s/%%LINK_URL%%/This is the link url/g;\r\n	$content =~ s[%%REDIRECT_URL%%][%%rootdir%%]g;\r\n\r\n	return { content => $content };\r\n\r\n# else if ad_id is specified in template, use that\r\n} elsif( $arg0 =~ /\\d/ ) {\r\n $ad_id = $arg0;\r\n}\r\n\r\nunless( defined( $ad_id ) || $arg0 eq \'allcgi\' ) {\r\n	return \'\';\r\n}\r\n\r\n# if we need everything from cgi, let get_ad_hash know\r\nmy $source = \'db\';\r\n$source = \'cgi\' if( $arg0 eq \'allcgi\' );\r\n\r\n$adhash = $S->get_ad_hash($ad_id, $source);\r\n\r\nmy $image = $adhash->{ad_file};\r\nmy $subdir = $adhash->{sponsor};\r\n$subdir = \'example\' if( $adhash->{example} == 1 );\r\n\r\nmy $image_path = $subdir . \'/\' . $image;\r\n\r\nif( exists $S->{UI}->{BLOCKS}->{\"preview_\" . $adhash->{ad_tmpl}} ) {\r\n	$content = $S->{UI}->{BLOCKS}->{ \"preview_\". $adhash->{ad_tmpl} };\r\n} else {\r\n	$content = $S->{UI}->{BLOCKS}->{ $adhash->{ad_tmpl} };\r\n}\r\n\r\n$content =~ s/%%FILE_PATH%%/$image_path/g;\r\n$content =~ s/%%TEXT1%%/$adhash->{ad_text1}/g;\r\n$content =~ s/%%TEXT2%%/$adhash->{ad_text2}/g;\r\n$content =~ s/%%TITLE%%/$adhash->{ad_title}/g;\r\n$content =~ s/%%LINK_URL%%/$adhash->{ad_url}/g;\r\n$content =~ s/%%SID%%/$adhash->{ad_sid}/g;\r\n$content =~ s[%%REDIRECT_URL%%][%%rootdir%%/redirect/$ad_id]g;\r\n\r\nreturn { content => $content };\r\n','Just a simple box that will show the ad specified','box',0);
INSERT INTO `box` VALUES ('ad_box','Advertisement','return \'\' if( $S->pref(\'showad\') eq \'off\' );\nreturn \'\' unless( $S->{UI}->{VARS}->{use_ads} );\r\n\r\nmy $adhash = $S->get_next_ad();\r\nreturn \'\' unless( $adhash->{ERROR} != 1 );\r\n\r\nmy $content = $S->{UI}->{BLOCKS}->{$adhash->{ad_tmpl}};\r\n\r\nmy $subdir = ($adhash->{example} == 1) ? \'example\' : $adhash->{sponsor};\nmy $file_path = $subdir . \'/\' .  $adhash->{ad_file};\n\n$content =~ s/%%LINK_URL%%/$adhash->{ad_url}/g;\r\n$content =~ s/%%TITLE%%/$adhash->{ad_title}/g;\r\n$content =~ s/%%TEXT1%%/$adhash->{ad_text1}/g;\r\n$content =~ s/%%TEXT2%%/$adhash->{ad_text2}/g;\r\n$content =~ s/%%FILE_PATH%%/$file_path/g;\r\n$content =~ s/%%SID%%/$adhash->{ad_sid}/g;\r\n$content =~ s[%%REDIRECT_URL%%][%%rootdir%%/redirect/$adhash->{ad_id}];\r\n\r\nif( $S->pref(\'ad_open_new_win\') eq \'on\' ) {\r\n  $content =~ s/%%TARGET%%/target=\"_blank\"/g;\r\n}\r\n\r\nreturn { content => $content };\r\n','Simple ad box for the side of the page','box',0);
INSERT INTO `box` VALUES ('ad_types','Advertisement Type Listing','my $content = $S->make_ad_type_list(\'no_choice\');\r\n\r\nreturn { content => $content };\r\n','Shows a list of all of the advertisement types','blank_box',0);
INSERT INTO `box` VALUES ('buyimpressions_box','Purchase Ad Impressions','# This box controls /ads\r\n# -> If no argument is given, assumes the user wants to purchase\r\n# more impressions.\r\n# -> If distribute=1 will bring up ad impression distribution\r\n# page.\r\n\r\nmy $content = \'\';\r\n\r\nmy $distribute = $S->cgi->param(\'distribute\');\r\n\r\nif( $distribute eq \'dist\' ) {\r\n	$content = $S->ad_impression_distribute();\r\n}\r\nelse {\r\n	$content = $S->purchase_impressions();\r\n}\r\n\r\nreturn { content => $content };\r\n','controls /ads.  Displays either a form to distribute impressions between multiple ads, or to just buy impressions directly.','blank_box',0);
INSERT INTO `box` VALUES ('ad_story_format','Ad Story formatter','my $ad_id = $ARGS[0];\r\n\r\nmy $content = qq{\r\n%%BOX,show_ad,$ad_id%%\r\n};\r\n\r\nreturn { content => $content };','Use this to format the advertisments in the introtext of their stories.','blank_box',0);
INSERT INTO `box` VALUES ('section_title_subsections','null','my $content;\r\nmy $op = $S->{CGI}->param(\'op\');\r\nmy $section = $S->cgi->param(\'section\');\r\n\r\nif( $op eq \'section\' ) {\r\n  return unless $S->have_section_perm(\'norm_read_stories\', $section);\n  if( $S->{UI}->{VARS}->{enable_subsections} ) {\r\n\r\n    my @paths = $S->section_paths($section);\r\n    while( my $path = shift(@paths) ){\r\n\r\n      $path =~ s/\\/?$section$//;       # Remove if Current Section\r\n      $path =~ s/([^\\/]+)/<\\/b>%%norm_font_end%%<a href=\"%%rootdir%%\\/section\\/$1\">%%norm_font%%<b>$S->{SECTION_DATA}->{$1}->{title}<\\/b>%%norm_font_end%%<\\/a>%%norm_font%%<b>/g;\r\n      $path =~ s/^<\\/b>%%norm_font_end%%//;   # Clean Up After Ourselves\r\n      $path = ($path) ? \"%%norm_font%%<b>/</b>%%norm_font_end%%$path\" : \'\';\r\n      $content .= qq{<a href=\"%%rootdir%%/\">%%norm_font%%<b>Home</b>%%norm_font_end%%</a>$path%%norm_font%%<b>/$S->{SECTION_DATA}->{$section}->{title}</b>%%norm_font_end%%<br>\\n};\r\n    }\r\n    $content=~s/<\\/br>$//;\r\n  } else {\r\n    $content = $S->{SECTION_DATA}->{$section}->{title} || \'All Stories\';\r\n    $content = \"%%title_font%%$content%%title_font_end%%\";\r\n  }\r\n}\r\nelse {\r\n	$content = \'%%title_font%%Latest News%%title_font_end%%\';\r\n}\r\n\r\nreturn { content=>$content }\r\n','Display title of current section','blank_box',0);
INSERT INTO `box` VALUES ('renewad_box','Renew Advertisement','my $content = \'\';\r\nmy $err = \'\';\r\nmy $ad_id = $S->cgi->param(\'ad_id\') || 0;\r\nmy $confirm = $S->cgi->param(\'confirm\') || \'nope\';\r\nmy $purchase = $S->cgi->param(\'purchase\') || \'nope\';\r\nmy $cgi_amount = $S->cgi->param(\'amount\');\r\nmy $confirm_amt = $S->cgi->param(\'confirm_amt\') || \'1.11\'; # 1.11 so that it != $cgi_amount\r\n\r\n# first get the page set up\r\n$content = qq{\r\n<form name=\"buyimpressions\" action=\"%%rootdir%%/renew\" method=\"POST\" enctype=\"multipart/form-data\">\r\n<input type=\"hidden\" name=\"confirm_amt\" value=\"$cgi_amount\" />\r\n<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" width=\"99%\"> \r\n<tr><td colspan=\"2\" bgcolor=\"%%title_bgcolor%%\">%%title_font%% Renew Advertisement %%title_font_end%%</td></tr>\r\n<tr><td colspan=\"2\"> <input type=\"hidden\" name=\"ad_id\" value=\"$ad_id\"> &nbsp; </td></tr>\r\n};\r\n\r\n###########################################\r\n### Check to make sure they can renew the ad, then renew\r\n###  else show error message.  SEt up links on user ad list\r\n###  make sure they all direct to the right box\r\n###  get cron from rusty to set up to handle renewals right\r\n###  make sure db fields are there.\r\n###  maybe write some functions to handle renewals\r\n\r\nmy $ad_hash = $S->get_ad_hash($ad_id, \'db\');\r\n\r\n# first make sure they have chosen an ad\r\nunless( $ad_id ) {\r\n	$content .= qq{ <tr><td colspan=\"2\">%%norm_font%% %%renew_choose_ad%% %%norm_font_end%%</td></tr>\r\n</table></form>};\r\n	return { content => $content };\r\n}\r\n\r\nunless( $ad_hash->{sponsor} eq $S->{UID} ) {\r\n	$content .= qq{ <tr><td colspan=\"2\">%%norm_font%% %%renew_ad_no_permission%% %%norm_font_end%%</td></tr>\r\n</table></form>};\r\n	return { content => $content };\r\n}\r\n\r\n# check if confirm, and if so, change the action \r\nif( $purchase && $purchase eq \'Purchase\' && ($confirm_amt == $cgi_amount) ) {\r\n	warn \"sucessful purchase\" if $DEBUG;\r\n	return qq[%%BOX,submit_ad_pay_box,renew,$ad_hash->{ad_id},$confirm_amt%%];\r\n}\r\nelsif( $purchase && $purchase eq \'Purchase\' && ($confirm_amt != $cgi_amount) )  {\r\n	# they changed their amount, let them know why they\'re at the same page again.\r\n	$err = qq|<font color=\"ff0000\"> You have changed the amount you wanted to purchase, please click Purchase again to purchase the new amount</font>|;\r\n}\r\n\r\n\r\n# if we get here, and they clicked either button, then mark it as confirmed.\r\n# its possible that they changed their amount w/out confirming again.\r\nmy $purchase_button = \'\';\r\nmy $confirmed = 0;\r\nif( ($confirm && $confirm eq \'Confirm\') or ($purchase && $purchase eq \'Purchase\') ) {\r\n	$purchase_button = q{<input type=\"submit\" name=\"purchase\" value=\"Purchase\" />};\r\n	$confirmed = 1;\r\n}\r\n\r\n# need to check the input a little and generate the amount to populate the form with\r\nmy $ad_type = $S->get_ad_tmpl_info( $ad_hash->{ad_tmpl} );\r\nmy $min_impressions = $ad_type->{min_purchase_size};\r\nmy $cpm = $ad_type->{cpm};\r\nmy $amount = \'\';\r\nif( $confirmed && $cgi_amount && $cgi_amount !~ /^\\d+$/ ) {\r\n	$err = qq{<font color=\"ff0000\"> \'$cgi_amount\' is not a valid number of ads to purchase, you must purchase at least $min_impressions ad impressions</font>};\r\n	$purchase_button = \'\';\r\n}\r\nelsif( $confirmed && $cgi_amount && ($cgi_amount < $min_impressions) ) {\r\n	$err = qq{<font color=\"ff0000\"> $cgi_amount is not a valid purchase amount, the minimum amount you may purchase is $min_impressions ad impressions</font>};\r\n	$purchase_button = \'\';\r\n}\r\nelsif( $confirmed ) {\r\n	$amount = $cgi_amount;\r\n}\r\n\r\nmy $confirm_msg = $S->{UI}->{BLOCKS}->{confirm_ad_renew};\r\n$confirm_msg = \'\' unless $confirmed;\r\n\r\n$content .= qq{\r\n<tr><td colspan=\"2\"> &nbsp; </td></tr>\r\n<tr><td colspan=\"2\"> %%BOX,show_ad,$ad_id%% </td></tr>\r\n<tr><td colspan=\"2\"> %%norm_font%% $err %%norm_font_end%% </td></tr>\r\n<tr><td colspan=\"2\"> %%norm_font%% %%renew_ad_message%% %%norm_font_end%% </td></tr>\r\n<tr><td colspan=\"2\"> &nbsp; </td></tr>\r\n<tr><td align=\"left\" valign=\"top\"> %%norm_font%% <b>Order Size:</b> %%norm_font_end%% </td>\r\n<td align=\"left\" valign=\"top\"> %%norm_font%% <input type=\"text\" name=\"amount\" value=\"$amount\" /> %%norm_font_end%%</td>\r\n</tr>\r\n<tr><td colspan=\"2\"> %%norm_font%% <i>Minimum order size is $min_impressions impressions</i> %%norm_font_end%%</td></tr>\r\n<tr><td colspan=\"2\"> %%norm_font%% $confirm_msg %%norm_font_end%% </td></tr>\r\n<tr><td colspan=\"2\"> &nbsp; </td></tr>\r\n<tr><td colspan=\"2\" align=\"center\"> %%norm_font%% <input type=\"submit\" name=\"confirm\" value=\"Confirm\" /> $purchase_button </td></tr>\r\n};\r\n\r\n$content .= q{</table></form>};\r\n\r\n\r\n\r\n\r\nreturn { content => $content };\r\n','A page to let users renew the impressions on their ads.','blank_box',0);
INSERT INTO `box` VALUES ('ad_pay_type_select','','my $type = $S->cgi->param(\'type\');\r\nmy $ad_id = $S->cgi->param(\'ad_id\');\r\nmy $renew = $S->cgi->param(\'renew\');\r\nmy $count = $S->cgi->param(\'count\');\r\n\r\nunless ($type && $ad_id) {\r\n  return \'Error: No payment type or ad ID.\';\r\n}\r\n\r\nreturn \"%%BOX,ad_pay_cc,$ad_id,$count%%\" if ($type eq \'cc\');\r\nreturn \"%%BOX,ad_pay_paypal,$ad_id,$count%%\" if ($type eq \'paypal\');','Implant the right payment type box','blank_box',0);
INSERT INTO `box` VALUES ('ad_pay_cc','','my $ad_id = $ARGS[0];\r\nmy $count = $ARGS[1];\r\nmy $content;\r\n\r\n\r\n# If we\'re ordering, do it now.\r\nif ($S->cgi->param(\'final_pay\')) {\r\n	$content .= $S->cc_place_order();\r\n}\r\n\r\n\r\nunless ($content) {\r\n	my ($num, $price);\r\n	if ($count) {\r\n		# Get total price\r\n		my ($rv, $sth) = $S->db_select({\r\n			WHAT  => \'ad_types.cpm\',\r\n			FROM  => \'ad_info, ad_types\',\r\n			WHERE => \"ad_info.ad_id = $ad_id AND ad_info.ad_tmpl = ad_types.type_template\"\r\n		});\r\n		my ($cpm) = $sth->fetchrow();\r\n		$price = ($count/1000) * $cpm;\r\n		$num = $count;\r\n	} else {	\r\n		my ($rv, $sth) = $S->db_select({\r\n			WHAT => \'purchase_size,purchase_price\',\r\n			FROM => \'ad_info\',\r\n			WHERE => \"ad_id=$ad_id\"});\r\n\r\n		($num, $price) = $sth->fetchrow();\r\n		$sth->finish();\r\n	}\r\n	\r\n	$content .= qq{\r\n<b>Your ad:</b><br>\r\n<center>%%BOX,show_ad,$ad_id%%</center>\r\n<p>};\r\n	if ($S->cgi->param(\'pay\')) {\r\n    	$content .= $S->cc_preview_order($price,$num);\r\n	}\r\n\r\n	my $p_form = $S->cc_make_person_form();\r\n	my $c_form = $S->cc_make_card_form();\r\n\r\n	$content .= qq{\r\n	<p>\r\n	Please fill in the payment form below. Required fields are in <font color=\"#ff0000\">red</font>. When you are done, click \"Preview Order\". You will <b>not</b> be billed yet, and you will be able to change what you\'ve entered before confirming the order.\r\n	<form name=\"adpay\" ACTION=\"/special/adpay\" METHOD=\"POST\">\r\n	<input type=\"hidden\" name=\"ad_id\" value=\"$ad_id\">\r\n	<input type=\"hidden\" name=\"type\" value=\"cc\">\r\n	<input type=\"hidden\" name=\"count\" value=\"$count\">\r\n	<p>\r\n	<b>Billing Information:</b>\r\n	<p>\r\n	$p_form\r\n	<p>\r\n	<b>Credit/Debit Card Information:</b>\r\n	<p>\r\n	$c_form\r\n	<p>\r\n	<input type=\"submit\" name=\"pay\" value=\"Preview Order\">\r\n	</form>};\r\n}\r\n#\'\r\nreturn $content;','','blank_box',0);
INSERT INTO `box` VALUES ('cc_bill_orders','','my $DEBUG = 0;\r\nmy $err;\r\n\r\nmy ($rv, $sth) = $S->db_select({\r\n    WHAT => \'ad_payments.order_id, ad_payments.cost, ad_payments.ad_id\',\r\n    FROM => \'ad_payments, ad_info\',\r\n    WHERE => \'ad_payments.ad_id = ad_info.ad_id AND \r\n              ad_info.paid = 1 AND \r\n              ad_info.judged = 1 AND\r\n              ad_info.approved = 1 AND \r\n              ad_info.active = 0 AND \r\n              ad_info.example = 0 AND \r\n              ad_info.views_left > 0 AND \r\n              ad_payments.pay_type != \\\'paypal\\\' AND\r\n              ad_payments.paid IS NULL\'\r\n});\r\n\r\nmy $orders = [];\r\nwhile (my ($order_id, $cost, $ad_id) = $sth->fetchrow()) {\r\n	$err .=  \"Order: $order_id, Cost: $cost<br>\" if $DEBUG;\r\n	push @{$orders}, {\'ad_id\'   => $ad_id,\r\n	                  \'orderID\' => $order_id,\r\n	                  \'amount\'  => $cost};\r\n}\r\n$sth->finish();\r\n\r\nif ($#{$orders} >= 0) {	\r\n    $err = $S->cc_bill_approved_ads($orders);\r\n}\r\n\r\n\r\nreturn $err;\r\n		','Post-auth CC orders','blank_box',0);
INSERT INTO `box` VALUES ('ad_pay_paypal','Pay using paypal','my $ad_id = $ARGS[0];\r\nmy $count = $ARGS[1];\r\nmy $content;\r\nmy $site = $S->{UI}->{VARS}->{site_url}.$S->{UI}->{VARS}->{rootdir};\r\nmy $secure_site = $S->{UI}->{VARS}->{secure_site_url}.$S->{UI}->{VARS}->{rootdir};\r\nmy $business_id = $S->{UI}->{VARS}->{paypal_business_id};\r\n\r\nunless ($ad_id) {\r\n	return \"No ad id passed.\";\r\n}\r\n\r\nmy ($num, $price, $item);\r\nif ($count) {\r\n	# Get total price\r\n	my ($rv, $sth) = $S->db_select({\r\n		WHAT  => \'ad_types.cpm\',\r\n		FROM  => \'ad_info, ad_types\',\r\n		WHERE => \"ad_info.ad_id = $ad_id AND ad_info.ad_tmpl = ad_types.type_template\"\r\n	});\r\n	my ($cpm) = $sth->fetchrow();\r\n	$price = ($count/1000) * $cpm;\r\n	$price = sprintf(\"%1.2f\", $price);\r\n	$num = $count;\r\n	$item = \"Ad Renewal\";\r\n} else {\r\n	my ($rv, $sth) = $S->db_select({\r\n	  WHAT => \'purchase_size,purchase_price\',\r\n	  FROM => \'ad_info\',\r\n	  WHERE => \"ad_id=$ad_id\"});\r\n	($num, $price) = $sth->fetchrow();\r\n	$sth->finish();\r\n	$item = \"Advertisement\";\r\n}\r\n\r\nmy $finished = $S->cgi->param(\'finished\');\r\nmy $canceled = $S->cgi->param(\'canceled\');\r\n\r\nif ($finished) {\r\n	my $content = $S->{UI}->{BLOCKS}->{paypal_finished};	\r\n	return $content;\r\n} elsif ($canceled) {\r\n	my $content = $S->{UI}->{BLOCKS}->{paypal_canceled};\r\n	return $content;\r\n}\r\n\r\nmy $paypal_form = qq{\r\n<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\r\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\r\n<input type=\"hidden\" name=\"business\" value=\"$business_id\">\r\n<input type=\"hidden\" name=\"notify_url\" value=\"$site/special/paypal_confirm\">\r\n<input type=\"hidden\" name=\"item_name\" value=\"$item\">\r\n<input type=\"hidden\" name=\"item_number\" value=\"$ad_id\">\r\n<input type=\"hidden\" name=\"no_shipping\" value=\"1\">\r\n<input type=\"hidden\" name=\"return\" value=\"$secure_site/special/adpay?type=paypal;ad_id=$ad_id;finished=1\">\r\n<input type=\"hidden\" name=\"cancel_return\" value=\"$secure_site/special/adpay?type=paypal;ad_id=$ad_id;canceled=1\">\r\n<input type=\"hidden\" name=\"amount\" value=\"$price\">\r\n<input type=\"hidden\" name=\"custom\" value=\"$num\">\r\n<input type=\"image\" src=\"%%imagedir%%/paypal.gif\" border=\"0\" name=\"submit\" alt=\"Make payments with PayPal - it\'s fast, free and secure!\">\r\n</form>};\r\n\r\n$content = qq{\r\n<b>Your ad:</b><br>\r\n<center></center>\r\n<p>\r\nYour purchase details are below. Click the Paypal button, and you will go to a page on Paypal where you will finish the payment process.\r\n<table border=0 cellpadding=1 cellspacing=0 bgcolor=\"#000000\" align=\"center\">\r\n  <tr>\r\n    <td>\r\n	  <table width=\"100%\" cellpadding=5 cellspacing=0 border=0 bgcolor=\"#eeeeee\">\r\n	    <tr>\r\n		  <td>\r\n			<FONT FACE=\"verdana, arial, helvetica, sans-serif\" SIZE=\"2\"><b>Impressions:</b></font>\r\n		  </td>\r\n		  <td>\r\n		    <FONT FACE=\"verdana, arial, helvetica, sans-serif\" SIZE=\"2\">$num</font>\r\n		  </td>\r\n		</tr>\r\n	    <tr>\r\n		  <td>\r\n			<FONT FACE=\"verdana, arial, helvetica, sans-serif\" SIZE=\"2\"><b>Total Price:</b></font>\r\n		  </td>\r\n		  <td>\r\n		    <FONT FACE=\"verdana, arial, helvetica, sans-serif\" SIZE=\"2\">\\$$price</font>\r\n		  </td>\r\n		</tr>\r\n		<tr>\r\n		  <td colspan=2 align=\"center\">\r\n		  <FONT FACE=\"verdana, arial, helvetica, sans-serif\" SIZE=\"2\">\r\n		  Click below to purchase.<br>\r\n		  $paypal_form\r\n		  </font>\r\n		  </td>\r\n		</tr>\r\n	  </table>\r\n	</td>\r\n  </tr>\r\n</table>};\r\n\r\nreturn $content;','','blank_box',0);
INSERT INTO `box` VALUES ('paypal_bill_orders','Bill paypal orders','my $DEBUG = 0;\r\nmy $err;\r\n\r\nmy ($rv, $sth) = $S->db_select({\r\n	WHAT => \'ad_payments.order_id, ad_payments.cost, ad_payments.ad_id, ad_info.approved\',\r\n    FROM => \'ad_payments, ad_info\',\r\n    WHERE => \'ad_payments.ad_id = ad_info.ad_id AND \r\n              ad_info.paid = 1 AND \r\n              ad_info.judged = 1 AND\r\n              ad_info.active = 0 AND \r\n              ad_info.example = 0 AND \r\n              ad_info.views_left > 0 AND \r\n              ad_payments.pay_type = \\\'paypal\\\' AND\r\n              ad_payments.paid IS NULL\'\r\n});\r\n\r\nmy @orders;\r\nwhile (my $o = $sth->fetchrow_hashref()) {\r\n	push @orders, $o;\r\n}\r\n$sth->finish();\r\n\r\nmy @disapproved_oids;\r\nforeach my $order (@orders) {\r\n	my ($paid, $active);\r\n	if ($order->{approved} == 0) {\r\n		push @disapproved_oids, $order->{order_id};\r\n		$paid = 0;\r\n		$active = 0;\r\n	} else {\r\n		$paid = 1;\r\n		$active = 1;\r\n	}\r\n\r\n	my ($rv, $sth) = $S->db_update({\r\n		WHAT  => \'ad_payments\',\r\n		SET   => \"paid=$paid, final_date=NOW()\",\r\n		WHERE => \"ad_id=$order->{ad_id}\"});\r\n	$sth->finish();\r\n	\r\n	($rv, $sth) = $S->db_update({\r\n		WHAT  => \'ad_info\',\r\n		SET   => \"active=$active\",\r\n		WHERE => \"ad_id=$order->{ad_id}\"});\r\n	$sth->finish();\r\n\r\n	if ($active) {\r\n		($rv, $sth) = $S->db_select({\r\n				WHAT => \'ad_sid\',\r\n				FROM => \'ad_info\',\r\n				WHERE => qq{ad_id = $order->{ad_id}}});\r\n		my $sid = $sth->fetchrow();\r\n			\r\n		if ($sid) {\r\n			$S->activate_ad_story($sid);\r\n		}\r\n	}\r\n}\r\n\r\nif ($#disapproved_oids >= 0) {\r\n	my $subject = \'Paypal Order Refund Alert\';\r\n	my $message = qq{\r\nThe following paypal orders were disapproved and need a refund.\r\n};\r\n	\r\n	foreach my $oid (@disapproved_oids) {\r\n		$message .= qq{\r\nhttps://www.paypal.com/vst/id=$oid};\r\n	}\r\n	\r\n	foreach my $to (split /,/, $S->{UI}->{BLOCKS}->{admin_alert}) {\r\n		$S->mail($to, $subject, $message);\r\n	}\r\n\r\n}','','blank_box',0);
INSERT INTO `box` VALUES ('paypal_confirm','','my $DEBUG = 0;\r\n\r\n\r\nmy $answer = $S->paypal_ipn_confirm();\r\n\r\nif ($answer ne \'VERIFIED\') {\r\n	$S->paypal_invalid_mail($answer);\r\n	return;\r\n}\r\n\r\nmy $vars = $S->cgi->Vars();\r\n# Check payment status\r\nmy $stat = $vars->{\'payment_status\'};\r\nreturn unless ($stat =~ /completed/i);\r\n\r\n# Check that it\'s an ad or a renewal. Add in subscription notify later\r\nif ($vars->{item_name} eq \'Advertisement\') {\r\n\r\n	$S->paypal_activate_ad($vars);\r\n\r\n} elsif ($vars->{item_name} eq \'Ad Renew\') {\r\n\r\n	$S->paypal_do_renewal($vars);\r\n\r\n\n} elsif ($vars->{item_name} eq \'Subscription\') {\n	$S->paypal_do_sub($vars);\n} elsif ($vars->{item_name} eq \'Donation\') {\n	$S->paypal_do_donate($vars);\n} else {\n	warn \"paypal_confirm called with unknown item_name: $vars->{item_name}\\n\";\n}\r\n\r\n\r\nreturn;','','blank_box',0);
INSERT INTO `box` VALUES ('logout_box','Logout','$S = $S->reset_user;\r\n\r\nmy $logout_url = $S->{UI}->{VARS}->{logout_url}\r\n	|| ($S->{UI}->{VARS}->{rootdir} . \'/\');\r\n\r\n$S->{APACHE}->headers_out->{\'Location\'} = \"$logout_url\";\r\n\r\n# the following is probably unessesary, but just in case...\r\nreturn { content => qq{Redirecting to <a href=\"$logout_url\">$logout_url</a>} }\r\n','This logs a user out.  For /logout','blank_box',0);
INSERT INTO `box` VALUES ('user_files_list','User Files','return unless ($S->have_perm(\'upload_user\') && $S->{UI}->{VARS}->{allow_uploads});\r\n\r\nmy $uid = $S->{UID};\r\n\r\nmy $content = qq[\r\n <form name=\"insert_file\">\r\n   <select name=\"file_link\" size=\"1\">\r\n  <option value=\"\">Select File:</option>\r\n];\r\n\r\nmy $file_link = $S->var(\'upload_link_user\') . $uid;\r\nmy ($file_counter, $file_total_count) = (2, 0);\r\n\r\nmy @files = $S->get_file_list($uid, \'user\');\r\n$file_total_count = (scalar @files) - 2;\r\n\r\nwhile ($file_counter < ($file_total_count + 2) ) {\r\n    my $file_name = $files[$file_counter];\r\n  $content .= qq{<option value=\"&lt;img src=\"$file_link/$file_name\"&gt;\">$file_name</option>};\r\n  $file_counter++;\r\n}\r\n\r\n$content .= qq[\r\n    </select><br />\r\n <input type=\"button\" value=\"<< Intro Text\" onclick=\"document.editstory.introtext.value+=document.insert_file.file_link.value\"><br />\r\n    <input type=\"button\" value=\"<< Body Text\" onclick=\"document.editstory.bodytext.value+=document.insert_file.file_link.value\">\r\n    </form>\r\n %%norm_font%%<a href=\"/user/uid:$uid/files\">View Your Files</a>%%norm_font_end%%\r\n];\r\n\r\nreturn $content;\r\n','Allows a user to insert a IMG tag pointing at an uploaded file into the introtext or bodytext of a story.','box',0);
INSERT INTO `box` VALUES ('theme_chooser','',' ################################################\n# WARNING! This box is called so early in the  #\n# setup phase that screwing it up will require #\n# a trip directly to the database.  If you do  #\n# mess it up, follow the following procedure.  #\n#                                              #\n# First, hit the back button so you can read   #\n# these instructions.  That\'s the only part    #\n# you have to memorize.                        #\n# Second, go into the database and type the    #\n# following sql command (it\'s on 2 lines here) #\n#                                              #\n# UPDATE box SET content=\"return \\\"default\\\";\" #\n# WHERE boxid=\"theme_chooser\";                 #\n#                                              #\n# Don\'t forget the WHERE clause!               #\n# Then, figure out what went wrong, and fix it.#\n# You can save the box and it will overwrite   #\n# the simple \'return \"default\";\' box that is   #\n# guaranteed to not cause errors.              #\n# If you didn\'t fix the problem, return to     #\n# step one and try again.                      #\n#                                              #\n# Please note that you won\'t have to change    #\n# this box unless you want to set a theme based#\n# on something other than section, user_agent, #\n# user group, and site_id. That\'s what the site#\n# controls in the category \"Themes\" are for.   #\n################################################\n\nmy $default_theme = $S->{UI}->{VARS}->{default_theme};\n\n# first, are we using themes at all:\nunless ( $S->{UI}->{VARS}->{use_themes} ) {\n    return $default_theme;\n}\n\n# returns a comma-separated list of themes to be \n# applied, in order.  Should always start with the \n# default theme.\n \n# set the values of the criteria we\'re testing for\nmy $siteid = $S->{CONFIG}->{site_id};\nmy $agent = $S->run_box(\"detect_agent\");\nmy $group = $S->{GID};\nmy $pref;\nif ( $S->{UI}->{VARS}->{allow_user_themes} ) {\n  if ( $S->{prefs}->{theme} ) {\n   $pref = $S->{prefs}->{theme};\n  } else {\n   $pref = \"\";\n  }\n}\n\n# section is a bit of a special case\nmy $section;\nif ( $S->param->{\"section\"} ) {\n  $section = $S->param->{\"section\"};\n} elsif ( $S->param->{\"sid\"} ) {\n  my $sid = $S->param->{\"sid\"};\n  my ($rv,$sth) = $S->db_select({\n         WHAT => \'section\',\n           FROM => \'stories\',\n          WHERE => qq@sid = \"$sid\"@,});\n  if ( $rv ) {\n    my $sect = $sth->fetchrow_hashref();\n    $section = $sect->{\"section\"};\n  } else {\n    $section = \"\";\n  }\n  $sth->finish;\n}\n\nmy @order = split( /,s*/, $S->{UI}->{VARS}->{order} );\n\nmy $themelist = $default_theme;\n\nforeach my $criteria ( @order ) {\n  if ( $criteria eq \"section\" ) {\n   if ( $section ) {\n    my $th=$S->{UI}->{VARS}->{\"section_$section\"};\n    $themelist .= \",$th\" if $th;\n   }\n  } elsif ( $criteria eq \"siteid\" ) {\n    my $th = $S->{UI}->{VARS}->{\"siteid_$siteid\"};\n    $themelist .= \",$th\" if $th;\n  } elsif ( $criteria eq \"group\" ) {\n    my $th = $S->{UI}->{VARS}->{\"group_$group\"};\n    $themelist .= \",$th\" if $th;\n  } elsif ( $criteria eq \"agent\" ) {\n    my $th = \"\";\n    #FIXME: need to write box detect_agent\n  } elsif ( $criteria eq \"pref\" ) {\n    my $th = $pref;\n    $themelist .= \",$th\" if $th;\n  }\n}\n\nreturn $themelist;\n ','chooses which themes should be applied, and in which order.  \'default\' should come first, as a complete theme; subsequent themes overwrite any blocks with the same name.','blank_box',0);
INSERT INTO `box` VALUES ('detect_agent','','#FIXME: add detection\n\nreturn \"\";','detects user agent, returns a code string.','blank_box',0);
INSERT INTO `box` VALUES ('subpay_type_select','Select Payment Type','my $pay_type = $S->cgi->param(\'pay_type\');\r\nmy $type   = $S->cgi->param(\'type\'  );\r\nmy $months = $S->cgi->param(\'months\');\r\n\r\nif ($pay_type) {\r\n  return \"%%BOX,subpay_cc,$type,$months%%\" if ($pay_type eq \'cc\');\r\n  return \"%%BOX,subpay_paypal,$type,$months%%\" if ($pay_type eq \'paypal\');\r\n  if ($pay_type eq \'none\') {\r\n  	my $return = $S->sub_activate_immediate($type, $months);\r\n	return $return if ($return);\r\n  }\r\n}\r\n#%%\r\n#warn \"Months: $months\\n\";\r\n\r\nunless ($months && $type) {\r\n  return \'Error! No subscription type or duration provided.\';\r\n}\r\n\r\nmy $type_data = $S->sub_get_type($type);\r\n\r\n# Bounds check the period\r\n$months = $type_data->{max_time} if (($type_data->{max_time}) && $months > $type_data->{max_time});\r\n\r\n# If it\'s a free sub, see if they\'ve already had it\r\nif ($S->sub_check_renewable($type_data->{type})) {\r\n  return \'Sorry, but you may not renew this subscription.\';\r\n}\r\n\r\nmy ($price, $purchase_display) = $S->sub_calculate_purchase_cost($type, $months);\r\n\r\nmy $content = qq{\r\n<table width=\"75%\" border=0 cellpadding=5 cellspacing=0 align=\"center\">\r\n  <tr>\r\n    <td colspan=2>%%norm_font%%\r\n$purchase_display%%norm_font_end%%};\r\n\r\nif ($price eq \'ERROR\') {\r\n    $content .= qq{</td></tr></table>};\r\n    return $content;\r\n} elsif ($price == 0) {\r\n	$content .= qq{\r\n		<center>\r\n		<form method=\"POST\" action=\"%%rootdir%%\">\r\n		<input type=\"hidden\" name=\"op\" value=\"subpay\">\r\n		<input type=\"hidden\" name=\"months\" value=\"$months\">\r\n		<input type=\"hidden\" name=\"type\" value=\"$type\">\r\n		<input type=\"hidden\" name=\"pay_type\" value=\"none\">\r\n		<input type=\"submit\" name=\"finish\" value=\"Finish\">\r\n		</form></center></td></tr></table>};\r\n	return $content;\r\n}\r\n\r\n$content .= qq{%%norm_font%%<p>Ok, now it\'s time for payment. Please select a payment type below.</p>\r\n%%norm_font_end%%</td></tr>\r\n};\n$content .= qq{<tr>\r\n    <td align=\"center\">%%norm_font%%<a href=\"/subpay?pay_type=paypal;type=$type;months=$months\"><img src=\"%%imagedir%%/paypal.gif\" border=\"0\" alt=\"Pay with Paypal\"><br>Pay with Paypal</a>%%norm_font_end%%</td>} if $S->{UI}->{VARS}->{payment_use_paypal};\n$content .= qq{    <td align=\"center\">%%norm_font%%<a href=\"/subpay?pay_type=cc;type=$type;months=$months\"><img src=\"%%imagedir%%/cclogos.gif\" width=\"87\" height=\"27\" border=0 ALT=\"We accept Visa and MasterCard\"><br>Pay with Visa or Mastercard</a>%%norm_font_end%%</td>} if $S->{UI}->{VARS}->{payment_use_cc};\n$content .= qq{  </tr>\r\n</table>\r\n};\r\n\r\nreturn $content;','Choose the type of payment for a subscription, or, if passed a \"pay_type\" param, just pass through to the appropriate payment processing box.','blank_box',0);
INSERT INTO `box` VALUES ('subpay_cc','Pay for Your Subscription','my $content;\r\nmy $type   = $ARGS[0];\r\nmy $months = $ARGS[1];\r\n\r\n\r\n# If we\'re ordering, do it now.\r\nif ($S->cgi->param(\'final_pay\')) {\r\n	$content .= $S->cc_place_order(\'subscription\');\r\n	return $content;\r\n}\r\n\r\n\r\nmy $type_data = $S->sub_get_type($type);\r\n\r\n# Bounds check the period\r\n$months = $type_data->{max_time} \r\n    if (($type_data->{max_time}) && $months > $type_data->{max_time});\r\n\r\nmy ($price, $remaining) = $S->sub_calculate_purchase_cost($type, $months);\r\n\r\nmy $content = qq{%%norm_font%%$remaining};\r\n\r\nif ($S->cgi->param(\'pay\')) {\r\n    $content .= $S->cc_preview_order($price,$months,\'subscription\');\r\n}\r\n\r\nmy $p_form = $S->cc_make_person_form();\r\nmy $c_form = $S->cc_make_card_form();\r\n\r\n\r\n$content .= qq{\r\n<p>\r\nPlease fill in the payment form below. Required fields are in \r\n<font color=\"#ff0000\">red</font>. When you are done, click \"Preview Order\". \r\nYou will <b>not</b> be billed yet, and you will be able to change what you\'ve \r\nentered before confirming the order.\r\n<form name=\"subpay\" ACTION=\"/subpay\" METHOD=\"POST\">\r\n<input type=\"hidden\" name=\"months\" value=\"$months\">\r\n<input type=\"hidden\" name=\"pay_type\" value=\"cc\">\r\n<input type=\"hidden\" name=\"type\" value=\"$type\">\r\n<p>\r\n<b>Billing Information:</b>\r\n<p>\r\n$p_form\r\n<p>\r\n<b>Credit/Debit Card Information:</b>\r\n<p>\r\n$c_form\r\n<p>\r\n<input type=\"submit\" name=\"pay\" value=\"Preview Order\">\r\n</form>%%norm_font_end%%};\r\n\r\n#\'\r\n\r\nreturn $content;\r\n','Purchase a subscription with a credit card','blank_box',0);
INSERT INTO `box` VALUES ('subpay_paypal','','my $content;\r\nmy $type   = $ARGS[0];\r\nmy $months = $ARGS[1];\r\nmy $site = $S->{UI}->{VARS}->{site_url}.$S->{UI}->{VARS}->{rootdir};\r\nmy $secure_site = $S->{UI}->{VARS}->{secure_site_url}.$S->{UI}->{VARS}->{rootdir};\r\nmy $business_id = $S->{UI}->{VARS}->{paypal_business_id};\r\nmy $item = \'Subscription\';\r\n\r\nmy $type_data = $S->sub_get_type($type);\r\n\r\n# Bounds check the period\r\n$months = $type_data->{max_time} \r\n    if (($type_data->{max_time}) && $months > $type_data->{max_time});\r\n\r\nmy ($price, $remaining) = $S->sub_calculate_purchase_cost($type, $months);\r\n\r\nmy $finished = $S->cgi->param(\'finished\');\r\nmy $canceled = $S->cgi->param(\'canceled\');\r\n\r\nif ($finished) {\r\n	$content = $S->{UI}->{BLOCKS}->{sub_paypal_finished};	\r\n	return $content;\r\n} elsif ($canceled) {\r\n	$content = $S->{UI}->{BLOCKS}->{sub_paypal_canceled};\r\n	return $content;\r\n}\r\n\r\nmy $paypal_form = qq{\r\n<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\r\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\r\n<input type=\"hidden\" name=\"business\" value=\"$business_id\">\r\n<input type=\"hidden\" name=\"notify_url\" value=\"$site/special/paypal_confirm\">\r\n<input type=\"hidden\" name=\"item_name\" value=\"Subscription\">\r\n<input type=\"hidden\" name=\"item_number\" value=\"$type\">\r\n<input type=\"hidden\" name=\"no_shipping\" value=\"1\">\r\n<input type=\"hidden\" name=\"return\" value=\"$secure_site/subpay?pay_type=paypal;type=$type;months=$months;finished=1\">\r\n<input type=\"hidden\" name=\"cancel_return\" value=\"$secure_site/subpay?pay_type=paypal;type=$type;months=$months;canceled=1\">\r\n<input type=\"hidden\" name=\"amount\" value=\"$price\">\r\n<input type=\"hidden\" name=\"custom\" value=\"$S->{UID}:$months\">\r\n<input type=\"image\" src=\"%%imagedir%%/paypal.gif\" border=\"0\" name=\"submit\" alt=\"Make payments with PayPal - it\'s fast, free and secure!\">\r\n</form>};\r\n\r\n$content = qq{\r\n%%norm_font%%\r\n$remaining\r\n<p>\r\nClick the Paypal button, and you will go to a page on Paypal where you will finish the payment process.\r\n%%norm_font_end%%\r\n<p>\r\n<table border=0 cellpadding=1 cellspacing=0 bgcolor=\"#000000\" align=\"center\">\r\n  <tr>\r\n    <td>\r\n	  <table width=\"100%\" cellpadding=5 cellspacing=0 border=0 bgcolor=\"#eeeeee\">\r\n		<tr>\r\n		  <td colspan=2 align=\"center\">\r\n		  <FONT FACE=\"verdana, arial, helvetica, sans-serif\" SIZE=\"2\">\r\n		  Click below to purchase.<br>\r\n		  $paypal_form\r\n		  </font>\r\n		  </td>\r\n		</tr>\r\n	  </table>\r\n	</td>\r\n  </tr>\r\n</table>};\r\n\r\nreturn $content;','','blank_box',0);
INSERT INTO `box` VALUES ('mark_ads_inactive','','my ($rv, $sth) = $S->db_update({\r\n    WHAT => \'ad_info\',\r\n    SET  => \'active = 0\',\r\n    WHERE => \'views_left <= 0 AND perpetual != 1 AND active = 1\'\r\n});\r\n$sth->finish();\r\n','Mark ads inactive after they\'ve run out of views.','blank_box',0);
INSERT INTO `box` VALUES ('unpaid_ad_reap','','my ($rv, $sth) = $S->db_delete({\r\n    FROM => \'ad_info\',\r\n    WHERE => \'paid is null and TO_DAYS(NOW()) - TO_DAYS(submitted_on) >= 14 and example != 1 and purchase_price > 0\'});\r\n$sth->finish();\r\n','Reap unpaid ads after 14 days. They are unlikely to ever be paid for then.','blank_box',0);
INSERT INTO `box` VALUES ('submit_ad_pay_box','Ad Submitted','my $action = $ARGS[0];\r\nmy $ad_id = $ARGS[1];\r\n\r\nmy $q_id = $S->dbh->quote($ad_id);\r\nmy ($num, $price);\r\nmy $args;\r\nmy $content;\r\n\r\nif ($action eq \'renew\') {\r\n        $num = $ARGS[2];\r\n        unless ($num) {\r\n                return \'Error! No impression count was submitted.\';\r\n        }\r\n        # Get total price\r\n        my ($rv, $sth) = $S->db_select({\r\n                WHAT  => \'ad_types.cpm\',\r\n                FROM  => \'ad_info, ad_types\',\r\n                WHERE => \"ad_info.ad_id = $q_id AND ad_info.ad_tmpl =\r\nad_types.type_template\"\r\n        });\r\n        my ($cpm) = $sth->fetchrow();\r\n        $price = ($num/1000) * $cpm;\r\n        $args=\";ad_id=$ad_id;renew=1;count=$num\";\r\n	$content = $S->{UI}->{BLOCKS}->{ad_renewed_message};\r\n} else {\r\n        my ($rv, $sth) = $S->db_select({\r\n                WHAT => \'purchase_size, purchase_price\',\r\n                FROM => \'ad_info\',\r\n                WHERE => \"ad_id=$q_id\"});\r\n\r\n        ($num, $price) = $sth->fetchrow();\r\n        $sth->finish();\r\n	$args=\";ad_id=$ad_id\";\r\n	$content = $S->{UI}->{BLOCKS}->{ad_submitted_message};\r\n}\r\n\r\nmy ($pay_cc_block, $pay_pal_block, $pay_free_block);\r\n\r\n$price = sprintf(\"%1.2f\", $price);\r\nif ($price ne \'0.00\') {\r\n  $pay_cc_block = $S->{UI}->{BLOCKS}->{ad_pay_cc_msg} if ($S->{UI}->{VARS}->{payment_use_cc});\r\n  $pay_pal_block = $S->{UI}->{BLOCKS}->{ad_pay_paypal_msg} if ($S->{UI}->{VARS}->{payment_use_paypal});\r\n} else {\r\n  $pay_free_block = $S->{UI}->{BLOCKS}->{ad_free_msg};\r\n  #// update the advert here for number of impressions.\r\n  if ($action eq \'renew\') {\r\n    $S->cc_finish_renewal($ad_id, \'\', 0, \'free\', $num);\r\n  } else {\r\n    $S->cc_finish_ad_sale($ad_id, \'\', 0, \'free\');\r\n  }\r\n}\r\n$content =~ s/%%AD_CC_PAY%%/$pay_cc_block/;\r\n$content =~ s/%%AD_PAYPAL_PAY%%/$pay_pal_block/;\r\n$content =~ s/%%AD_FREE_MESSAGE%%/$pay_free_block/g;\r\n$content =~ s/%%num_impressions%%/$num/g;\r\n$content =~ s/%%price%%/$price/g;\r\n$content =~ s/%%payment_args%%/$args/g;\r\n\r\nreturn { content => $content };\r\n','This generates the page the user will see when they have successfully submitted or renewed an ad. If they still need to pay for the advert it will display the various payment options, depending on the ads_use_cc and ads_use_paypal vars. If the advert is free, it will call the relevent functions to mark it as paid. Depends on the blocks ad_renewed_message, ad_submitted_message, ad_pay_cc_msg, ad_pay_paypal_msg & ad_free_msg','box',0);
INSERT INTO `box` VALUES ('related_links','Related Links','my $db_name = $S->{CONFIG}->{db_name};\r\nmy $sid = $S->{CGI}->param(\'sid\');\r\nmy $f_sid = $S->{DBH}->quote($sid);\r\nmy $archive = $S->_check_archivestatus($sid);\r\n\r\nmy ($rv, $sth) = $S->db_select({\r\n ARCHIVE => $archive,\r\n WHAT => \'introtext, bodytext, aid, section, tid, u.nickname AS nick\',\r\n FROM => \"stories s LEFT JOIN $db_name.users u ON s.aid = u.uid\",\r\n WHERE => qq|sid = $f_sid|});\r\n\r\nmy $data = $sth->fetchrow_hashref;\r\n$sth->finish;\r\n\r\nmy $text = $data->{introtext}.\' \'.$data->{bodytext};\r\n\r\n$data->{nick} = $S->{UI}->{VARS}->{anon_user_nick} if $data->{aid} == -1;\r\nmy @link_arr;\r\n\r\n$text =~ s/<a.*?href.*?>/1/gi;  # remove links from autorelated search\r\n\r\nmy @first_related = split /\\n/, $S->{UI}->{VARS}->{autorelated};\r\nmy (%related, $word, $url, %wordcount);\r\n\r\nforeach my $rel (@first_related) {\r\n ($word, $url) = split /\\s*,\\s*/, $rel;\r\n $url =~ s/\\r//;\r\n $related{$word} = qq|<A CLASS=\"light\" HREF=\"$url\">|;\r\n $wordcount{$word} ++;\r\n}\r\n\r\nforeach $word (keys %related) {\r\n if ($text =~ /$word/gi) {\r\n  push @link_arr, $word, $related{$word};\r\n }\r\n}\r\n\r\n$text = $data->{introtext}.\' \'.$data->{bodytext};\r\n\r\nwhile ( $text =~ /(<a href.*?>)(.*?)<\\/a>/gis ) {\r\n my $start = $1;\r\n my $word = $2;\r\n $start =~ s/<A( HREF.*?)/<A CLASS=\"light\"$1/i;\r\n $word =~ s/<.*?>//g;  # remove tags from word\r\n $word =~ s/^(\\S{10})(.*)/$1 $2/;\r\n $word =~ s/&/&amp;/g;\r\n $word =~ s/\"/\"/g;\r\n if ( !($related{$word} =~ /$start/i) ) {\r\n  $wordcount{$word} ++;\r\n  $related{$word} .= $start;\r\n  if ($wordcount{$word} > 1) {\r\n    $word .= \" [$wordcount{$word}]\";\r\n  }\r\n  push @link_arr, $word, qq|$start|;\r\n }\r\n}\r\n\r\nmy $auth_urlenc = $data->{nick};\r\n$auth_urlenc =~ s/\\s/%20/g;\r\n\r\nif ($data->{\'section\'} eq \'Diary\') {\r\n push @link_arr, \"$data->{nick}\'s Diary\", qq(<A CLASS=\"light\" HREF=\"%%rootdir%%/user/$auth_urlenc/diary\">); \r\n} else {\r\n my $t = $S->get_topic($data->{\'tid\'});\r\n push @link_arr, \"More on $t->{alttext}\", qq(<A CLASS=\"light\" HREF=\"%%rootdir%%/?op=search;topic=$data->{tid}\">) if $S->{UI}->{VARS}->{use_topics};\r\n push @link_arr, \"Also by $data->{nick}\", qq(<A CLASS=\"light\" HREF=\"%%rootdir%%/search/author/$auth_urlenc\">);\r\n}\r\n\r\n\r\nmy $content;\r\nmy $i = 0;\r\nwhile ($i <= $#link_arr) {\r\n  $content .= qq(%%dot%% $link_arr[$i+1]$link_arr[$i]</A><BR>\\n);\r\n  $i += 2;\r\n}\r\n\r\nreturn {content => $content };\r\n\r\n','The Related links box which appears with stories','box',0);
INSERT INTO `box` VALUES ('css','css','my $content;\r\n\r\nmy $file = $S->cgi->param(\'file\');\r\nmy $block = $file.\"_css\";\r\n\r\n$content = $S->{UI}->{BLOCKS}->{$block};\r\n$S->apache->content_type(\'text/css\');\r\n\r\nreturn {content => $content};','Returns a block with type text/css','empty_box',0);
INSERT INTO `box` VALUES ('admin_search','Search Admin Tools','# search terms?\r\nmy $query = $S->cgi->param(\'query\');\r\n\r\n# search where?\r\n# extract the chosen search locations\r\nmy $search_param = $S->cgi->param(\'search_in\');\r\nmy %search_in;\r\nmy $searches_selected = 0;\r\nforeach (ref($search_param) eq \'ARRAY\' ? @{$search_param} : ($search_param)) {\r\n	next unless $_;\r\n	$search_in{$_} = 1;\r\n	$searches_selected++;\r\n}\r\n\r\n# if they didn\'t select any searches, or this is a fresh load, then select all\r\nunless ($searches_selected) {\r\n	foreach (qw(blockval blockdesc boxval boxdesc specval vardesc)) {\r\n		$search_in{$_} = 1;\r\n	}\r\n}\r\n\r\nmy ($blockval, $blockdesc, $boxval, $boxdesc, $specval, $vardesc) = \"\";\r\nmy ($blocksearchwhere, $boxsearchwhere, $specsearchwhere, $varsearchwhere) = \"\";\r\nmy ($type_phrase, $type_any, $type_all) = \"\";\r\n\r\n# remember what was previously selected. yes, this is kind of ugly\r\n$blockval  = \' selected=\"selected\"\' if $search_in{blockval};\r\n$blockdesc = \' selected=\"selected\"\' if $search_in{blockdesc};\r\n$boxval    = \' selected=\"selected\"\' if $search_in{boxval};\r\n$boxdesc   = \' selected=\"selected\"\' if $search_in{boxdesc};\r\n$specval   = \' selected=\"selected\"\' if $search_in{specval};\r\n$vardesc   = \' selected=\"selected\"\' if $search_in{vardesc};\r\n\r\n# same thing for search type, though set a default of all\r\nif ($S->cgi->param(\'search_type\') eq \'phrase\') {\r\n	$type_phrase = \' checked=\"checked\"\';\r\n} elsif($S->cgi->param(\'search_type\') eq \'all\') {\r\n	$type_all = \' checked=\"checked\"\';\r\n} elsif($S->cgi->param(\'search_type\') eq \'any\') {\r\n	$type_any = \' checked=\"checked\"\';\r\n} else {\r\n	$type_all = \' checked=\"checked\"\';\r\n}\r\n\r\n# set up search fields\r\nmy $search_for_field = qq{<input type=\"text\" name=\"query\" value=\"$query\" /><input type=\"submit\" value=\"Search\" />};\r\n\r\nmy $search_in_field = \'<select name=\"search_in\" multiple=\"multiple\" size=\"6\">\';\r\n$search_in_field .= qq{\r\n	<option value=\"blockval\"$blockval>Block values</option>\r\n	<option value=\"blockdesc\"$blockdesc>Block descriptions</option>} if $S->have_perm(\'edit_blocks\');\r\n\r\n$search_in_field .= qq{\r\n	<option value=\"boxval\"$boxval>Box code</option>\r\n	<option value=\"boxdesc\"$boxdesc>Box descriptions</option>} if $S->have_perm(\'edit_boxes\');\r\n\r\n$search_in_field .= qq{\r\n	<option value=\"specval\"$specval>Special Pages</option>} if $S->have_perm(\'edit_special\');\r\n\r\n$search_in_field .= qq{\r\n	<option value=\"vardesc\"$vardesc>Site Controls descriptions</option>} if $S->have_perm(\'edit_vars\');\r\n\r\n$search_in_field .= \"\\n</select>\";\r\n\r\nmy $search_opt_field = qq{<input type=\"radio\" name=\"search_type\" value=\"all\"$type_all /> All words<br />\r\n<input type=\"radio\" name=\"search_type\" value=\"any\"$type_any /> Any words<br />\r\n<input type=\"radio\" name=\"search_type\" value=\"phrase\"$type_phrase /> Phrase};\r\n\r\nmy $content .= qq{\r\n<form method=\"get\" action=\"%%rootdir%%/admin/search\">\r\n<table border=\"0\">\r\n	<tr>\r\n		<td valign=\"top\" rowspan=\"2\">%%norm_font%%Search in:<br />$search_in_field%%norm_font_end%%</td>\r\n		<td>%%norm_font%%Search for:<br />$search_for_field%%norm_font_end%%</td>\r\n	</tr>\r\n	<tr>\r\n		<td>%%norm_font%%$search_opt_field%%norm_font_end%%</td>\r\n	</tr>\r\n</table>\r\n</form>\r\n   };\r\n\r\nif ($query) {\r\n	my ($blockresults, $boxresults, $specresults, $varresults) = (\"\",\"\",\"\",\"\");\r\n\r\n	# of the three column names which might be needed, these are used\r\n	# repeatedly, so stick them in a var instead of re-building them\r\n	my $content_string = &search_string($S, $query, \'content\');\r\n	my $desc_string    = &search_string($S, $query, \'description\');\r\n\r\n	$blocksearchwhere .= &search_string($S, $query, \'block\') if ($blockval);\r\n	$blocksearchwhere .= \' OR \' if ($blockdesc && $blockval);\r\n	$blocksearchwhere .= $desc_string if ($blockdesc);\r\n	$boxsearchwhere   .= $content_string if ($boxval);\r\n	$boxsearchwhere   .= \' OR \' if ($boxdesc && $boxval);\r\n	$boxsearchwhere   .= $desc_string if ($boxdesc);\r\n	$specsearchwhere  .= $content_string if ($specval);\r\n	$varsearchwhere   .= $desc_string if ($vardesc);\r\n\r\n	if ($blocksearchwhere && $S->have_perm(\'edit_blocks\')) {\r\n		my ($rv, $sth) = $S->db_select({\r\n			WHAT  => \'bid,description,theme\',\r\n			FROM  => \'blocks\',\r\n			WHERE => $blocksearchwhere\r\n		});\r\n		while (my $rec = $sth->fetchrow_hashref) {\r\n			my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n			$blockresults .= qq{\r\n	<dt><a href=\"%%rootdir%%/admin/blocks/edit/$rec->{theme}/$rec->{bid}\">$rec->{bid}</a></dt>\r\n	<dd>$desc</dd>}\r\n		}\r\n		$blockresults = \"<dl> $blockresults </dl>\" if $blockresults;\r\n	}\r\n\r\n	if ($boxsearchwhere && $S->have_perm(\'edit_boxes\')) {\r\n		my ($rv, $sth) = $S->db_select({\r\n			WHAT  => \'boxid, description\',\r\n			FROM  => \'box\',\r\n			WHERE => $boxsearchwhere\r\n		});\r\n		while (my $rec = $sth->fetchrow_hashref) {\r\n			my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n			$boxresults .= qq{\r\n	<dt><a href=\"%%rootdir%%/admin/boxes/$rec->{boxid}\">$rec->{boxid}</a></dt>\r\n	<dd>$desc</dd>}\r\n		}\r\n		$boxresults = \"<dl> $boxresults </dl>\" if $boxresults;\r\n	}\r\n\r\n	if ($specsearchwhere && $S->have_perm(\'edit_special\')) {\r\n		my ($rv, $sth) = $S->db_select({\r\n			WHAT => \'pageid,title,description\',\r\n			FROM => \'special\',\r\n			WHERE => $specsearchwhere\r\n		});\r\n		while (my $rec = $sth->fetchrow_hashref) {\r\n			my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n			$specresults .= qq{\r\n	<dt><a href=\"%%rootdir%%/admin/special?id=$rec->{pageid}\">$rec->{title}</a></dt>\r\n	<dd>$desc</dd>}\r\n		}\r\n		$specresults = \"<dl> $specresults </dl>\" if $specresults;\r\n	}\r\n\r\n	if ($varsearchwhere && $S->have_perm(\'edit_vars\')) {\r\n		my ($rv, $sth) = $S->db_select({\r\n			WHAT => \'name,description\',\r\n			FROM => \'vars\',\r\n			WHERE => $varsearchwhere\r\n		});\r\n		while (my $rec = $sth->fetchrow_hashref) {\r\n			my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n			$varresults .= qq{\r\n	<dt><a href=\"%%rootdir%%/admin/vars/edit/$rec->{name}\">$rec->{name}</a></dt>\r\n	<dd>$desc</dd>}\r\n		}\r\n		$varresults = \"<dl> $varresults </dl>\" if $varresults;\r\n	}\r\n\r\n	$content .= \"<H3>Blocks found:</H3>\\n%%norm_font%%$blockresults%%norm_font_end%%\" if $blockresults;\r\n	$content .= \"<H3>Boxes found:</H3>\\n%%norm_font%%$boxresults%%norm_font_end%%\" if $boxresults;\r\n	$content .= \"<H3>Special Pages found:</H3>\\n%%norm_font%%$specresults%%norm_font_end%%\" if $specresults;\r\n	$content .= \"<H3>Site Controls found:</H3>\\n%%norm_font%%$varresults%%norm_font_end%%\" if $varresults;\r\n	unless ($varresults || $blockresults || $boxresults || $specresults) {\r\n		$content .= \"%%norm_font%%Nothing matching your search phrase was found in the selected tools.%%norm_font_end%%\";\r\n	}\r\n}\r\n\r\n$content = \"<table width=\\\"100%\\\">\r\n	<tr width=\\\"100%\\\" bgcolor=\\\"%%title_bgcolor%%\\\"><td>%%title_font%%Search Admin Tools%%title_font_end%%</td></tr>\r\n	<tr><td>$content</td></tr>\r\n</table>\";\r\n\r\nreturn $content;\r\n\r\nsub search_string {\r\n	my ($S, $query, $field) = @_;\r\n\r\n	my $search_string;\r\n	if ($S->cgi->param(\'search_type\') eq \'phrase\') {\r\n		# easy enough\r\n		$search_string = \"$field LIKE \" . $S->dbh->quote(\"%${query}%\");\r\n	} else {\r\n		while ($query =~ /([\\w-]+)/g) {\r\n			if ($search_string) {\r\n				$search_string .= \' AND \'\r\n					if $S->cgi->param(\'search_type\') eq \'all\';\r\n				$search_string .= \' OR \'\r\n					if $S->cgi->param(\'search_type\') eq \'any\';\r\n			}\r\n			$search_string .= \"$field LIKE \" . $S->dbh->quote(\"%${1}%\");\r\n		}\r\n	}\r\n\r\n	return \"($search_string)\";\r\n}\r\n','Simple admin search tool for locating blocks by content or description. This is called from the admin tools menu.','blank_box',0);
INSERT INTO `box` VALUES ('pref_selectbox','','my $prefname = shift @ARGS;\r\nmy $choice = shift @ARGS;\r\nmy @choices = @ARGS;\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"$prefname\" size=\"1\">};\r\n\r\nforeach my $c (@choices) {\r\n  my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$c\"$checked>$c</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','Generic select box for user preferences. takes parameters name,value,option1,option2,...\r\nNot suitable for select boxes with code-generated option lists.','empty_box',0);
INSERT INTO `box` VALUES ('pref_checkbox','','my $prefname = $ARGS[0];\r\nmy $choice = $ARGS[1];\r\n\r\nmy $selected = ($choice eq \'on\') ? \' CHECKED\' : \'\';\r\n\r\nreturn qq{<INPUT type=\"checkbox\" name=\"$prefname\" value=\"on\"$selected>};','a generic checkbox. Takes two arguments, the pref name and the current pref value.','empty_box',0);
INSERT INTO `box` VALUES ('time_zone_pref','','my %zones = $S->_timezone_hash();\r\nmy $S_zone = $ARGS[0];\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"time_zone\" size=\"1\">};\r\n\r\nforeach my $zone (sort keys %zones) {\r\n  my $z = uc($zone);\r\n  my $selected = \'\';\r\n  if ($z eq $S_zone) {\r\n    $selected = \' SELECTED\';\r\n  }\r\n  $select .= qq{\r\n         <OPTION value=\"$z\"$selected>[$z] $zones{$zone}</OPTION>};\r\n}\r\n\r\n$select .= \"\r\n      </SELECT>\";\r\n\r\nreturn $select;','timezone selectbox','empty_box',0);
INSERT INTO `box` VALUES ('startpage_pref','','my $choice = $ARGS[0];\r\n\r\nmy @choices = sort keys %{ $S->{SECTION_DATA} };\r\nunshift(@choices, \'__main__\', \'__all__\');\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"start_page\" size=\"1\"};\r\n\r\nforeach my $c (@choices) {\r\n  my $name;\r\n  if ( $c eq \'__main__\' ) {\r\n    $name = \'Front Page\';\r\n  } elsif ( $c eq \'__all__\' ) {\r\n    $name = \'Everything\';\r\n  } else {\r\n    $name = $S->{SECTION_DATA}->{$c}->{title};\r\n  }\r\n  my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$c\"$checked>$name</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('img_server_pref','','my $current = $ARGS[0];\r\n\r\nreturn unless $S->var(\'image_mirrors\');\r\nmy @mirrors = split /\\n/, $S->var(\'image_mirrors\');\r\nmy $default_imgdir = $S->{PREF_ITEMS}->{imagedir}->{default_value};\r\n\r\nmy (%servers, $name, $url);\r\n\r\nforeach my $server (@mirrors) {\r\n ($name, $url) = split /,/, $server;\r\n $url =~ s/\\r//;\r\n $servers{$name} = $url;\r\n}\r\n\r\nmy $selected = ( $current eq $default_imgdir ) ? \' SELECTED\' : \'\';\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"imagedir\" size=\"1\">\r\n        <OPTION value=\"$default_imgdir\"$selected>Default</OPTION>};\r\n\r\nforeach my $server (sort keys %servers) {\r\n  $selected = ( $current eq $servers{$server} ) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n         <OPTION value=\"$servers{$server}\"$selected>$server</A>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('user_theme_pref','','my $choice = $ARGS[0];\r\nmy $themes = $S->{UI}->{VARS}->{user_themes};\r\nmy @themes = split ( /,\\s*/, $themes );\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"theme\">};\r\n\r\nunless ( $S->{PREF_ITEMS}->{theme}->{default_value} ) {\r\n  my $checked = ($choice eq \'\') ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"\"$checked>none</OPTION>};\r\n}\r\n\r\nforeach my $t (@themes) {\r\n  my $checked = ($t eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$t\"$checked>$t</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('box_pref','','my @choice = @ARGS;\r\n\r\nmy %boxes = %{$S->{BOX_DATA}};\r\nmy $current_prefs;\r\nmy $return = \'\';\r\n\r\n# convert the comma-separated list into a hash\r\nforeach my $i (@choice) {\r\n  $current_prefs->{$i} = 1;\r\n}\r\n\r\nmy $col = 0;\r\n\r\nforeach my $c (keys %boxes) {\r\n  next unless $boxes{$c}->{user_choose};\r\n  $return .= qq{\r\n    <TR>} unless $col;\r\n  my $checked = $current_prefs->{$c} ? \" CHECKED\" : \"\";\r\n  $return .= qq{\r\n      <TD><input type=\"checkbox\" name=\"displayed_boxes\" value=\"$c\"$checked /></TD>\r\n      <TD>$boxes{$c}->{title}</TD>};\r\n  $return .= qq{\r\n    </TR>} if $col;\r\n  $col = ($col) ? \"0\" : \"1\";\r\n}\r\n\r\n$return .= \"<TD></TD><TD></TD></TR>\" if $col;\r\n\r\n$return = qq{\r\n<TABLE border=\"0\">\r\n$return\r\n</TABLE>};\r\n\r\nreturn $return;','','empty_box',0);
INSERT INTO `box` VALUES ('rdf_pref','','my @choice = @ARGS;\r\n\r\nmy $channels = $S->rdf_channels();\r\nmy $current_prefs;\r\nmy $return = \'\';\r\n\r\n# convert the comma-separated list into a hash\r\nforeach my $i (@choice) {\r\n  $current_prefs->{$i} = 1;\r\n}\r\n\r\nmy $col = 0;\r\n\r\nforeach my $c (@{$channels}) {\r\n  $return .= qq{\r\n    <TR>} unless $col;\r\n  next unless $c->{enabled} && $c->{title} && !$c->{submitted};\r\n  my $checked = $current_prefs->{$c->{rid}} ? \" CHECKED\" : \"\";\r\n  $return .= qq{\r\n      <TD><input type=\"checkbox\" name=\"rdf_feeds\" value=\"$c->{rid}\"$checked /></TD>\r\n      <TD><a href=\"%%rootdir%%/special/rdf_preview/?rdf=$c->{rid}\">$c->{title}</a></TD>};\r\n  $return .= qq{\r\n    </TR>} if $col;\r\n  $col = ($col) ? \"0\" : \"1\";\r\n}\r\n\r\n$return .= \"<TD></TD><TD></TD></TR>\" if $col;\r\n\r\n$return = qq{\r\n<TABLE border=\"0\">\r\n$return\r\n</TABLE>};\r\n\r\nreturn $return;','','empty_box',0);
INSERT INTO `box` VALUES ('rating_order_pref','','my $choice = $ARGS[0];\r\n\r\nmy %choices = ( \"unrate_highest\", \"Unrated, then Highest\", \"highest\", \"Highest rated first\", \"lowest\", \"Lowest rated first\", \"dontcare\", \"Ignore ratings\" );\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"commentrating\" size=\"1\">};\r\n\r\nforeach my $c (keys %choices) {\r\n  my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$c\"$checked>$choices{$c}</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('postmode_pref','','my $choice = $ARGS[0];\r\n\r\nmy %choices = ( \"text\", \"Plain Text\", \"html\", \"HTML Formatted\", \"auto\", \"Autoformat\" );\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"posttype\" size=\"1\">};\r\n\r\nforeach my $c (keys %choices) {\r\n  my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$c\"$checked>$choices{$c}</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('show_hidden_pref','','my $current = $ARGS[0];\r\n\r\nmy $choices = {\r\n    \'yes\' => \'Yes\',\r\n    \'no\' => \'No\',\r\n    \'untilrating\' => \"Show until I\'ve rated\"\r\n};\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"hidingchoice\" size=\"1\">};\r\n\r\nforeach my $choice (keys %{$choices}) {\r\n    my $selected = $choice eq $current ? \' SELECTED\' : \'\';\r\n    $select .= qq{\r\n        <OPTION value=\"$choice\"$selected>$choices->{$choice}</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('user_group_box','','my ($curr_id) = $ARGS[0];\r\n\r\nmy ($rv, $sth) = $S->db_select({\r\n  WHAT => \'perm_group_id\',\r\n  FROM => \'perm_groups\',\r\n  DEBUG => 0});\r\n\r\nmy $selector = qq{\r\n<SELECT NAME=\"perm_group_id\" SIZE=1>};\r\n\r\nmy $selected = \'\';\r\n\r\nwhile (my $group = $sth->fetchrow()) {\r\n  $selected = \'\';\r\n  $selected = \" SELECTED\" if ($group eq $curr_id);\r\n  $selector .= qq{\r\n  <OPTION VALUE=\"$group\"$selected>$group};\r\n}\r\n\r\n$selector .= \"</SELECT>\";\r\n\r\nreturn $selector;\r\n','','empty_box',0);
INSERT INTO `box` VALUES ('subscriber','','return unless ($S->{UID} == $S->param->{uid});\r\nreturn unless ($S->have_perm(\'allow_subscription\'));\r\nreturn unless ($S->{UI}->{VARS}->{use_subscriptions});\r\n\r\nmy $user = $S->user_data($S->{UID});\r\n\r\nwarn \"(subscriber) active subscription? $user->{sub}->{active}\";\r\n\r\nif ( $user->{sub}->{active} ) {\r\n  my $expires = $user->{sub}->{expires};\r\n  my $now = time;\r\n  my $remaining_days = (int((($expires - $now) / 86400)) + 1);\r\n  return qq{Thank you for subscribing. Your subscription expires in $remaining_days days};\r\n} else {\r\n  return qq{\r\n<P>You are not currently a subscriber. Why not <A href=\"%%rootdir%%/subscribe\">become one</A>?};\r\n}','','empty_box',0);
INSERT INTO `box` VALUES ('commentmode_overflow_pref','','my $choice = $ARGS[0];\r\n\r\nmy %choices = ( \"minimal\", \"Minimal\", \"threaded\", \"Threaded\", \"nested\", \"Nested\", \"flat\", \"Flat\", \"flat_unthread\", \"Flat (unthread)\" );\r\n\r\nif ( $S->var(\'allow_dynamic_comment_mode\') && $S->pref(\'dynamic_interface\') eq \'on\' ) {\r\n  $choices{\'dminimal\'} = \"Dynamic Minimal\";\r\n  $choices{\'dthreaded\'} = \"Dynamic Threaded\";\r\n} else {\r\n  $choice =~ s/^d//;\r\n}\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"commentmode_overflow\" size=\"1\">};\r\n\r\nforeach my $c (sort keys %choices) {\r\n  my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$c\"$checked>$choices{$c}</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('commentmode_pref','','my $choice = $ARGS[0];\r\n\r\nmy %choices = ( \"use_overflow\", \"Always use overflow mode\", \"minimal\", \"Minimal\", \"threaded\", \"Threaded\", \"nested\", \"Nested\", \"flat\", \"Flat\", \"flat_unthread\", \"Flat (unthreaded)\" );\r\n\r\nif ( $S->var(\'allow_dynamic_comment_mode\') && $S->pref(\'dynamic_interface\') eq \'on\' ) {\r\n  $choices{\'dminimal\'} = \"Dynamic Minimal\";\r\n  $choices{\'dthreaded\'} = \"Dynamic Threaded\";\r\n} else {\r\n  $choice =~ s/^d//;\r\n}\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"commentmode\" size=\"1\">};\r\n\r\nforeach my $c (sort keys %choices) {\r\n  my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$c\"$checked>$choices{$c}</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('cookie_expire_pref','','my $choice = $ARGS[0];\r\n\r\nmy %choices = ( \"3600\", \"1 hour\", \"86400\", \"1 day\", \"604800\", \"1 week\", \"1209600\", \"2 weeks\", \"2592000\", \"1 month (30 days)\", \"5184000\", \"2 months\" );\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"cookie_expire\" size=\"1\">};\r\n\r\nforeach my $c (sort {$a <=> $b} keys %choices) {\r\n  my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$c\"$checked>$choices{$c}</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','','empty_box',0);
INSERT INTO `box` VALUES ('startpage_validation','','if ( $S->{SECTION_DATA}->{$ARGS[1]} || $ARGS[1] eq \'__main__\' || $ARGS[1] eq \'__all__\' ) {\r\n  return \'\';\r\n} else {\r\n  return \"Start Page not valid<BR>\";\r\n}','validates the start page pref','empty_box',0);
INSERT INTO `box` VALUES ('cal_day_select','','my $day = $ARGS[0];\nmy $select;\n\n$select = qq{<OPTION value=\"00\">DD</OPTION>\n};\nforeach (1..31) {\n  my $selected = ( $day == $_ ) ? \' SELECTED\' : \'\';\n  $select .= qq{<OPTION value=\"$_\"$selected>$_</OPTION>\n};\n}\n\nreturn $select;','The options in a selectbox for a day field. Does not include the <SELECT> tags, only the <OPTION> tags.','empty_box',0);
INSERT INTO `box` VALUES ('cal_month_select','','my $month = $ARGS[0];\nmy $select;\n\n$select = qq{<OPTION value=\"00\">MM</OPTION>\n};\nforeach (1..12) {\n  my $selected = ( $month == $_ ) ? \' SELECTED\' : \'\';\n  $select .= qq{<OPTION value=\"$_\"$selected>$_</OPTION>\n};\n}\n\nreturn $select;','The options in a selectbox for a month field. Does not include the <SELECT> tags, only the <OPTION> tags.','empty_box',0);
INSERT INTO `box` VALUES ('cal_year_select','','my $year = $ARGS[0];\nmy $select;\n\n$select = qq{<OPTION value=\"0000\">YYYY</OPTION>\n};\nforeach (2004..2014) {\n  my $selected = ( $year == $_ ) ? \' SELECTED\' : \'\';\n  $select .= qq{<OPTION value=\"$_\"$selected>$_</OPTION>\n};\n}\n\nreturn $select;','The options in a selectbox for a year field. Does not include the <SELECT> tags, only the <OPTION> tags.','empty_box',0);
INSERT INTO `box` VALUES ('calendar_actions','','my ($sub_link, $content, $newevent, $modevents, $edit_cal);\r\nmy $cal_id = $S->cgi->param(\'calendar\');\r\n\r\nif ( $cal_id ) {\r\n  # viewing a particular calendar\r\n  if ($S->have_calendar_perm(\'edit\',$cal_id)) {\r\n    $edit_cal = qq{<A href=\"%%rootdir%%/editcalendar/settings/$cal_id\">Edit this calendar</A>};\r\n  }\r\n  if ($S->have_calendar_perm(\'submit\',$cal_id)) {\r\n    $newevent = qq{<A href=\"%%rootdir%%/submitevent/submit/$cal_id\">Submit new event</A>};\r\n  }\r\n  if ( $S->have_calendar_perm(\'moderate\',$cal_id) ) {\r\n    $modevents = qq{<A href=\"%%rootdir%%/editcalendar/moderate/$cal_id\">Moderate submitted events</A>};\r\n  }  \r\n} elsif ($S->have_perm(\'edit_own_calendar\')) {\r\n  # personal calendar view\r\n  $edit_cal = qq{<A href=\"%%rootdir%%/editcalendar\">Edit your calendar</A>} if $S->var(\'allow_user_calendars\');\r\n  my $cals = $S->_cal_submit_list();\r\n  my $use_submit = 0;\r\n  foreach ( @$cals ) {\r\n    if ( $S->pref(\"calendar_${_}_subscribe\") ) {\r\n      $use_submit = 1;\r\n      next;\r\n    }\r\n  }\r\n  if ( $use_submit ) {\r\n    $newevent = qq{<A href=\"%%rootdir%%/submitevent/submit\">Submit new event</A>};\r\n  }\r\n}\r\n\r\nmy @list;\r\nfor ($newevent, $modevents, $edit_cal, $sub_link) {\r\n	push @list, $_ if ($_);\r\n}\r\nmy $list = join(\' :: \', @list);\r\n$content = qq{\r\n<DIV class=\"cal_actions\">\r\n$list\r\n</DIV>};\r\n\r\nreturn $content;\r\n','Links to the various things you can do to/with a calendar','empty_box',0);
INSERT INTO `box` VALUES ('calendar_selectbox','','my $cals = $S->_cal_submit_list();\nmy $tool = $S->cgi->param(\'tool\') || \'submit\';\nmy $id = $S->cgi->param(\'id\');\nmy ($current,$selected);\n\nif (  $tool eq \'edit\' || $tool eq \'invite\' || ($tool eq \'submit\' && $S->cgi->param(\'newchild\')) ) {\n  my $event = $S->get_event($id);\n  $current = $S->cgi->param(\'cal_id\') || $event->{cal_id};\n} else {\n  $current = $S->cgi->param(\'cal_id\') || $id;\n}\n\nmy $content = qq{\n      <SELECT name=\"cal_id\" size=\"1\">\n        <OPTION value=\"\">Select a calendar</OPTION>};\nforeach ( @$cals ) {\n  my $cal = $S->get_calendar($_);\n  $selected = ($current == $cal->{cal_id}) ? \' SELECTED\' : \'\';\n  $content .= qq|\n        <OPTION value=\"$cal->{cal_id}\"$selected>$cal->{title}</OPTION>|;\n}\n$content .= qq{\n      </SELECT>};\nreturn $content;','selects the calendar an event is submitted to. Selectbox with all of the calendars a use has permission to submit events ','empty_box',0);
INSERT INTO `box` VALUES ('event','','return if $S->cgi->param(\'op\') eq \'event\';\n\nmy $sid = $ARGS[0];\nmy $q_sid = $S->dbh->quote($sid);\n\nmy ($rv,$sth) = $S->db_select({\n   DEBUG => 1,\n   WHAT => \'eid\',\n   FROM => \'event_story\',\n   WHERE => qq{sid = $q_sid}\n});\n\nreturn if ( $rv == 0 );\n\nmy ($eid) = $sth->fetchrow_array();\nmy $event = $S->get_event($eid);\n\nmy $link = $S->{UI}->{BLOCKS}->{story_event_link};\nreturn $S->interpolate($link,$event);','displays the link to the event, if the story is associated with an event','empty_box',0);
INSERT INTO `box` VALUES ('event_calendar_invitations','','my $hook = $ARGS[0];\nmy $uid = $ARGS[1];\nmy $pref = $ARGS[2];\nmy $value = $ARGS[3];\n\nif ( $pref =~ /event_(.*)_invite/ && $value eq \'on\' ) {\n  $S->_invite_notify(\'event\',$1,$uid);\n} elsif ( $pref =~ /calendar_(.*)_invite/ && $value eq \'on\' ) {\n  $S->_invite_notify(\'calendar\',$1,$uid);\n}\n\n# not either of those, so don\'t do anything','handles notification of invitation for calendars and events (tied to pref_change hook)','empty_box',0);
INSERT INTO `box` VALUES ('event_invitations','New Invitations','my $content;\n\nmy ($rv,$sth) = $S->db_select({\n   WHAT => \'eid\',\n   FROM => \'event_watch\',\n   WHERE => qq@uid = $S->{UID} AND last_viewed = 0@\n});\n\nwhile ( my ($eid) = $sth->fetchrow_array() ) {\n  my $event = $S->get_event($eid);\n  $content .= qq@%%dot%% <A href=\"%%rootdir%%/event/$eid\">$event->{title}</A><BR>@;\n}\n\nreturn $content;','Shows a list of events to which the user is invited if they haven\'t yet followed the link','box',0);
INSERT INTO `box` VALUES ('event_notify','Event Updates','my $content;\nmy ($rv,$sth) = $S->db_select({\n  WHAT => \'*\',\n  FROM => \'event_watch LEFT JOIN events USING (eid)\',\n  WHERE => \"uid=$S->{UID} AND subscribed=1\"\n});\n\nwhile ( my $item = $sth->fetchrow_hashref() ) {\n  next unless ( $item->{last_update} > $item->{last_viewed} );\n  my $event = $S->get_event($item->{eid});\n  $content .= qq@%%dot%% <A href=\"%%rootdir%%/event/$item->{eid}\">$event->{title}</A><BR>@;\n}\n\nreturn $content;','a disappearing/reappearing box that notifies users if an event that they\'ve subscribed to has been changed since they last saw it.','box',0);
INSERT INTO `box` VALUES ('event_stories','','my $eid = $S->cgi->param(\'eid\');\nmy $event = $S->get_event($eid);\nmy $page;\n\nif ( $event->{is_parent} ) {\n  # get the stories for all the child events too\n  my @eids = ($eid);\n  my ($rv,$sth) = $S->db_select({\n       DEBUG => 1,\n       WHAT => \'eid\',\n       FROM => \'events\',\n       WHERE => \"parent = $eid\"\n  });\n  while ( my ($e) = $sth->fetchrow_array() ) {\n    push @eids, $e;\n  }\n  my $sql_eids = join(\',\',map {$S->dbh->quote($_)} @eids );\n  $page = $S->frontpage_view(\'summaries\', \"eid IN ($sql_eids)\", \'left join event_story e on s.sid = e.sid\');\n} else {\n  # get only the stories for this one event\n  $page = $S->frontpage_view(\'summaries\', \"eid = $eid\", \'left join event_story e on s.sid = e.sid\');\n}\n\nreturn $page;','displays the formatted stories attached to this event','empty_box',0);
INSERT INTO `box` VALUES ('mini_calendar','Events','return unless $S->var(\'use_calendars\');\n\nmy @today = $S->time_localize_array(Date::Calc::Today_and_Now(),1);\nmy $keys;\nmy $cal = $S->{UI}->{BLOCKS}->{calendar_body_monthly_mini};\nmy ($cal_ids,$view_cals);\nmy ($day_link,$day_link_end);\n\nif ( $S->var(\'allow_personal_calendar_view\') ) {\n  $cal_ids = $S->_personal_calendar_list($S->{UID});\n}\nif ( !$cal_ids ) {\n  $cal_ids->[0] = $S->var(\'default_calendar_id\');\n}\n$view_cals = $S->_calendar_can_view($cal_ids);\nreturn unless $view_cals;\n\n$S->_get_months_events($today[0],$today[1],$view_cals);\n\n# properly blank out the structure, so unused \n# calendar squares don\'t collapse\nforeach my $a (1..7) {\n  foreach my $b (1..5) {\n    $keys->{\"wk${b}_d$a\"} = \'<TD>&nbsp;</TD>\';\n  }\n}\n\n# fill in the basic keys\n$keys->{month} = Date::Calc::Month_to_Text($today[1]);\n$keys->{year} = $today[0];\n\n# now the keys for each day\nmy $i = 0;\nmy @date = @today;\nmy ($dow,$wom);\nwhile ( $i++ < Date::Calc::Days_in_Month($today[0],$today[1]) ) {\n  $dow = Date::Calc::Day_of_Week($today[0],$today[1],$i);\n  $wom = int(($i + Date::Calc::Day_of_Week($today[0],$today[1],1) - 2) /7)+1;\n  my $hilight = ($i == $today[2]) ? \' id=\"today\"\' : \'\';\n  $date[2] = $i;\n\n  my $eventlist = $S->_get_days_events(@date[0,1,2],$view_cals) if $view_cals;\n  if ( $eventlist ) {\n    $day_link_end = \'</A>\';\n    if ( @$eventlist > 1 ) {\n      $day_link = qq{<A href=\"%%rootdir%%/calendar/daily/0/$date[0]-$date[1]-$date[2]\">};\n    } else {\n      $day_link = qq{<A href=\"%%rootdir%%/event/$eventlist->[0]\">};\n    }\n  } else {\n    $day_link = \'\';\n    $day_link_end = \'\';\n  }\n\n  $keys->{\"wk${wom}_d$dow\"} = qq{<TD$hilight>$day_link$i$day_link_end</TD>};\n}\n\nreturn $S->interpolate($cal,$keys);','','box',0);
INSERT INTO `box` VALUES ('num_results','','my $num = $S->cgi->param(\'count\') || 30;\nmy $out;\n$out = qq{\n   <SELECT name=\"count\" size=\"1\">};\n\nforeach ( (10,20,30,50) ) {\n   my $selected = ( $_ == $num ) ? \' SELECTED\' : \'\';\n   $out .= qq{\n     <OPTION value=\"$_\"$selected>$_</OPTION>};\n}\n$out .= qq{\n   </SELECT>};\n\nreturn $out;','number of results for search form','empty_box',0);
INSERT INTO `box` VALUES ('calendar_datenav','','my $content = \'\';\r\nmy $view = $S->cgi->param(\'view\') || $S->pref(\'calendar_view\');\r\nmy @date = $S->_get_date_array($S->cgi->param(\'date\'));\r\nmy $nav_items = $S->_calendar_date_navigation($view,@date);\r\n\r\nmy $prefix = \'&lt;&lt; \';\r\nmy $suffix = \'\';\r\nmy $stage = \'before\';\r\n\r\nforeach my $item (@$nav_items) {\r\n  warn \"Item is $item->{link_url}\\n\";\r\n  my $keys = {}; # keys for interpolation\r\n  my $string = $S->{UI}->{BLOCKS}->{calendar_navigation_item};\r\n  $keys->{link_url} = $item->{link_url};\r\n\r\n  #link text\r\n  my $text;\r\n  if ( $view eq \'monthly\' ) {\r\n    my $year = $date[0];\r\n	$year -= 1 if ($item->{date_array}->[1] > $date[1] && $stage eq \'before\');\r\n	$year += 1 if ($item->{date_array}->[1] < $date[1] && $stage eq \'after\');\r\n	$text = Date::Calc::Month_to_Text($item->{date_array}->[1]) . \" \" . $year;\r\n    warn \"Date is $text\\n\";\r\n  } else {\r\n    $text = Date::Calc::Date_to_Text(@{$item->{date_array}});\r\n  }\r\n  $keys->{nav_link} = \"$prefix$text$suffix\";\r\n\r\n  if ($item->{current}) {\r\n    $keys->{css_id} = $S->{UI}->{BLOCKS}->{calendar_navigation_hilight};\r\n    $keys->{nav_link} = $text;\r\n    $prefix = \'\';\r\n    $suffix = \' &gt;&gt;\';\r\n	$stage = \'after\'\r\n  }\r\n  $content .= $S->interpolate($string,$keys);\r\n}\r\n\r\n\r\nreturn $content;','The navigation bar for the three calendar views.','empty_box',0);
INSERT INTO `box` VALUES ('hotlist_box_new','Your Hotlist','return unless ($S->{HOTLIST} && $#{$S->{HOTLIST}} >= 0);\n\nmy $box_content;\nmy $sids;\nmy $stories = $S->story_data($S->{HOTLIST});\nmy $show = $S->var(\'show_new_comments\');\nforeach my $story (@$stories) {\n   my $num_new = $story->{comments} - $story->{lastseen} if ($show eq \"hotlist\" || $show eq \"all\");\n   my $end_s = ($story->{comments} == 1) ? \'\' : \'s\';\n   $box_content .= qq~%%dot%% <A CLASS=\"light\" HREF=\"%%rootdir%%/story/$story->{sid}\">$story->{title}</a> ($story->{comments} comment$end_s~;\n   $box_content .= \", $num_new new\" if defined($num_new);\n   $box_content .= \")<BR>\";\n}\n\nreturn unless $box_content;\nmy $title = \"$S->{NICK}\'s Hotlist\";\nreturn {title => $title, content => $box_content};\n','Replacement hotlist box for new story fetching code','box',0);
INSERT INTO `box` VALUES ('olderlist_box_new','Front Page','my $section = $S->{CGI}->param(\'section\') || \'front\';\nmy $stories = [];\nmy $params;\n$params->{limit} = $S->pref(\'maxtitles\');\n$params->{offset} = $S->pref(\'maxstories\');\n\nif ($section eq \'front\') {\n    $params->{displaystatus} = 0;\n} else {\n    $params->{displaystatus} = [0,1];\n    $params->{section} = $section;\n}\nmy $sids = $S->get_sids($params);\n$stories = $S->story_data($sids);\n\nreturn unless $stories;\n\nmy $box_content;\n\nmy $date = undef;\nforeach my $story (@{$stories}) {\n    if (($story->{wmdtime} ne $date) || !$date) {\n        $date = $story->{wmdtime};\n        $box_content .= qq|\n               <B>$story->{wmdtime}</B>|;\n    }\n    $box_content .= qq|\n    <BR>%%dot%% <A CLASS=\"light\" HREF=\"%%rootdir%%/story/$story->{sid}\">$story->{title}</A> ($story->{comments} comments)|;\n    \nif ($S->have_perm(\'story_list\')) {\n        $box_content .= qq| [<A CLASS=\"light\" HREF=\"%%rootdir%%/admin/story/$story->{sid}\">edit</A>]|;\n    }\n}\n\nmy $offset = $S->{UI}->{VARS}->{maxstories} + length(@$stories) if $stories;\n\nmy $search_url = qq{%%rootdir%%/?op=search;offset=$offset};\n$search_url .= \';section=\'.$section if ($section ne \'front\');\n\n$box_content .= qq|\n            <P>\n            <A CLASS=\"light\" HREF=\"$search_url\">Older Stories...</A>\n            </P>|;\nmy $return = {content => \"%%smallfont%%$box_content%%smallfont_end%%\"};\nif ($section ne \'front\' && $section ne \'__all__\') {\n    $return->{title} = $S->{SECTION_DATA}->{$section}->{title};\n} elsif ($section eq \'__all__\') {\n    $return->{title} = \'All Stories\';\n}\n\nreturn $return;','Replacement older list box for new story fetching code','box',0);
INSERT INTO `box` VALUES ('signup_password','','return \'\' unless $S->{UI}->{VARS}->{\'signup_with_password\'};\r\n\r\nreturn qq{\r\n<TR><TD class=\"smalltext\">\r\n<b>Please choose a password:</b>\r\n</TD>\r\n<TD>\r\n<INPUT TYPE=\"password\" NAME=\"pass1\" VALUE=\"%%pass1%%\" SIZE=30>\r\n</TD>\r\n</TR>\r\n<TR><TD class=\"smalltext\">\r\n<b>Type password again:</b>\r\n</TD>\r\n<TD>\r\n<INPUT TYPE=\"password\" NAME=\"pass2\" VALUE=\"%%pass2%%\" SIZE=30>\r\n</TD>\r\n</TR>};\r\n\r\n\r\n','Generate the new user password form, if desired','empty_box',0);
INSERT INTO `box` VALUES ('activate','','return qq{You\'re already logged in! Your account is confirmed and active. Click <a href=\"%%rootdir%%/\">here</a> to go to the home page.} if ($S->{UID} > 0);\r\n\r\nmy $key = $S->cgi->param(\'key\');\r\nreturn \'Error: No key provided.\' unless $key;\r\n\r\nmy $q_key = $S->dbh->quote($key);\r\nmy ($rv, $sth) = $S->db_select({\r\n	WHAT => \'uid, nickname, creation_passwd\',\r\n	FROM => \'users\',\r\n	WHERE => qq{passwd = $q_key}\r\n});	\r\n\r\nmy ($uid, $nick, $pass) = $sth->fetchrow();\r\n$sth->finish();\r\n\r\nmy $help = $S->{UI}->{VARS}->{local_email};\r\n\r\nreturn qq{I\'m sorry, I can\'t find that key. Your account is probably already confirmed -- try logging in <a href=\"%%rootdir%%/login\">here</a> using the nickname and password you chose when you signed up. If that works, you\'re all set. If not, please email <a href=\"mailto:$help\">$help</a> for help.} unless ($uid && $nick && $pass);\r\n\r\nmy ($rv, $sth) = $S->db_update({\r\n	WHAT => \'users\',\r\n	SET => qq{passwd = newpasswd, creation_passwd = \"\", newpasswd = \"\"},\r\n	WHERE => qq{uid = $uid}\r\n});\r\n$sth->finish();	\r\n	\r\n$S->{PARAMS}->{\'uname\'} = $nick;\r\n$S->{PARAMS}->{\'pass\'} = $pass;\r\n\r\n$S->_check_user();\r\n\r\nmy $urlnick = $S->urlify($nick);\r\n\r\nmy $url = $S->{UI}->{VARS}->{site_url} . \"/\" .\r\n          $S->{UI}->{VARS}->{rootdir} . \"user/$urlnick/prefs?firstlogin=1\";\r\n\r\n$S->{APACHE}->headers_out->{\'Location\'} = $url;\r\n$S->{HEADERS_ONLY}=1;	  \r\n\r\nreturn;','The code to activate a new user\'s account when they click the emailed link.','empty_box',0);
INSERT INTO `box` VALUES ('iplookup','','my $content;\r\nmy $ip = $S->cgi->param(\'iplook\');\r\n\r\n$content = \"<table><tr><td><b>Users created from IP address $ip:</b></td></tr>\";\r\n\r\n# Get list of users created from this IP address\r\nmy ($rv, $sth) = $S->db_select({\r\n   WHAT => \'nickname, perm_group\',\r\n   FROM => \'users\',\r\n   WHERE => qq~creation_ip = \'$ip\'~\r\n   });\r\n\r\nwhile (my $user = $sth->fetchrow_hashref()){\r\n    $content .= qq~\r\n        <tr><td><a href=\"/user/$user->{\'nickname\'}\">$user->{\'nickname\'}</A> </td><td>$user->{\'perm_group\'}</td></tr>~;\r\n    }\r\n$sth->finish;\r\n\r\n# figure out the basic subnet\r\nmy @net = split(/\\./, $ip);\r\nmy $sub = $net[0] . \".\" . $net[1] . \".\" . $net[2] . \".\";\r\n\r\n$content .= qq~<tr><td><b>Users created from ${sub}*:</b></td></tr>~;\r\n\r\n($rv, $sth) = $S->db_select({\r\n   WHAT => \'nickname, perm_group\',\r\n   FROM => \'users\',\r\n   WHERE => qq~creation_ip like \'${sub}%\'~\r\n   });\r\n\r\nwhile (my $user = $sth->fetchrow_hashref()){\r\n    $content .= qq~\r\n        <tr><td><a href=\"/user/$user->{\'nickname\'}\">$user->{\'nickname\'}</A> </td><td>$user->{\'perm_group\'}</td></tr>~;\r\n    }\r\n$sth->finish;\r\n\r\n# comments, if we\'re keeping track of that sort\r\n# of thing\r\nif($S->{UI}->{VARS}->{\'comment_ip_log\'}){\r\n    $content .= \"<tr><td><b>Users who have posted from $ip:</b></td></tr>\";\r\n    ($rv, $sth) = $S->db_select({\r\n        WHAT => \'comments.commentip, users.nickname, users.perm_group\',\r\n        FROM => \'comments left join users on comments.uid = users.uid\',\r\n        WHERE => qq~commentip = \'$ip\'~,\r\n        GROUP_BY => \'comments.uid\'\r\n        });\r\n    while (my $c = $sth->fetchrow_hashref()){\r\n        $content .= qq~<tr><td><a href=\"/user/$c->{\'nickname\'}\">$c->{\'nickname\'}</a></td><td>$c->{\'perm_group\'}</td></tr>~;\r\n        }\r\n    $sth->finish;\r\n    $content .= \"<tr><td><b>Users who have posted from ${sub}*:</b></td></tr>\";\r\n    ($rv, $sth) = $S->db_select({\r\n        WHAT => \'comments.commentip, users.nickname, users.perm_group\',\r\n        FROM => \'comments left join users on comments.uid = users.uid\',\r\n        WHERE => qq~commentip like \'${sub}%\'~,\r\n        GROUP_BY => \'comments.uid\'\r\n        });\r\n    while (my $c = $sth->fetchrow_hashref()){\r\n        $content .= qq~<tr><td><a href=\"/user/$c->{\'nickname\'}\">$c->{\'nickname\'}</a></td><td>$c->{\'perm_group\'}</td></tr>~;\r\n        }\r\n    $sth->finish;\r\n    }\r\n\r\n$content .= \"</table>\";\r\n\r\n# get the whois info. NOTE: for this to work\r\n# right, you need to have the whois command \r\n# installed. Normally, this shouldn\'t be a\r\n# problem\r\n$content .= \"<P><b>WHOIS info for $ip</b><P>\";\r\nmy $whois = `/usr/bin/whois $ip`;\r\n# sigh, gotta format it right\r\n#my @z = split /\\n/, $whois;\r\n#while (my $line = @z){\r\n#    $content .= \"$line<br>\";\r\n#    }\r\n$content .= \"<pre>$whois</pre>\";\r\n\r\nreturn $content;','','empty_box',0);
INSERT INTO `box` VALUES ('admin_tools','Admin Tools','my $content;\r\n\r\nmy @tools = sort { $a->{pos} <=> $b->{pos} } values %{ $S->{ADMIN_TOOLS} };\r\n\r\nforeach my $t (@tools) {\r\n        my $perm = $t->{perm};\r\n        if ($t->{perm} =~ /,/) {\r\n          $t->{perm} =~ /^(.*?),/;\r\n          $perm = $1;\r\n        }\r\n	if ( $S->have_perm($perm) ) {\r\n		$content .= qq|\r\n	%%dot%% <a class=\"light\" href=\"%%rootdir%%/admin/$t->{tool}\">$t->{menuname}</a><br>|;\r\n	}\r\n}\r\n\r\nif ($S->have_perm(\'edit_user\')) {\r\n $content .= qq{<br>\r\n <FORM NAME=\"uedit\" METHOD=\"GET\" ACTION=\"%%rootdir%%/\">\r\n Edit User:<BR>\r\n <INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n <SMALL><INPUT TYPE=\"text\" NAME=\"nick\" VALUE=\"\" SIZE=10>\r\n <INPUT TYPE=\"SUBMIT\" NAME=\"tool\" VALUE=\"prefs\">\r\n <INPUT TYPE=\"SUBMIT\" NAME=\"tool\" VALUE=\"info\">\r\n </SMALL></FORM>};\r\n}\r\n\r\nreturn \'\' unless $content;\r\n\r\nreturn $content;\r\n','Admin Tools box','box',0);
INSERT INTO `box` VALUES ('userpref_menu','','my $edit = 0;\r\nmy $return = \'\';\r\nmy $nick = $S->param->{nick};\r\nmy $tool = $S->param->{tool} || \'info\';\r\nmy $admin_edit = \'\';\r\n\r\n# first, do we have permission to edit \r\n# this user\'s prefs?\r\n\r\nif ( $S->{UID} == $S->param->{uid} || $S->have_perm(\'edit_user\') ) {\r\n  $edit = 1;\r\n}\r\n\r\n$admin_edit = qq{[<A href=\"%%rootdir%%/user/$nick/prefs\">edit user</A>]} if ($S->have_perm(\'edit_user\'));\r\n\r\n# links to create\r\nmy $links = \"<P>$admin_edit ${nick}\'s \";\r\n\r\n# user info pages\r\nif ( $tool eq \'info\' ) {\r\n  $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick\">Info</A>};\r\n  $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/comments\">Comments</A>};\r\n  $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/stories\">Stories</A>};\r\n\r\n  if ( $S->{UI}->{VARS}->{use_diaries} ) {\r\n    $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/diary\">Diary</A>};\r\n  }\r\n\r\n  if ( $S->{UI}->{VARS}->{use_ratings} ) {\r\n    $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/ratings\">Ratings</A>};\r\n  }\r\nmy $udata = $S->user_data($S->param->{\'uid\'});\r\n#  if ( $S->{UI}->{VARS}->{allow_uploads} ) {\r\nif($S->{UI}->{VARS}->{allow_uploads} && (($S->have_perm(\'view_user_files\') && $S->have_perm(\'upload_user\', $udata->{\'perm_group\'})) || $S->have_perm(\'upload_admin\')) ) {\r\n    $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/files\">Files</A>};\r\n  }\r\n\r\n  if ( $S->{UI}->{VARS}->{use_ads} ) {\r\n    $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/ads\">Ads</A>};\r\n  }\r\n\r\n  $return = $links . \"</P>\";\r\n} elsif ( $edit && $tool eq \'prefs\' ) {\r\n  my %editlinks;\r\n  my ($rv, $sth) = $S->db_select({\r\n               WHAT => \'page, perm_edit\',\r\n               FROM => \'pref_items\',\r\n               GROUP_BY => \'page\'\r\n  });\r\n  while (my $item = $sth->fetchrow_hashref()) {\r\n     $editlinks{\"$item->{page}\"} = \"%%rootdir%%/user/$nick/prefs/$item->{page} $item->{perm_edit}\";\r\n  }\r\n  $sth->finish;\r\n  $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/prefs/Protected\">Email and Password</A>};\r\n\r\n  foreach my $item (sort {$b cmp $a} keys %editlinks) {\r\n    my $c = 0;\r\n    my ($rv2, $sth2) = $S->db_select({\r\n        WHAT => \'perm_edit\',\r\n        FROM => \'pref_items\',\r\n        WHERE => \"page = \'$item\'\"\r\n        });\r\n    while(my $i = $sth2->fetchrow_hashref()) {\r\n        $c++ if ($S->have_perm($i->{perm_edit}) || !$i->{perm_edit});\r\n        }\r\n    $sth2->finish;\r\n    $links .= ($c) ? qq{\r\n   <A href=\"$editlinks{$item}\">$item</A>} : \'\';\r\n  }\r\n  $return = $links . \"</P>\";\r\n}\r\n\r\nreturn $return;\r\n','navigation for user pref pages','empty_box',0);
INSERT INTO `box` VALUES ('addtag','','my $sid = $S->cgi->param(\'sid\');\r\nmy $tagsave = $S->cgi->param(\'tagsave\');\r\nmy $newtags = $S->cgi->param(\'newtags\');\r\nreturn \"Error! No sid provided!\" if !$sid;\r\nmy $content;\r\n\r\n# I would, of course, prefer not to give\r\n# TUs extra privileges, but sometimes I guess\r\n# it must be done.\r\nmy $alltags;\r\nmy $subval;\r\nif ($S->have_perm(\'edit_story_tags\')){\r\n    $newtags ||= $S->get_tags_as_string($sid);\r\n    $alltags = $newtags;\r\n    $subval = \"Add/Edit\";\r\n    }\r\nelse {\r\n    $alltags = $S->get_tags_as_string($sid) . \", $newtags\";\r\n    $subval = \"Add\";\r\n    }\r\n#my $alltags = $S->get_tags_as_string($sid) . \", #$newtags\";\r\n$alltags =~ s/,$//;\r\n\r\n# if we\'re adding tags, add them and clear the new\r\n# tags var\r\nif($tagsave && $newtags){\r\n    $S->save_tags($sid, $alltags);\r\n    $content .= \"<p>Tags <b>$newtags</b> added.</p>\";\r\n    $newtags = \'\';\r\n    # and if we\'ve added tags, we\'re heading\r\n    # back to whence we came.\r\n    my $url = $S->{UI}->{VARS}->{site_url}   \r\n        . $S->{UI}->{VARS}->{rootdir} . \"/\"\r\n        . \"story/$sid\";\r\n    $S->{APACHE}->headers_out->{\'Location\'} = $url;\r\n    $S->{HEADERS_ONLY}=1;\r\n    }\r\nmy $curtags = $S->tag_display($sid);\r\n$content = \"Current $curtags\" . $content;\r\n\r\nmy $tagform = qq~\r\n<p><form name=\"addtag\" action=\"%%rootdir%%/addtag\" method=\"POST\">$subval Tags: (use commas to separate tags) <input type=\"hidden\" name=\"sid\" value=\"$sid\"><input type=\"text\" name=\"newtags\" size=\"30\" value=\"$newtags\"> <input type=\"submit\" name=\"tagsave\" value=\"$subval Tags\"></p></form></p><p>\r\n\'/\' characters are not allowed in tags, and will be converted to \'-\'.</p>\r\n~;\r\nreturn $content . $tagform;','','empty_box',0);
INSERT INTO `box` VALUES ('tag_listing','','my $sid = $S->cgi->param(\'sid\');\r\nmy $tags = $S->tag_display($sid);\r\nmy $content = \"$tags\";\r\n# if we can post comments, we can tag.\r\nif($S->have_perm(\'comment_post\')){\r\n    my $addlink = ($S->have_perm(\'edit_story_tags\')) ? qq~ :: <a href=\"/addtag/$sid\">Add/Edit Tags to this Story</a>~ : qq~ :: <a href=\"/addtag/$sid\">Add Tags to this Story</a>~;\r\n    $content .= $addlink;\r\n    }\r\nreturn $content;','','empty_box',0);
INSERT INTO `box` VALUES ('tag_page_order','','my $switch = $S->cgi->param(\'switch\');\r\n\r\nif($S->{UID} > 0){\r\n    $S->pref(\'tag_sort\', $switch); # nice and easy\r\n    }\r\nelse { # not so easy\r\n    $S->session(\'tag_sort\', $switch);\r\n    }\r\nmy $url = $S->{UI}->{VARS}->{site_url} . \r\n          $S->{UI}->{VARS}->{rootdir} . \"/\" \r\n          . \"tag\";\r\n\r\n		$S->{APACHE}->headers_out->{\'Location\'} = $url;\r\n$S->{HEADERS_ONLY}=1;\r\n\r\nreturn;','','empty_box',0);
INSERT INTO `box` VALUES ('tag_sort_change','','# change the default ordering for the \"All Tags\"\r\n# page\r\n# don\'t display if we\'re not looking at the \"All\r\n# Tags\" page, though.\r\nreturn if $S->cgi->param(\'tag\');\r\n\r\nmy $switchto = ($S->pref(\'tag_sort\') eq \'alpha\') ? \"count\" : \"alpha\";\r\n# and if we\'re not logged in, it\'s slightly\r\n# different\r\nif($S->{UID} < 0){\r\n    $switchto = ($S->session(\'tag_sort\') eq \'alpha\') ? \"count\" : \"alpha\";\r\n    }\r\nmy $ordering = ($switchto eq \'alpha\') ? \'Alphabetical\' : \'Popularity\';\r\nmy $link = qq~<a href=\"%%rootdir%%/tagsort/$switchto\">$ordering</a>.~;\r\n\r\n# a little complicated, but whatever\r\nmy $linktext = ($switchto eq \'alpha\') ? \"<br>Sort by: Popularity | $link\" : \"Sort by: $link | Alphabetical\";\r\n\r\nreturn $linktext;','','empty_box',0);
INSERT INTO `box` VALUES ('userpref_menu_file_pref','','my $edit = 0;\r\nmy $return = \'\';\r\nmy $nick = $S->param->{nick};\r\nmy $tool = $S->param->{tool} || \'info\';\r\nmy $admin_edit = \'\';\r\n\r\n# first, do we have permission to edit \r\n# this user\'s prefs?\r\n\r\nif ( $S->{UID} == $S->param->{uid} || $S->have_perm(\'edit_user\') ) {\r\n  $edit = 1;\r\n}\r\n\r\n$admin_edit = qq{[<A href=\"%%rootdir%%/user/$nick/prefs\">edit user</A>]} if ($S->have_perm(\'edit_user\'));\r\n\r\n# links to create\r\nmy $links = \"<P>$admin_edit ${nick}\'s \";\r\n\r\n# user info pages\r\nif ( $tool eq \'info\' ) {\r\n  $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick\">Info</A>};\r\n  $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/comments\">Comments</A>};\r\n  $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/stories\">Stories</A>};\r\n\r\n  if ( $S->{UI}->{VARS}->{use_diaries} ) {\r\n    $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/diary\">Diary</A>};\r\n  }\r\n\r\n  if ( $S->{UI}->{VARS}->{use_ratings} ) {\r\n    $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/ratings\">Ratings</A>};\r\n  }\r\nmy $udata = $S->user_data($S->param->{\'uid\'});\r\n#  if ( $S->{UI}->{VARS}->{allow_uploads} ) {\r\nif($S->{UI}->{VARS}->{allow_uploads} && (($S->have_perm(\'view_user_files\') && $S->have_perm(\'upload_user\', $udata->{\'perm_group\'})) || $S->have_perm(\'upload_admin\')) ) {\r\n    $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/files\">Files</A>};\r\n  }\r\n\r\n  if ( $S->{UI}->{VARS}->{use_ads} ) {\r\n    $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/ads\">Ads</A>};\r\n  }\r\n\r\n  $return = $links . \"</P>\";\r\n} elsif ( $edit && $tool eq \'prefs\' ) {\r\n  my %editlinks;\r\n  my ($rv, $sth) = $S->db_select({\r\n               WHAT => \'page, perm_edit\',\r\n               FROM => \'pref_items\',\r\n               GROUP_BY => \'page\'\r\n  });\r\n  while (my $item = $sth->fetchrow_hashref()) {\r\n     $editlinks{\"$item->{page}\"} = \"%%rootdir%%/user/$nick/prefs/$item->{page} $item->{perm_edit}\";\r\n  }\r\n  $sth->finish;\r\n  $links .= qq{\r\n     <A href=\"%%rootdir%%/user/$nick/prefs/Protected\">Email and Password</A>};\r\n\r\n  foreach my $item (sort {$b cmp $a} keys %editlinks) {\r\n    my $c = 0;\r\n    my ($rv2, $sth2) = $S->db_select({\r\n        WHAT => \'perm_edit\',\r\n        FROM => \'pref_items\',\r\n        WHERE => \"page = \'$item\'\"\r\n        });\r\n    while(my $i = $sth2->fetchrow_hashref()) {\r\n        $c++ if ($S->have_perm($i->{perm_edit}) || !$i->{perm_edit});\r\n        }\r\n    $sth2->finish;\r\n    $links .= ($c) ? qq{\r\n   <A href=\"$editlinks{$item}\">$item</A>} : \'\';\r\n  }\r\n  $return = $links . \"</P>\";\r\n}\r\n\r\nreturn $return;\r\n','navigation for user pref pages','empty_box',0);
INSERT INTO `box` VALUES ('rating_type_selectbox','','my $choice = $ARGS[0];\r\n\r\nmy %choices = ( \"dropdown\", \"Drop Down box\", \"radio\", \"Radio Buttons\" );\r\n\r\nmy $select = qq{\r\n      <SELECT name=\"rating_type\" size=\"1\">};\r\n\r\nforeach my $c (sort keys %choices) {\r\n  my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n  $select .= qq{\r\n        <OPTION value=\"$c\"$checked>$choices{$c}</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n      </SELECT>};\r\n\r\nreturn $select;','Rating type select box for user preferences','empty_box',0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `box` ENABLE KEYS */;

--
-- Table structure for table `cache_time`
--

DROP TABLE IF EXISTS `cache_time`;
CREATE TABLE `cache_time` (
  `resource` varchar(50) NOT NULL default '',
  `last_update` int(11) NOT NULL default '0',
  PRIMARY KEY  (`resource`)
) TYPE=MyISAM;

--
-- Dumping data for table `cache_time`
--


/*!40000 ALTER TABLE `cache_time` DISABLE KEYS */;
LOCK TABLES `cache_time` WRITE;
INSERT INTO `cache_time` VALUES ('refresh_all',1106672422);
INSERT INTO `cache_time` VALUES ('vars',1106672422);
INSERT INTO `cache_time` VALUES ('boxes',1106671895);
INSERT INTO `cache_time` VALUES ('ops',1106671862);
INSERT INTO `cache_time` VALUES ('blocks_default',1106671754);
INSERT INTO `cache_time` VALUES ('macros',1087408229);
INSERT INTO `cache_time` VALUES ('topics',1078970419);
INSERT INTO `cache_time` VALUES ('sections',1078970419);
INSERT INTO `cache_time` VALUES ('admin_tools',1078970419);
INSERT INTO `cache_time` VALUES ('hooks',1078970419);
INSERT INTO `cache_time` VALUES ('2000/8/27/224648/707_comments',1079152774);
INSERT INTO `cache_time` VALUES ('2000/8/27/224648/707_mod',1079153501);
INSERT INTO `cache_time` VALUES ('967438565_opsmxIVg_comments',1079131129);
INSERT INTO `cache_time` VALUES ('preview_comments',1079158582);
INSERT INTO `cache_time` VALUES ('2004/3/12/222115/671_mod',1079158875);
INSERT INTO `cache_time` VALUES ('2004/3/12/222115/671_comments',1079158880);
INSERT INTO `cache_time` VALUES ('2004/1/30/11733/7275_comments',1087408195);
INSERT INTO `cache_time` VALUES ('2004/1/30/11244/4143_comments',1087408195);
INSERT INTO `cache_time` VALUES ('2004/1/16/1046/59617_comments',1087408195);
INSERT INTO `cache_time` VALUES ('2004/1/15/152751/014_comments',1087408195);
INSERT INTO `cache_time` VALUES ('2004/1/15/152446/828_comments',1087408195);
INSERT INTO `cache_time` VALUES ('2004/1/15/152416/551_comments',1087408195);
INSERT INTO `cache_time` VALUES ('pref_items',1106316582);
INSERT INTO `cache_time` VALUES ('events',1106316583);
INSERT INTO `cache_time` VALUES ('calendars',1106316583);
UNLOCK TABLES;
/*!40000 ALTER TABLE `cache_time` ENABLE KEYS */;

--
-- Table structure for table `calendar_link`
--

DROP TABLE IF EXISTS `calendar_link`;
CREATE TABLE `calendar_link` (
  `eid` int(11) NOT NULL default '0',
  `cal_id` int(11) NOT NULL default '0',
  `is_primary_calendar` tinyint(1) NOT NULL default '0',
  `displaystatus` tinyint(1) default '0',
  PRIMARY KEY  (`eid`,`cal_id`)
) TYPE=MyISAM;

--
-- Dumping data for table `calendar_link`
--


/*!40000 ALTER TABLE `calendar_link` DISABLE KEYS */;
LOCK TABLES `calendar_link` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `calendar_link` ENABLE KEYS */;

--
-- Table structure for table `calendars`
--

DROP TABLE IF EXISTS `calendars`;
CREATE TABLE `calendars` (
  `cal_id` int(11) NOT NULL auto_increment,
  `title` varchar(100) default NULL,
  `owner` int(11) default '0',
  `description` text,
  `public_view` varchar(10) default 'public',
  `public_submit` varchar(10) default 'private',
  PRIMARY KEY  (`cal_id`),
  KEY `owner_idx` (`owner`)
) TYPE=MyISAM;

--
-- Dumping data for table `calendars`
--


/*!40000 ALTER TABLE `calendars` DISABLE KEYS */;
LOCK TABLES `calendars` WRITE;
INSERT INTO `calendars` VALUES (1,'Global Calendar',0,'Site-wide calendar','public','private');
UNLOCK TABLES;
/*!40000 ALTER TABLE `calendars` ENABLE KEYS */;

--
-- Table structure for table `commentcodes`
--

DROP TABLE IF EXISTS `commentcodes`;
CREATE TABLE `commentcodes` (
  `code` int(1) NOT NULL default '0',
  `name` varchar(32) default NULL,
  PRIMARY KEY  (`code`)
) TYPE=MyISAM;

--
-- Dumping data for table `commentcodes`
--


/*!40000 ALTER TABLE `commentcodes` DISABLE KEYS */;
LOCK TABLES `commentcodes` WRITE;
INSERT INTO `commentcodes` VALUES (0,'Comments Enabled');
INSERT INTO `commentcodes` VALUES (1,'Read-Only');
INSERT INTO `commentcodes` VALUES (-1,'Comments Disabled');
UNLOCK TABLES;
/*!40000 ALTER TABLE `commentcodes` ENABLE KEYS */;

--
-- Table structure for table `commentratings`
--

DROP TABLE IF EXISTS `commentratings`;
CREATE TABLE `commentratings` (
  `uid` int(1) NOT NULL default '0',
  `rating` int(11) NOT NULL default '0',
  `cid` int(15) NOT NULL default '0',
  `sid` varchar(30) NOT NULL default '',
  `rating_time` datetime default '0000-00-00 00:00:00',
  `rater_ip` varchar(16) NOT NULL default '',
  PRIMARY KEY  (`sid`,`cid`,`uid`)
) TYPE=MyISAM;

--
-- Dumping data for table `commentratings`
--


/*!40000 ALTER TABLE `commentratings` DISABLE KEYS */;
LOCK TABLES `commentratings` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `commentratings` ENABLE KEYS */;

--
-- Table structure for table `comments`
--

DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
  `sid` varchar(30) NOT NULL default '',
  `cid` int(15) NOT NULL default '0',
  `pid` int(15) NOT NULL default '0',
  `date` datetime default NULL,
  `rank` int(1) default NULL,
  `subject` varchar(50) NOT NULL default '',
  `comment` text NOT NULL,
  `pending` int(1) default '0',
  `uid` int(1) NOT NULL default '-1',
  `points` decimal(4,2) default NULL,
  `lastmod` int(1) default '-1',
  `sig_status` int(1) default '1',
  `sig` varchar(160) default NULL,
  `commentip` varchar(16) default NULL,
  `pre_rating` decimal(4,2) default NULL,
  PRIMARY KEY  (`sid`,`cid`),
  KEY `stuff` (`uid`,`pid`),
  FULLTEXT KEY `commentsearch_idx` (`subject`,`comment`)
) TYPE=MyISAM;

--
-- Dumping data for table `comments`
--


/*!40000 ALTER TABLE `comments` DISABLE KEYS */;
LOCK TABLES `comments` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `comments` ENABLE KEYS */;

--
-- Table structure for table `cron`
--

DROP TABLE IF EXISTS `cron`;
CREATE TABLE `cron` (
  `name` varchar(20) NOT NULL default '',
  `func` varchar(20) default NULL,
  `run_every` int(11) default NULL,
  `last_run` datetime default '0000-00-00 00:00:00',
  `enabled` int(1) default '1',
  `is_box` int(1) default '0',
  PRIMARY KEY  (`name`)
) TYPE=MyISAM;

--
-- Dumping data for table `cron`
--


/*!40000 ALTER TABLE `cron` DISABLE KEYS */;
LOCK TABLES `cron` WRITE;
INSERT INTO `cron` VALUES ('rdf','cron_rdf',21600,'2004-03-13 16:00:02',1,0);
INSERT INTO `cron` VALUES ('rdf_fetch','cron_rdf_fetch',3600,'2004-03-13 18:00:02',1,0);
INSERT INTO `cron` VALUES ('sessionreap','cron_sessionreap',86400,'2004-03-12 20:00:01',1,0);
INSERT INTO `cron` VALUES ('digest','cron_digest',86400,'2004-03-12 20:00:01',1,0);
INSERT INTO `cron` VALUES ('edit_queue','cron_edit_queue',3600,'0000-00-00 00:00:00',0,1);
INSERT INTO `cron` VALUES ('cc_bill_orders','cc_bill_orders',300,'2002-04-20 17:21:35',0,1);
INSERT INTO `cron` VALUES ('paypal_bill_orders','paypal_bill_orders',300,'0000-00-00 00:00:00',0,1);
INSERT INTO `cron` VALUES ('unpaid_ad_reap','unpaid_ad_reap',86400,'0000-00-00 00:00:00',0,1);
INSERT INTO `cron` VALUES ('poll_archive','poll_archive',2592000,'2002-09-27 13:20:59',0,0);
INSERT INTO `cron` VALUES ('archive_stories','archive_stories',86400,'2002-10-18 21:00:01',0,0);
INSERT INTO `cron` VALUES ('mark_ads_inactive','mark_ads_inactive',86400,'0000-00-00 00:00:00',0,1);
UNLOCK TABLES;
/*!40000 ALTER TABLE `cron` ENABLE KEYS */;

--
-- Table structure for table `displaycodes`
--

DROP TABLE IF EXISTS `displaycodes`;
CREATE TABLE `displaycodes` (
  `code` int(1) NOT NULL default '0',
  `name` varchar(32) default NULL,
  PRIMARY KEY  (`code`)
) TYPE=MyISAM;

--
-- Dumping data for table `displaycodes`
--


/*!40000 ALTER TABLE `displaycodes` DISABLE KEYS */;
LOCK TABLES `displaycodes` WRITE;
INSERT INTO `displaycodes` VALUES (0,'Always Display');
INSERT INTO `displaycodes` VALUES (1,'Only Display Within Section');
INSERT INTO `displaycodes` VALUES (-1,'Never Display');
INSERT INTO `displaycodes` VALUES (-2,'Submitted');
INSERT INTO `displaycodes` VALUES (-3,'Editing');
UNLOCK TABLES;
/*!40000 ALTER TABLE `displaycodes` ENABLE KEYS */;

--
-- Table structure for table `editcategorycodes`
--

DROP TABLE IF EXISTS `editcategorycodes`;
CREATE TABLE `editcategorycodes` (
  `code` int(1) NOT NULL default '0',
  `name` varchar(32) default NULL,
  `orderby` int(1) NOT NULL default '0',
  PRIMARY KEY  (`code`)
) TYPE=MyISAM;

--
-- Dumping data for table `editcategorycodes`
--


/*!40000 ALTER TABLE `editcategorycodes` DISABLE KEYS */;
LOCK TABLES `editcategorycodes` WRITE;
INSERT INTO `editcategorycodes` VALUES (1,'Submitted',0);
INSERT INTO `editcategorycodes` VALUES (2,'Pending',0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `editcategorycodes` ENABLE KEYS */;

--
-- Table structure for table `event_properties`
--

DROP TABLE IF EXISTS `event_properties`;
CREATE TABLE `event_properties` (
  `eid` int(11) NOT NULL default '0',
  `property` varchar(32) NOT NULL default '',
  `value` text,
  PRIMARY KEY  (`eid`,`property`)
) TYPE=MyISAM;

--
-- Dumping data for table `event_properties`
--


/*!40000 ALTER TABLE `event_properties` DISABLE KEYS */;
LOCK TABLES `event_properties` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `event_properties` ENABLE KEYS */;

--
-- Table structure for table `event_property_items`
--

DROP TABLE IF EXISTS `event_property_items`;
CREATE TABLE `event_property_items` (
  `property` varchar(32) NOT NULL default '',
  `title` varchar(50) default NULL,
  `description` text,
  `field` text,
  `template` text,
  `calendar_template` text,
  `display_order` int(5) default NULL,
  `requires` varchar(32) default NULL,
  `is_date` tinyint(1) default NULL,
  `is_time` tinyint(1) default NULL,
  `html` tinyint(1) default NULL,
  `regex` text,
  `enabled` tinyint(1) default NULL,
  `required` tinyint(1) default NULL,
  PRIMARY KEY  (`property`)
) TYPE=MyISAM;

--
-- Dumping data for table `event_property_items`
--


/*!40000 ALTER TABLE `event_property_items` DISABLE KEYS */;
LOCK TABLES `event_property_items` WRITE;
INSERT INTO `event_property_items` VALUES ('title','Event Name','','event_property_text','','<A href=\"%%rootdir%%/event/%%eid%%/\"><B>%%value%%</B></A><BR>',1,'',0,0,0,'',1,1);
INSERT INTO `event_property_items` VALUES ('description','Description','','event_property_textarea','<P>%%value%%</P>','%%value%%<BR><BR>\n',2,'',0,1,0,'',1,0);
INSERT INTO `event_property_items` VALUES ('country','Country','','event_property_text','<BR>%%value%%','',3,'',0,0,0,'',1,0);
INSERT INTO `event_property_items` VALUES ('state','State/Province','','event_property_text','<BR>%%value%%','',4,'country',0,0,0,'',1,0);
INSERT INTO `event_property_items` VALUES ('city','City','','event_property_text','<BR>%%value%%','',5,'state',0,0,0,'',1,0);
INSERT INTO `event_property_items` VALUES ('address','Address','','event_property_text','<BR>%%value%%','',6,'city',0,0,0,'',1,0);
INSERT INTO `event_property_items` VALUES ('time_start','Event Start Time','','event_property_text','','',7,'',0,0,0,'',1,0);
INSERT INTO `event_property_items` VALUES ('time_end','Event End Time','','event_property_text','','',8,'time_start',0,0,0,'',1,0);
INSERT INTO `event_property_items` VALUES ('deadline','Application/Registration Deadline','The deadline shows up in the calendar view as a reminder','event_property_date','<P>Apply/Register by: %%value%%</P>','Deadline: %%value%%<BR>',9,'',1,0,0,'',1,0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `event_property_items` ENABLE KEYS */;

--
-- Table structure for table `event_rsvp`
--

DROP TABLE IF EXISTS `event_rsvp`;
CREATE TABLE `event_rsvp` (
  `uid` int(11) NOT NULL default '0',
  `eid` int(11) NOT NULL default '0',
  `attend` tinyint(1) default NULL,
  `volunteer` varchar(30) default NULL,
  PRIMARY KEY  (`uid`,`eid`)
) TYPE=MyISAM;

--
-- Dumping data for table `event_rsvp`
--


/*!40000 ALTER TABLE `event_rsvp` DISABLE KEYS */;
LOCK TABLES `event_rsvp` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `event_rsvp` ENABLE KEYS */;

--
-- Table structure for table `event_story`
--

DROP TABLE IF EXISTS `event_story`;
CREATE TABLE `event_story` (
  `eid` int(11) NOT NULL default '0',
  `sid` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`eid`,`sid`)
) TYPE=MyISAM;

--
-- Dumping data for table `event_story`
--


/*!40000 ALTER TABLE `event_story` DISABLE KEYS */;
LOCK TABLES `event_story` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `event_story` ENABLE KEYS */;

--
-- Table structure for table `event_watch`
--

DROP TABLE IF EXISTS `event_watch`;
CREATE TABLE `event_watch` (
  `uid` int(11) NOT NULL default '0',
  `eid` int(11) NOT NULL default '0',
  `last_viewed` timestamp NOT NULL,
  `subscribed` tinyint(1) default '0',
  PRIMARY KEY  (`uid`,`eid`)
) TYPE=MyISAM;

--
-- Dumping data for table `event_watch`
--


/*!40000 ALTER TABLE `event_watch` DISABLE KEYS */;
LOCK TABLES `event_watch` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `event_watch` ENABLE KEYS */;

--
-- Table structure for table `events`
--

DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
  `eid` int(11) NOT NULL auto_increment,
  `owner` int(11) NOT NULL default '0',
  `date_start` date NOT NULL default '0000-00-00',
  `date_end` date default NULL,
  `last_update` timestamp NOT NULL,
  `public_view` varchar(10) default NULL,
  `public_submit` varchar(10) default NULL,
  `is_parent` tinyint(1) default '0',
  `parent` int(11) default '0',
  `volunteers` tinyint(1) default '0',
  PRIMARY KEY  (`eid`),
  KEY `owner_idx` (`owner`),
  KEY `parent_idx` (`parent`)
) TYPE=MyISAM;

--
-- Dumping data for table `events`
--


/*!40000 ALTER TABLE `events` DISABLE KEYS */;
LOCK TABLES `events` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `events` ENABLE KEYS */;

--
-- Table structure for table `hooks`
--

DROP TABLE IF EXISTS `hooks`;
CREATE TABLE `hooks` (
  `hook` varchar(50) NOT NULL default '',
  `func` varchar(50) NOT NULL default '',
  `is_box` int(1) default '0',
  `enabled` int(1) default '1',
  PRIMARY KEY  (`hook`,`func`)
) TYPE=MyISAM;

--
-- Dumping data for table `hooks`
--


/*!40000 ALTER TABLE `hooks` DISABLE KEYS */;
LOCK TABLES `hooks` WRITE;
INSERT INTO `hooks` VALUES ('story_update','log_activity',0,0);
INSERT INTO `hooks` VALUES ('story_new','log_activity',0,0);
INSERT INTO `hooks` VALUES ('story_delete','log_activity',0,0);
INSERT INTO `hooks` VALUES ('comment_delete','log_activity',0,0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `hooks` ENABLE KEYS */;

--
-- Table structure for table `log_info`
--

DROP TABLE IF EXISTS `log_info`;
CREATE TABLE `log_info` (
  `log_id` int(11) NOT NULL auto_increment,
  `log_type` varchar(30) NOT NULL default '',
  `log_item` varchar(30) NOT NULL default '',
  `description` varchar(255) default '',
  `extended` tinyint(1) NOT NULL default '0',
  `uid` int(11) NOT NULL default '0',
  `ip_address` varchar(30) default '',
  `log_date` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`log_id`)
) TYPE=MyISAM;

--
-- Dumping data for table `log_info`
--


/*!40000 ALTER TABLE `log_info` DISABLE KEYS */;
LOCK TABLES `log_info` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `log_info` ENABLE KEYS */;

--
-- Table structure for table `log_info_extended`
--

DROP TABLE IF EXISTS `log_info_extended`;
CREATE TABLE `log_info_extended` (
  `log_id` int(11) NOT NULL default '0',
  `extended_description` text,
  PRIMARY KEY  (`log_id`)
) TYPE=MyISAM;

--
-- Dumping data for table `log_info_extended`
--


/*!40000 ALTER TABLE `log_info_extended` DISABLE KEYS */;
LOCK TABLES `log_info_extended` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `log_info_extended` ENABLE KEYS */;

--
-- Table structure for table `macros`
--

DROP TABLE IF EXISTS `macros`;
CREATE TABLE `macros` (
  `name` varchar(32) NOT NULL default '',
  `value` text,
  `description` text,
  `category` varchar(128) NOT NULL default '',
  `parameter` text,
  PRIMARY KEY  (`name`)
) TYPE=MyISAM;

--
-- Dumping data for table `macros`
--


/*!40000 ALTER TABLE `macros` DISABLE KEYS */;
LOCK TABLES `macros` WRITE;
INSERT INTO `macros` VALUES ('macro_test','<span style=\"color: red\">The macro engine is active!</span>','A test macro - if you can see it, it\'s working.','General',NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `macros` ENABLE KEYS */;

--
-- Table structure for table `ops`
--

DROP TABLE IF EXISTS `ops`;
CREATE TABLE `ops` (
  `op` varchar(50) NOT NULL default '',
  `template` varchar(30) NOT NULL default '',
  `func` varchar(50) default NULL,
  `is_box` int(1) default '0',
  `enabled` int(1) default '1',
  `perm` varchar(50) default '',
  `aliases` varchar(255) NOT NULL default '',
  `urltemplates` text NOT NULL,
  `description` text,
  PRIMARY KEY  (`op`)
) TYPE=MyISAM;

--
-- Dumping data for table `ops`
--


/*!40000 ALTER TABLE `ops` DISABLE KEYS */;
LOCK TABLES `ops` WRITE;
INSERT INTO `ops` VALUES ('main','index_template','main_page',0,1,'','','/page/','Displays the front page.');
INSERT INTO `ops` VALUES ('blank','blank_template',NULL,0,1,'','','','Uses a blank template to do nothing and show nothing.');
INSERT INTO `ops` VALUES ('poll_vote','default_template','just_vote',0,1,'poll_vote','','','Registers a user vote in a poll.');
INSERT INTO `ops` VALUES ('modsub','default_template','moderate_subs',0,1,'moderate','queue moderate','','Display the moderation queue.');
INSERT INTO `ops` VALUES ('submitstory','submit_template','submit_story',0,1,'story_post','submit','/section/','Submits a story to the moderation queue.');
INSERT INTO `ops` VALUES ('admin','admin_template','admin_main',0,1,'','','element.1=blocks:/tool/mode/theme/item/,\r\nelement.1=story:/tool/sid{5}/,\r\nelement.1=editpoll:/tool/editqid/option/,\r\nelement.1=vars:/tool/mode/item/,\r\nelement.1=topics:/tool/tid/,\r\nelement.1=sections:/tool/section/,\r\nelement.1=special:/tool/id/,\r\nelement.1=boxes:/tool/id,\r\nelement.1=optemplates:/tool/opcode,\r\nelement.1=groups:/tool/perm_group_id/,\r\nelement.1=rdf:/tool/action/,\r\nelement.1=cron:/tool/action/which/,\r\nelement.1=ads:/tool/type/which,\r\nelement.1=ops:/tool/opcode/,\r\nelement.1=macros:/tool/mode/item/item,\r\nelement.1=storylist:/tool/,\r\nelement.1=archivelist:/tool/,\r\nelement.1=hooks:/tool/,\r\nelement.1=listpolls:/tool/,\r\nelement.1=log:/tool/log_type/page/log_id/,\r\nelement.1=calendar:/tool/item,\n/tool/','Entry point to the various admin tools.');
INSERT INTO `ops` VALUES ('displaystory','story_template','focus_view',0,1,'','story','length=6:/mode/sid{5}/,\n/sid{5}/','Formats and shows a story according to the params.');
INSERT INTO `ops` VALUES ('view_poll','default_template','poll_focus_view',0,1,'','viewpoll poll','/qid/','Displays a poll or the results of one.');
INSERT INTO `ops` VALUES ('poll_list','default_template','poll_listing',0,1,'','','','Gives a list of all the polls that have been created');
INSERT INTO `ops` VALUES ('comments','default_template','comment_dig',0,1,'','comment','element.1=poll:/null/sid/cid/tool/,\nlength=2:/sid/cid/,\nlength=3:/sid/cid/tool/,\n/sid{5}/cid/tool/','Displays comments in various formats.');
INSERT INTO `ops` VALUES ('newuser','default_template','new_user',0,1,'','','/tool/','Starts the process of creating a new user.');
INSERT INTO `ops` VALUES ('special','default_template','special',0,1,'','','EVAL{\r\n  my $caller = $S->cgi->param(\'caller_op\');\r\n  my $p = {};\r\n  $p->{op}  = \'special\';\r\n  \r\n  if ($caller eq \'special\') {\r\n	$p->{page} = $path[0];\r\n  } else {\r\n    $p->{page} = $caller;\r\n  }\r\n  \r\n  return $p\r\n}','Displays special pages.');
INSERT INTO `ops` VALUES ('olderlist','default_template','olderlist',0,1,'','','','Gives a listing of older stories.');
INSERT INTO `ops` VALUES ('search','default_template','search',0,1,'','find','length=2:/type/string/,\n/string/','Everything related to searching content on the site.');
INSERT INTO `ops` VALUES ('user','default_template','edit_user',0,1,'','whois my ~.+','EVAL{\r\n  my $p = {};\r\n  if ($S->cgi->param(\'caller_op\') eq \'my\') {\r\n    unshift @path__COMMA__ $S->{NICK};\r\n  } elsif ($S->cgi->param(\'caller_op\') =~ m/^~(.+)$/) {\r\n    unshift @path__COMMA__ $1;\r\n  }\r\n  my $uid;\r\n  if ($path[0] =~ /uid:/) {\r\n    $path[0] =~ s/^uid://;\r\n    $uid = $path[0];\r\n    $path[0] = $S->get_nick_from_uid($uid);\r\n  } else {\r\n    $uid=$S->get_uid_from_nick($path[0]); \r\n  }\r\n  if ($path[1] eq \'edit\') { $path[1] = \'prefs\' }\r\n  if ($path[1] eq \'diary\') {\r\n    $p = {\r\n      op      => \'section\'__COMMA__\r\n      user    => \"$path[0]\"__COMMA__\r\n      section => \'Diary\'__COMMA__\r\n      page    => $path[2]\r\n    };\r\n  } elsif ($path[1] =~ /comment/) {\r\n    $p->{op}      = \'search\';\r\n    $p->{type}    = \'comment_by\';\r\n    $p->{string}  = $path[0];\r\n  } elsif ($path[1] eq \'ads\') {\r\n    $p->{op}      = \'adinfo\';\r\n    $p->{ad_id}   = \"uid:$uid\";\r\n  } elsif ($path[1] eq \'stories\' || $path[1] eq \'story\') {\r\n    $p->{op}      = \'search\';\r\n    $p->{type}    = \'author\';\r\n    $p->{string}  = $path[0];\r\n    } elsif ($path[1] eq \'calendar\') {\n    $p->{op}      = \'calendar\';\n    $p->{view}    = $path[2] || $S->pref(\'calendar_view\');\n    $p->{uid}     = $uid;\n    $p->{date}    = $path[4];\n  } else {\n$p->{op}      = \'user\';\n    $p->{action}  = $path[2];\r\n    $p->{tool}    = $path[1];\r\n    $p->{nick}    = $path[0];\r\n    $p->{uid}     = $uid;\r\n  }\r\n  return $p;\r\n}','Display and edit registered users.');
INSERT INTO `ops` VALUES ('section','index_template','main_page',0,1,'','','/section/page/','Lists the stories, with intros, that are in a specified section.');
INSERT INTO `ops` VALUES ('logout','blank_template','logout_box',1,1,'','','','Logs the user out and removes their session.');
INSERT INTO `ops` VALUES ('default','index_template',NULL,0,1,'','','','The template used when no other is known. \'main\' is actually the default op');
INSERT INTO `ops` VALUES ('submitrdf','default_template','submit_rdf',1,1,'','','','Walks the user through submitting an RDF feed.');
INSERT INTO `ops` VALUES ('cron','cron_template','cron',0,1,'','','','Run waiting cron jobs.');
INSERT INTO `ops` VALUES ('showad','ad_test_template',NULL,0,1,'','','/ad_id/','Displays a single advertisment.');
INSERT INTO `ops` VALUES ('submitad','submit_template','choose_submit_ad_step',0,1,'','','/step/','Start the process of submitting an ad.');
INSERT INTO `ops` VALUES ('redirect','','redirect',0,1,'','','/ad_id/','Does ad redirections to other sites, with logging.');
INSERT INTO `ops` VALUES ('adinfo','default_template','ad_info_page',0,1,'','','/ad_id/','Displays everything related to an ad.');
INSERT INTO `ops` VALUES ('ads','default_template','buyimpressions_box',1,1,'','','/distribute','Used for purchasing ad impressions.');
INSERT INTO `ops` VALUES ('hotlist','',NULL,0,1,'','','/tool/sid{5}/new_op/page/section/','Edits a user\'s story hotlist.');
INSERT INTO `ops` VALUES ('renew','default_template','renewad_box',1,1,'','','','Used to renew ads that are already running.');
INSERT INTO `ops` VALUES ('dynamic','dynamic_template','comment_dig',0,1,'','','','Same as comments, except is used for dynamic comment mode.');
INSERT INTO `ops` VALUES ('subscribe','subscribe_template','subscribe',0,1,'','','','Function for users to purchase a subscription');
INSERT INTO `ops` VALUES ('subpay','subscribe_template','subpay_type_select',1,1,'','','','');
INSERT INTO `ops` VALUES ('css','content_only_page_template','css',1,1,'','','/file/','Returns a block of CSS with the correct file type.');
INSERT INTO `ops` VALUES ('calendar','default_template','display_calendar',0,1,'','','/view/calendar/date/','monthly, weekly, daily calendar view');
INSERT INTO `ops` VALUES ('editcalendar','default_template','edit_calendar',0,1,'edit_own_calendar','','/tool/id/action/eid/','interface for managing calendars');
INSERT INTO `ops` VALUES ('event','default_template','display_event',0,1,'','','/eid/','displays a single event');
INSERT INTO `ops` VALUES ('eventsearch','default_template','event_search',0,1,'','','','event search (should one day get rolled in with all the other search stuff)');
INSERT INTO `ops` VALUES ('submitevent','default_template','submit_event',0,1,'submit_event','','/tool/id/','submit/edit an event');
INSERT INTO `ops` VALUES ('activate','default_template','activate',1,1,'','','/key/','');
INSERT INTO `ops` VALUES ('iplookup','default_template','iplookup',1,1,'edit_user','','/iplook/','');
INSERT INTO `ops` VALUES ('tag','tag_template','show_storiesbytag',0,1,'','tags','/tag/page/','Lists the stories, with intros, that are in a specified tag');
INSERT INTO `ops` VALUES ('addtag','default_template','addtag',1,1,'comment_post','','/sid{5}/','');
INSERT INTO `ops` VALUES ('tagsort','content_only_page_template','tag_page_order',1,1,'','','/switch/','');
UNLOCK TABLES;
/*!40000 ALTER TABLE `ops` ENABLE KEYS */;

--
-- Table structure for table `patches`
--

DROP TABLE IF EXISTS `patches`;
CREATE TABLE `patches` (
  `scoop_ver` varchar(20) NOT NULL default '',
  `patch_num` int(2) NOT NULL default '0',
  `patch_name` varchar(30) default NULL,
  `patch_type` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`scoop_ver`,`patch_num`,`patch_type`)
) TYPE=MyISAM;

--
-- Dumping data for table `patches`
--


/*!40000 ALTER TABLE `patches` DISABLE KEYS */;
LOCK TABLES `patches` WRITE;
INSERT INTO `patches` VALUES ('0_7-dev',0,'Upgrades','sql');
INSERT INTO `patches` VALUES ('0_7-dev',1,'SiteControls','sql');
INSERT INTO `patches` VALUES ('0_7-dev',2,'RDF','sql');
INSERT INTO `patches` VALUES ('0_7-dev',3,'StickySig','sql');
INSERT INTO `patches` VALUES ('0_7-dev',4,'NewHotlist','sql');
INSERT INTO `patches` VALUES ('0_7-dev',4,NULL,'post');
INSERT INTO `patches` VALUES ('0_7-dev',5,'RDFChanges','sql');
INSERT INTO `patches` VALUES ('0_7-dev',6,'AdminNotes','sql');
INSERT INTO `patches` VALUES ('0_7-dev',7,'AllowedHTML','sql');
INSERT INTO `patches` VALUES ('0_7-dev',8,'StickySig2','sql');
INSERT INTO `patches` VALUES ('0_7-dev',9,'RDFupdate','sql');
INSERT INTO `patches` VALUES ('0_7-dev',10,'RatingTimes','sql');
INSERT INTO `patches` VALUES ('0_7-dev',11,'UserSecure','sql');
INSERT INTO `patches` VALUES ('0_7-dev',12,'SectionPerms','sql');
INSERT INTO `patches` VALUES ('0_7-dev',12,NULL,'post');
INSERT INTO `patches` VALUES ('0_7-dev',13,'Cron','sql');
INSERT INTO `patches` VALUES ('0_7-dev',13,NULL,'post');
INSERT INTO `patches` VALUES ('0_7-dev',14,'SectionPages','sql');
INSERT INTO `patches` VALUES ('0_7-dev',15,'NewAccountLimit','sql');
INSERT INTO `patches` VALUES ('0_7-dev',16,'NewURLs','sql');
INSERT INTO `patches` VALUES ('0_7-dev',17,'NewSections','sql');
INSERT INTO `patches` VALUES ('0_7-dev',17,NULL,'post');
INSERT INTO `patches` VALUES ('0_7-dev',18,'Index-Changes','sql');
INSERT INTO `patches` VALUES ('0_7-dev',19,'Subscriptions','sql');
INSERT INTO `patches` VALUES ('0_7-dev',20,'CommentControl','sql');
INSERT INTO `patches` VALUES ('0_7-dev',21,'StorySection','sql');
INSERT INTO `patches` VALUES ('0_7-dev',22,'PollPerms','sql');
INSERT INTO `patches` VALUES ('0_7-dev',23,'LastSectionStuff','sql');
INSERT INTO `patches` VALUES ('0_7-dev',24,'NewURLs2','sql');
INSERT INTO `patches` VALUES ('0_7-dev',25,'StoryEmail','sql');
INSERT INTO `patches` VALUES ('0_7-dev',26,'ConfirmPass','sql');
INSERT INTO `patches` VALUES ('0_9-dev',1,'StaticPageCache','sql');
INSERT INTO `patches` VALUES ('0_9-dev',2,'UserBoxPrefs','sql');
INSERT INTO `patches` VALUES ('0_9-dev',3,'HTMLandSpelling','sql');
INSERT INTO `patches` VALUES ('0_9-dev',4,'AdPatch1','sql');
INSERT INTO `patches` VALUES ('0_9-dev',5,'WipeRatings','sql');
INSERT INTO `patches` VALUES ('0_9-dev',6,'SomeVars','sql');
INSERT INTO `patches` VALUES ('0_9-dev',7,'ResetBoxPrefs','sql');
INSERT INTO `patches` VALUES ('0_9-dev',8,'AdPatch2','sql');
INSERT INTO `patches` VALUES ('0_9-dev',9,'AdPatch3','sql');
INSERT INTO `patches` VALUES ('0_9-dev',10,'24hTime','sql');
INSERT INTO `patches` VALUES ('0_9-dev',11,'OpsPerms','sql');
INSERT INTO `patches` VALUES ('0_9-dev',12,'AdPatch4','sql');
INSERT INTO `patches` VALUES ('0_9-dev',12,NULL,'post');
INSERT INTO `patches` VALUES ('0_9-dev',13,'OpAliases','sql');
INSERT INTO `patches` VALUES ('0_9-dev',13,NULL,'post');
INSERT INTO `patches` VALUES ('0_9-dev',14,'Formkeys','sql');
INSERT INTO `patches` VALUES ('0_9-dev',15,'AdPatch5','sql');
INSERT INTO `patches` VALUES ('0_9-dev',16,'AdPatch6','sql');
INSERT INTO `patches` VALUES ('0_9-dev',17,'AdPatch7','sql');
INSERT INTO `patches` VALUES ('0_9-dev',18,'NotifyAuthor','sql');
INSERT INTO `patches` VALUES ('0_9-dev',19,'AutoPostVars','sql');
INSERT INTO `patches` VALUES ('0_9-dev',20,'AutoPostTimeBasedVars','sql');
INSERT INTO `patches` VALUES ('0_9-dev',21,'AdPosition','sql');
INSERT INTO `patches` VALUES ('0_9-dev',22,'RelatedLinks','sql');
INSERT INTO `patches` VALUES ('0_9-dev',23,'AdDiscussions','sql');
INSERT INTO `patches` VALUES ('0_9-dev',24,'MoreSpelChek','sql');
INSERT INTO `patches` VALUES ('0_9-dev',25,'CommentIPlog','sql');
INSERT INTO `patches` VALUES ('0_9-dev',26,'SubSections','sql');
INSERT INTO `patches` VALUES ('0_9-dev',27,'MojoIgnoreDiaries','sql');
INSERT INTO `patches` VALUES ('0_9-dev',28,'EditQueue','sql');
INSERT INTO `patches` VALUES ('0_9-dev',29,'AdRenewal','sql');
INSERT INTO `patches` VALUES ('0_9-dev',30,'Dynamic','sql');
INSERT INTO `patches` VALUES ('0_9-dev',31,'AdPayment','sql');
INSERT INTO `patches` VALUES ('0_9-dev',32,'Dynamic2','sql');
INSERT INTO `patches` VALUES ('0_9-dev',33,'Dynamic3','sql');
INSERT INTO `patches` VALUES ('0_9-dev',34,'AutoFormat','sql');
INSERT INTO `patches` VALUES ('0_9-dev',35,'OpsAdminTools','sql');
INSERT INTO `patches` VALUES ('0_9-dev',35,NULL,'post');
INSERT INTO `patches` VALUES ('0_9-dev',36,'BlockCat','sql');
INSERT INTO `patches` VALUES ('0_9-dev',36,NULL,'post');
INSERT INTO `patches` VALUES ('0_9-dev',37,'MoreEditQueue','sql');
INSERT INTO `patches` VALUES ('0_9-dev',38,'Interpolate','sql');
INSERT INTO `patches` VALUES ('0_9-dev',39,'BarsBlock','sql');
INSERT INTO `patches` VALUES ('0_9-dev',40,'LogoutBox','sql');
INSERT INTO `patches` VALUES ('0_9-dev',41,'Subscriptions','sql');
INSERT INTO `patches` VALUES ('0_9-dev',42,'NewCache','sql');
INSERT INTO `patches` VALUES ('0_9-dev',43,'Dynamic4','sql');
INSERT INTO `patches` VALUES ('0_9-dev',44,'EditQueue3','sql');
INSERT INTO `patches` VALUES ('0_9-dev',44,NULL,'post');
INSERT INTO `patches` VALUES ('0_9-dev',45,'Hooks','sql');
INSERT INTO `patches` VALUES ('0_9-dev',46,'DefaultUser','sql');
INSERT INTO `patches` VALUES ('0_9-dev',47,'PollBox','sql');
INSERT INTO `patches` VALUES ('1_0-dev',1,'EditCategory','sql');
INSERT INTO `patches` VALUES ('1_0-dev',1,NULL,'post');
INSERT INTO `patches` VALUES ('0_9-dev',47,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',2,'HtmlRemoval','sql');
INSERT INTO `patches` VALUES ('1_0-dev',3,'Uploads','sql');
INSERT INTO `patches` VALUES ('1_0-dev',5,'AccountCreation','sql');
INSERT INTO `patches` VALUES ('1_0-dev',5,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',4,'StoryPreview','sql');
INSERT INTO `patches` VALUES ('1_0-dev',6,'Logging','sql');
INSERT INTO `patches` VALUES ('1_0-dev',6,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',7,'Themes','sql');
INSERT INTO `patches` VALUES ('1_0-dev',7,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',8,'Archive','sql');
INSERT INTO `patches` VALUES ('1_0-dev',8,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',9,'Themes2','sql');
INSERT INTO `patches` VALUES ('1_0-dev',10,'VarCleanup','sql');
INSERT INTO `patches` VALUES ('1_0-dev',11,'ExcludeSection','sql');
INSERT INTO `patches` VALUES ('1_0-dev',12,'TopicImagesDefault','sql');
INSERT INTO `patches` VALUES ('1_0-dev',13,'FastArchive','sql');
INSERT INTO `patches` VALUES ('1_0-dev',14,'ManyChanges','sql');
INSERT INTO `patches` VALUES ('1_0-dev',14,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',15,'RatingIP','sql');
INSERT INTO `patches` VALUES ('1_0-dev',16,'SafeMode','sql');
INSERT INTO `patches` VALUES ('1_0-dev',17,'OpTemplates','sql');
INSERT INTO `patches` VALUES ('1_0-dev',18,'AdPayOptions','sql');
INSERT INTO `patches` VALUES ('1_0-dev',19,'WhosOnline','sql');
INSERT INTO `patches` VALUES ('1_0-dev',20,'OpToBlock','sql');
INSERT INTO `patches` VALUES ('1_0-dev',21,'MoreChanges','sql');
INSERT INTO `patches` VALUES ('1_0-dev',21,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',22,'HideAllowedHTML','sql');
INSERT INTO `patches` VALUES ('1_0-dev',23,'StoryEdit','sql');
INSERT INTO `patches` VALUES ('1_0-dev',24,'Macros','sql');
INSERT INTO `patches` VALUES ('1_0-dev',24,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',25,'DiaryTopics','sql');
INSERT INTO `patches` VALUES ('1_0-dev',25,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',26,'EditQueueCron','sql');
INSERT INTO `patches` VALUES ('1_0-dev',27,'NewUserHtml','sql');
INSERT INTO `patches` VALUES ('1_0-dev',28,'AdRenewal','sql');
INSERT INTO `patches` VALUES ('1_0-dev',29,'RelatedLinks','sql');
INSERT INTO `patches` VALUES ('1_0-dev',30,'BlockDesc','sql');
INSERT INTO `patches` VALUES ('1_0-dev',31,'PaymentFixes','sql');
INSERT INTO `patches` VALUES ('1_0-dev',31,NULL,'post');
INSERT INTO `patches` VALUES ('1_0-dev',32,'SafeModeRedirect','sql');
INSERT INTO `patches` VALUES ('1_0-dev',33,'AdminSearch','sql');
INSERT INTO `patches` VALUES ('1_0-dev',34,'BugFixes','sql');
INSERT INTO `patches` VALUES ('1_0-dev',35,'Email','sql');
INSERT INTO `patches` VALUES ('1_0-dev',36,'BoxError','sql');
INSERT INTO `patches` VALUES ('1_0-dev',37,'Cleanup','sql');
INSERT INTO `patches` VALUES ('1_0-dev',37,NULL,'post');
INSERT INTO `patches` VALUES ('1_1-dev',1,'MultiPolls','sql');
INSERT INTO `patches` VALUES ('1_1-dev',2,'Sessions','sql');
INSERT INTO `patches` VALUES ('1_1-dev',3,'CommentPost','sql');
INSERT INTO `patches` VALUES ('1_1-dev',4,NULL,'pre');
INSERT INTO `patches` VALUES ('1_1-dev',4,'UserPrefs','sql');
INSERT INTO `patches` VALUES ('1_1-dev',4,NULL,'post');
INSERT INTO `patches` VALUES ('1_1-dev',5,'UserPrefs2','sql');
INSERT INTO `patches` VALUES ('1_1-dev',5,NULL,'post');
INSERT INTO `patches` VALUES ('1_1-dev',6,'UserPrefs3','sql');
INSERT INTO `patches` VALUES ('1_1-dev',6,NULL,'post');
INSERT INTO `patches` VALUES ('1_1-dev',7,'SpecialPage','sql');
INSERT INTO `patches` VALUES ('1_1-dev',8,'Calendar','sql');
INSERT INTO `patches` VALUES ('1_1-dev',8,NULL,'post');
INSERT INTO `patches` VALUES ('1_1-dev',9,'Diary','sql');
INSERT INTO `patches` VALUES ('1_1-dev',9,NULL,'post');
INSERT INTO `patches` VALUES ('1_1-dev',10,'CalendarUpdates','sql');
INSERT INTO `patches` VALUES ('1_1-dev',11,'SignupWithPass','sql');
INSERT INTO `patches` VALUES ('1_1-dev',12,'RemoveComments','sql');
INSERT INTO `patches` VALUES ('1_1-dev',13,'RemoveForumZilla','sql');
INSERT INTO `patches` VALUES ('1_1-dev',14,'PostThrottle','sql');
INSERT INTO `patches` VALUES ('1_1-dev',15,'StoryForm','sql');
INSERT INTO `patches` VALUES ('1_1-dev',16,'MacroPerms','sql');
INSERT INTO `patches` VALUES ('1_1-dev',16,NULL,'post');
INSERT INTO `patches` VALUES ('1_1-dev',17,'NavBar','sql');
INSERT INTO `patches` VALUES ('1_1-dev',18,'EditorialComment','sql');
INSERT INTO `patches` VALUES ('1_1-dev',19,'StoryVoteMessage','sql');
INSERT INTO `patches` VALUES ('1_1-dev',20,'StoryPosting','sql');
INSERT INTO `patches` VALUES ('1_1-dev',21,'Tags','sql');
INSERT INTO `patches` VALUES ('1_1-dev',22,'SharedDB','sql');
INSERT INTO `patches` VALUES ('1_1-dev',23,'MinMax','sql');
INSERT INTO `patches` VALUES ('1_1-dev',24,'CommentFixes','sql');
INSERT INTO `patches` VALUES ('1_1-dev',25,'UserFile','sql');
INSERT INTO `patches` VALUES ('1_1-dev',26,'UserMenu','sql');
INSERT INTO `patches` VALUES ('1_1-dev',27,'SpecialAdmin','sql');
INSERT INTO `patches` VALUES ('1_1-dev',28,'RequireTags','sql');
INSERT INTO `patches` VALUES ('1_1-dev',29,'TUPerms','sql');
INSERT INTO `patches` VALUES ('1_1-dev',30,'TagEnhancements','sql');
INSERT INTO `patches` VALUES ('1_1-dev',31,'TagPermUpdate','sql');
INSERT INTO `patches` VALUES ('1_2-dev',1,'DynamicFix','sql');
INSERT INTO `patches` VALUES ('1_2-dev',2,'RadioRatings','sql');
UNLOCK TABLES;
/*!40000 ALTER TABLE `patches` ENABLE KEYS */;

--
-- Table structure for table `perm_groups`
--

DROP TABLE IF EXISTS `perm_groups`;
CREATE TABLE `perm_groups` (
  `perm_group_id` varchar(50) NOT NULL default '',
  `group_perms` text,
  `default_user_group` int(1) default '0',
  `group_description` text,
  PRIMARY KEY  (`perm_group_id`)
) TYPE=MyISAM;

--
-- Dumping data for table `perm_groups`
--


/*!40000 ALTER TABLE `perm_groups` DISABLE KEYS */;
LOCK TABLES `perm_groups` WRITE;
INSERT INTO `perm_groups` VALUES ('Anonymous','comment_post,poll_vote,story_post,poll_post_comments,poll_read_comments,view_polls',0,'Anonymous users');
INSERT INTO `perm_groups` VALUES ('Users','attach_poll,comment_post,comment_rate,moderate,poll_post_comments,poll_read_comments,poll_vote,story_post,submit_ad,submit_rdf,view_polls,use_spellcheck,editorial_comments,submit_event,update_own_event,edit_own_calendar,view_user_files',1,'Normal users. This should be the default perm level probably.');
INSERT INTO `perm_groups` VALUES ('Editors','attach_poll,comment_post,comment_rate,edit_polls,edit_special,list_polls,moderate,poll_post_comments,poll_read_comments,poll_vote,story_admin,story_list,story_post,submit_ad,submit_rdf,view_polls,use_spellcheck,editorial_comments,view_log,ad_opt_out,edit_prefs,edit_events,edit_calendars,submit_event,update_own_event,edit_own_calendar,view_user_files,evade_intro_limits,edit_story_tags',0,'Editorial administrators');
INSERT INTO `perm_groups` VALUES ('Admins','ad_admin,attach_poll,comment_delete,comment_post,comment_rate,edit_blocks,edit_macros,edit_polls,edit_sections,edit_special,edit_user,edit_vars,editorial_comments,list_polls,moderate,poll_post_comments,poll_read_comments,poll_vote,rdf_admin,story_admin,story_list,story_post,submit_ad,upload_admin,use_spellcheck,view_comment_ip,view_log,view_polls,admin_search,ad_opt_out,edit_prefs,edit_events,edit_event_properties,edit_calendars,submit_event,update_own_event,edit_own_calendar,view_user_files,evade_intro_limits,edit_story_tags',0,'Site administrators and junk');
INSERT INTO `perm_groups` VALUES ('Superuser','ad_admin,attach_poll,comment_delete,comment_post,comment_rate,cron_admin,edit_blocks,edit_boxes,edit_groups,edit_hooks,edit_macros,edit_ops,edit_own_story,edit_polls,edit_sections,edit_special,edit_topics,edit_user,edit_vars,editorial_comments,hotlist,list_polls,make_new_accounts,moderate,poll_post_comments,poll_read_comments,poll_vote,rdf_admin,show_hidden_sections,story_admin,story_commentstatus_select,story_displaystatus_select,story_list,story_post,submit_ad,submit_rdf,subscription_admin,super_mojo,upload_admin,upload_content,upload_user,use_spellcheck,view_comment_ip,view_log,view_polls,bypass_safe_mode,admin_search,ad_opt_out,edit_prefs,edit_events,edit_event_properties,edit_calendars,submit_event,update_own_event,edit_own_calendar,comment_remove,comment_toggle,view_user_files,evade_intro_limits,edit_story_tags',0,'All permissions');
INSERT INTO `perm_groups` VALUES ('Advertisers','attach_poll,comment_post,comment_rate,moderate,poll_post_comments,poll_read_comments,poll_vote,story_post,submit_ads,submit_rdf,view_polls,submit_ad,use_spellcheck,editorial_comments,view_user_files',0,'Advertiser group, these people should be able to submit ads.');
UNLOCK TABLES;
/*!40000 ALTER TABLE `perm_groups` ENABLE KEYS */;

--
-- Table structure for table `pollanswers`
--

DROP TABLE IF EXISTS `pollanswers`;
CREATE TABLE `pollanswers` (
  `qid` varchar(20) NOT NULL default '',
  `aid` int(11) NOT NULL default '0',
  `answer` varchar(255) default NULL,
  `votes` int(11) default NULL,
  PRIMARY KEY  (`qid`,`aid`)
) TYPE=MyISAM;

--
-- Dumping data for table `pollanswers`
--


/*!40000 ALTER TABLE `pollanswers` DISABLE KEYS */;
LOCK TABLES `pollanswers` WRITE;
INSERT INTO `pollanswers` VALUES ('1079158272_OOvrSGzI',1,'Yes',0);
INSERT INTO `pollanswers` VALUES ('967438565_opsmxIVg',1,'Scoop',0);
INSERT INTO `pollanswers` VALUES ('967438565_opsmxIVg',2,'Slash',0);
INSERT INTO `pollanswers` VALUES ('967438565_opsmxIVg',3,'Squishdot',0);
INSERT INTO `pollanswers` VALUES ('967438565_opsmxIVg',4,'PHPSlash',0);
INSERT INTO `pollanswers` VALUES ('967438565_opsmxIVg',5,'Wiki',1);
INSERT INTO `pollanswers` VALUES ('967438565_opsmxIVg',6,'That homebrew stuff I wrote',0);
INSERT INTO `pollanswers` VALUES ('1079158272_OOvrSGzI',2,'No',0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `pollanswers` ENABLE KEYS */;

--
-- Table structure for table `pollquestions`
--

DROP TABLE IF EXISTS `pollquestions`;
CREATE TABLE `pollquestions` (
  `qid` varchar(20) NOT NULL default '',
  `question` varchar(255) NOT NULL default '',
  `voters` int(11) default NULL,
  `post_date` datetime default NULL,
  `archived` int(1) default '0',
  `is_multiple_choice` int(1) default '0',
  PRIMARY KEY  (`qid`)
) TYPE=MyISAM;

--
-- Dumping data for table `pollquestions`
--


/*!40000 ALTER TABLE `pollquestions` DISABLE KEYS */;
LOCK TABLES `pollquestions` WRITE;
INSERT INTO `pollquestions` VALUES ('1079158272_OOvrSGzI','Was it easy to install?',0,'2004-03-12 22:21:15',0,0);
INSERT INTO `pollquestions` VALUES ('967438565_opsmxIVg','What\'s your favorite weblog app?',1,'2004-03-12 21:56:07',0,0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `pollquestions` ENABLE KEYS */;

--
-- Table structure for table `pollvoters`
--

DROP TABLE IF EXISTS `pollvoters`;
CREATE TABLE `pollvoters` (
  `qid` varchar(20) NOT NULL default '',
  `id` varchar(35) NOT NULL default '',
  `time` datetime default NULL,
  `uid` int(11) NOT NULL default '-1',
  `user_ip` varchar(15) NOT NULL default '',
  KEY `qid` (`qid`,`id`,`uid`)
) TYPE=MyISAM;

--
-- Dumping data for table `pollvoters`
--


/*!40000 ALTER TABLE `pollvoters` DISABLE KEYS */;
LOCK TABLES `pollvoters` WRITE;
INSERT INTO `pollvoters` VALUES ('967438565_opsmxIVg','scoop','2000-08-28 00:57:28',1,'127.0.0.1');
INSERT INTO `pollvoters` VALUES ('967438565_opsmxIVg','anon','2004-03-13 10:16:25',-1,'24.192.217.112');
UNLOCK TABLES;
/*!40000 ALTER TABLE `pollvoters` ENABLE KEYS */;

--
-- Table structure for table `post_throttle`
--

DROP TABLE IF EXISTS `post_throttle`;
CREATE TABLE `post_throttle` (
  `uid` int(11) NOT NULL default '0',
  `created_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `post_lock` int(1) NOT NULL default '0',
  `lock_timeout` int(11) NOT NULL default '0',
  PRIMARY KEY  (`uid`)
) TYPE=MyISAM;

--
-- Dumping data for table `post_throttle`
--


/*!40000 ALTER TABLE `post_throttle` DISABLE KEYS */;
LOCK TABLES `post_throttle` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `post_throttle` ENABLE KEYS */;

--
-- Table structure for table `pref_items`
--

DROP TABLE IF EXISTS `pref_items`;
CREATE TABLE `pref_items` (
  `prefname` varchar(32) NOT NULL default '',
  `title` varchar(50) NOT NULL default '',
  `description` text,
  `visible` int(1) default '0',
  `html` int(1) default '0',
  `perm_view` varchar(32) default NULL,
  `perm_edit` varchar(32) default NULL,
  `var` varchar(32) default NULL,
  `req_tu` int(1) default '0',
  `default_value` text,
  `length` int(5) default NULL,
  `regex` text,
  `page` varchar(50) default NULL,
  `field` text,
  `display_order` int(5) default NULL,
  `template` varchar(30) default NULL,
  `display_fmt` text,
  `enabled` int(1) default '1',
  `signup` varchar(9) default NULL,
  PRIMARY KEY  (`prefname`),
  KEY `page_idx` (`page`)
) TYPE=MyISAM;

--
-- Dumping data for table `pref_items`
--


/*!40000 ALTER TABLE `pref_items` DISABLE KEYS */;
LOCK TABLES `pref_items` WRITE;
INSERT INTO `pref_items` VALUES ('admin_notes','Admin Notes','Information about the user that only site administrators can see',1,1,'edit_user','edit_user','allow_admin_notes',0,'',0,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" NAME=\"admin_notes\" WRAP=\"soft\">%%value%%</textarea>',3,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('fakeemail','Email','This is the address that will be displayed in comments and in your user info. It will not be used to email forgotten passwords. You may want to add some kind of spam protection so that harvesters cannot parse it.',1,0,'','','',0,'',50,'','User Info','<input TYPE=\"text\" SIZE=\"50\" NAME=\"fakeemail\" VALUE=\"%%value%%\">',5,'text_pref','<A href=\"mailto:%%value%%\">%%value%%</A>',1,'normal');
INSERT INTO `pref_items` VALUES ('homepage','Homepage','If you have a homepage, enter the address here and it will be added to your comments and user info. The full path is required: remember the \"http://\"!',1,0,'','','',0,'',100,'^http','User Info','<input TYPE=\"text\" SIZE=\"50\" NAME=\"homepage\" VALUE=\"%%value%%\">',6,'text_pref','<A href=\"%%value%%\">%%value%%</A>',1,'normal');
INSERT INTO `pref_items` VALUES ('bio','Bio','Enter any kind of biographical information you want other users to see about yourself here.',1,1,'','','',0,'',255,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" WRAP=\"soft\" NAME=\"bio\">%%value%%</textarea>',7,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('publickey','Public Key','If you have a PGP/GPG public key (used for encrypting and signing email), paste it in here.',1,0,'','','',0,'',0,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" NAME=\"publickey\">%%value%%</textarea>',8,'text_pref','<pre>%%value%%</pre>',1,'normal');
INSERT INTO `pref_items` VALUES ('upload_user_quota','Disk Quota','The maximum amount of space this user can take up with his uploaded files (in kb)',0,0,'','edit_user','allow_uploads',0,'0',0,'\\d+','Interface','<INPUT type=\"text\" name=\"upload_user_quota\" value=\"%%value%%\" size=\"5\">',0,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('upload_max_file_size','Max File Size','The maximum size a single file can be (in kb)',0,0,'','edit_user','allow_uploads',0,'0',0,'\\d+','Interface','<INPUT type=\"text\" name=\"upload_max_file_size\" value=\"%%value%%\" size=\"5\">',0,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('digest','Story Digest','Story headlines and intros can be emailed to you at your real email address on the schedule you choose.',0,0,'','','enable_story_digests',0,'Never',10,'(Never|Daily|Weekly|Monthly)','Interface','%%BOX,pref_selectbox,digest,%%value%%,Never,Daily,Weekly,Monthly%%',1,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('time_zone','Your Time Zone','Setting your (non-daylight savings) time zone here will make the site display all times and dates in your local time',0,0,'','','',0,'EST',4,'[a-zA-z]+','Interface','%%BOX,time_zone_pref,%%value%%%%',2,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('maxstories','Number of story summaries to show','(on front page)',0,0,'','','',0,'8',3,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"maxstories\" value=\"%%value%%\">',3,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('maxtitles','Number of story titles to show','(in \"older stories\" box)',0,0,'','','',0,'10',3,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"maxtitles\" value=\"%%value%%\">',4,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('textarea_cols','Text box width','This allows you to set how big of a text box you have to type stories and comments into.',0,0,'','','',0,'50',4,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"textarea_cols\" value=\"%%value%%\">',5,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('textarea_rows','Text box height','This allows you to set how big of a text box you have to type stories and comments into.',0,0,'','','',0,'15',4,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"textarea_rows\" value=\"%%value%%\">',6,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('norm_font_face','Font Face','',0,0,'','','',0,'verdana, arial, helvetica, sans-serif',0,'[a-zA-z,\\s]','Interface','<input type=\"text\" size=\"30\" name=\"norm_font_face\" value=\"%%value%%\" />',7,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('norm_font_size','Font Size','',0,0,'','','',0,'2',5,'\\w+','Interface','<input type=\"text\" size=\"5\" name=\"norm_font_size\" value=\"%%value%%\">',8,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('showad','Show ads','',0,0,'','ad_opt_out','use_ads',0,'All',16,'^(on|off)$','Interface','%%BOX,pref_checkbox,showad,%%value%%%%',9,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('ad_open_new_win','Open advertisement clicks in new window','',0,0,'','','use_ads',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,ad_open_new_win,%%value%%%%',10,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('show_topic','Show topic images with stories','',0,0,'','','use_topics',0,'on',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,show_topic,%%value%%%%',11,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('start_page','Start page','',0,0,'','','',0,'__main__',0,'BOX,startpage_validation','Interface','%%BOX,startpage_pref,%%value%%%%',12,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('online_cloak','Hide yourself in the Who\'s Online box','',0,0,'','','use_whosonline',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,online_cloak,%%value%%%%',13,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('dynamic_interface','Use dynamic interface elements','This turns on javascript-driven items such as dynamic comment mode',0,0,'','','allow_dynamic_comment_mode',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,dynamic_interface,%%value%%%%',14,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('spellcheck_default','Spellcheck posts by default','',0,0,'','use_spellcheck','spellcheck_enabled',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,spellcheck_default,%%value%%%%',15,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('speling','Spelling variant','',0,0,'','use_spellcheck','spellcheck_enabled',0,'american',8,'(American|Canadian|British)','Interface','%%BOX,pref_selectbox,speling,%%value%%,American,Canadian,British%%',16,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('imagedir','Preferred image server','Choose an image server closest to you for the quickest page load times',0,0,'','','use_alt_image_servers',0,'/images',0,'','Interface','%%BOX,img_server_pref,%%value%%%%',17,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('theme','Use which theme','',0,0,'','','allow_user_themes',0,'',0,'\\w+','Interface','%%BOX,user_theme_pref,%%value%%%%',18,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('cookie_expire','Cookie Expiry','How long does your login cookie last?',0,0,'','','',0,'2592000',0,'','Interface','%%BOX,cookie_expire_pref,%%value%%%%',19,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('displayed_boxes','Boxes','',0,0,'','','',0,'hotlist_box,poll_box,rdf_feeds,whos_online',0,'','Interface','%%BOX,box_pref,%%value%%%%',20,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('max_rdf_titles','Maximum headlines per feed','',0,0,'','','use_rdf_feeds',0,'15',2,'\\d+','Interface','<input type=\"text\" name=\"max_rdf_titles\" value=\"%%value%%\" size=\"5\">',21,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('rdf_feeds','External Feeds','[<a href=\"%%rootdir%%/submitrdf\">Submit New Feed</A>]',0,0,'','','use_rdf_feeds',0,'',0,'','Interface','%%BOX,rdf_pref,%%value%%%%',22,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('commentmode','Comment display mode','',0,0,'','','',0,'threaded',0,'(use_overflow|minimal|dminimal|threaded|dthreaded|nested|flat|flat_unthread)','Comments','%%BOX,commentmode_pref,%%value%%%%',1,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('commentmode_overflow_at','Change to overflow mode at','',0,0,'','','',0,'200',0,'\\d+','Comments','<input type=\"text\" size=\"10\" name=\"commentmode_overflow_at\" value=\"%%value%%\">',2,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('commentmode_overflow','Comment display mode (overflow)','Comment display modes:\n<UL>\n <LI>flat (unthreaded): straight chronological order</LI>\n <LI>flat: comments and replies grouped, but not indented</LI>\n <LI>minimal: titles only, replies indented</LI>\n <LI>threaded: top-level comments expanded, all other titles only, replies indented</LI>\n <LI>nested: all comments shown in full, replies indented</LI>\n</UL>',0,0,'','','',0,'threaded',0,'(minimal|dminimal|threaded|dthreaded|nested|flat|flat_unthread)','Comments','%%BOX,commentmode_overflow_pref,%%value%%%%',3,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('commenttype','Types of comments to display','',0,0,'','','',0,'mixed',10,'(mixed|topical|editorial|all|none)','Comments','%%BOX,pref_selectbox,commenttype,%%value%%,mixed,topical,editorial,all,none%%',4,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('commentrating','Sorting based on comment ratings','',0,0,'','','use_ratings',0,'highest',15,'(unrate_highest|highest|lowest|dontcare)','Comments','%%BOX,rating_order_pref,%%value%%%%',5,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('commentorder','Sorting based on comment age','',0,0,'','','',0,'oldest',6,'(newest|oldest)','Comments','%%BOX,pref_selectbox,commentorder,%%value%%,newest,oldest%%',6,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('ratingchoice','Rate comments','',0,0,'','comment_rate','use_ratings',0,'yes',4,'(yes|no|hide)','Comments','%%BOX,pref_selectbox,ratingchoice,%%value%%,yes,no,hide%%',7,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('hidingchoice','Show hidden comments','',0,0,'','','use_ratings',1,'untilrating',11,'(yes|no|untilrating)','Comments','%%BOX,show_hidden_pref,%%value%%%%',9,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('posttype','Post mode','',0,0,'','','',0,'auto',4,'(text|html|auto)','Comments','%%BOX,postmode_pref,%%value%%%%',10,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('sig','Signature','This will get attached to your comments. Sigs are typically used for quotations or links',0,1,'','comment_post','',0,'',160,'','Comments','<textarea COLS=\"50\" ROWS=\"5\" WRAP=\"soft\" NAME=\"sig\">%%value%%</textarea>',11,'text_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('sig_behavior','Signature type','',0,0,'','comment_post','allow_sig_behavior',0,'retroactive',11,'(retroactive|sticky|none)','Comments','%%BOX,pref_selectbox,sig_behavior,%%value%%,retroactive,sticky,none%%',12,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('calendar_view','Default calendar view','When first loading a calendar, if the view is not explicitly set, this view will be used.',0,0,'','','use_calendars',0,'monthly',0,'(daily|weekly|monthly)','Interface','%%BOX,pref_selectbox,calendar_view,%%value%%,daily,weekly,monthly%%',9,'selectbox_pref','',1,'normal');
INSERT INTO `pref_items` VALUES ('tag_sort','Story tag sorting','Choose between sorting tags by popularity (count) or name (alpha)',0,0,'','','use_tags',0,'count',5,'^(alpha|count)$','Interface','%%BOX,pref_selectbox,tag_sort,%%value%%,alpha,count%%',22,'selectbox_pref','',0,'normal');
INSERT INTO `pref_items` VALUES ('rating_type','Rating Selection','',0,0,'','','',0,'radio',0,'(radio|dropdown)','Comments','%%BOX,rating_type_selectbox,%%value%%%%',8,'selectbox_pref','',1,'normal');
UNLOCK TABLES;
/*!40000 ALTER TABLE `pref_items` ENABLE KEYS */;

--
-- Table structure for table `rdf_channels`
--

DROP TABLE IF EXISTS `rdf_channels`;
CREATE TABLE `rdf_channels` (
  `rid` smallint(6) NOT NULL auto_increment,
  `rdf_link` varchar(200) NOT NULL default '',
  `link` varchar(200) default NULL,
  `title` varchar(60) default NULL,
  `description` text,
  `image_title` varchar(40) default NULL,
  `image_url` varchar(200) default NULL,
  `image_link` varchar(200) default NULL,
  `form_title` varchar(40) default NULL,
  `form_description` tinytext,
  `form_name` varchar(20) default NULL,
  `form_link` varchar(200) default NULL,
  `enabled` int(1) default '1',
  `submitted` int(1) default NULL,
  `submittor` varchar(50) default NULL,
  PRIMARY KEY  (`rid`)
) TYPE=MyISAM;

--
-- Dumping data for table `rdf_channels`
--


/*!40000 ALTER TABLE `rdf_channels` DISABLE KEYS */;
LOCK TABLES `rdf_channels` WRITE;
INSERT INTO `rdf_channels` VALUES (1,'http://www.kuro5hin.org/backend.rdf','http://www.kuro5hin.org/','kuro5hin.org','technology and culture, from the trenches','kuro5hin.org','http://www.kuro5hin.org/images/kuro5hin.png','http://www.kuro5hin.org/','Search kuro5hin.org','','string','http://www.kuro5hin.org/search/',1,0,NULL);
INSERT INTO `rdf_channels` VALUES (4,'http://freshmeat.net/backend/fm.rdf','http://freshmeat.net/','freshmeat.net','freshmeat.net maintains the Web\'s largest index of Unix and cross-platform open source software. Thousands of applications are meticulously cataloged in the freshmeat.net database, and links to new code are added daily.','freshmeat.net','http://images.freshmeat.net/button.gif','http://freshmeat.net/','Search freshmeat.net','Search freshmeat.net projects','q','http://freshmeat.net/search/',1,0,NULL);
INSERT INTO `rdf_channels` VALUES (3,'http://slashdot.org/slashdot.rdf','http://slashdot.org/','Slashdot','News for nerds, stuff that matters','Slashdot','http://images.slashdot.org/topics/topicslashdot.gif','http://slashdot.org/','Search Slashdot','Search Slashdot stories','query','http://slashdot.org/search.pl',1,0,NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `rdf_channels` ENABLE KEYS */;

--
-- Table structure for table `rdf_items`
--

DROP TABLE IF EXISTS `rdf_items`;
CREATE TABLE `rdf_items` (
  `rid` smallint(6) NOT NULL default '0',
  `idx` tinyint(4) NOT NULL default '0',
  `title` varchar(100) default NULL,
  `link` varchar(200) default NULL,
  `description` tinytext,
  PRIMARY KEY  (`rid`,`idx`)
) TYPE=MyISAM;

--
-- Dumping data for table `rdf_items`
--


/*!40000 ALTER TABLE `rdf_items` DISABLE KEYS */;
LOCK TABLES `rdf_items` WRITE;
INSERT INTO `rdf_items` VALUES (4,7,'DSPAM 2.10.0','http://freshmeat.net/releases/154227/',NULL);
INSERT INTO `rdf_items` VALUES (4,6,'TN5250j 0.5.7','http://freshmeat.net/releases/154228/',NULL);
INSERT INTO `rdf_items` VALUES (4,5,'pnEncyclopedia for Postnuke CMS 0.2.0','http://freshmeat.net/releases/154229/',NULL);
INSERT INTO `rdf_items` VALUES (4,1,'Distributed Hardware Evolution 1.61','http://freshmeat.net/releases/154233/',NULL);
INSERT INTO `rdf_items` VALUES (1,9,'Let\'s amend the US Constitution!','http://www.kuro5hin.org/story/2004/2/28/142125/563','With the issue of homosexual marriage getting so much attention in the United States, President George Bush has said he will support an amendment to the United States Constitution defining marriage to be between only one man and only one woman.  This has ');
INSERT INTO `rdf_items` VALUES (1,8,'How to Stop Receiving Credit Card Offers','http://www.kuro5hin.org/story/2004/3/1/13940/79585','Tired of annoying &quot;pre-approved&quot; credit card offers?  I sure am.  According to the Fair Credit Reporting Act (FCRA) of 1970 as amended in 1996, the four major credit bureaus have the right to sell your information to companies that want to offer');
INSERT INTO `rdf_items` VALUES (1,7,'End of Letter From America','http://www.kuro5hin.org/story/2004/3/2/101427/2529','The world\'s longest-running talk radio programme, Letter From  America, has come to an end, with the retirement of its presenter,  95-year-old Alistair Cooke.');
INSERT INTO `rdf_items` VALUES (1,5,'Congrats Rusty','http://www.kuro5hin.org/story/2004/3/5/171043/4690','It looks like Rusty has gotten a daytime gig as an Internet big cheese.  I notice that the sidebar blurb of Armstrong ZÃƒÂºniga LLC (a web consulting shop for political campaigns) now says:  Rusty Foster joined Armstrong ZÃƒÂºniga in February of 2004 as C');
INSERT INTO `rdf_items` VALUES (1,6,'What Books have Influenced Your Life?','http://www.kuro5hin.org/story/2004/3/4/3157/15548','What books have you read that deeply influenced your way of living, thinking, or viewpoints about the world around you?    My own list follows.');
INSERT INTO `rdf_items` VALUES (1,0,'British Camp Delta Detainee Speaks Out','http://www.kuro5hin.org/story/2004/3/12/53733/2985','The first British suspect to be released from Camp Delta, Manchester-born Jamal al-Harith, gives a damning account of life in Camp X-Ray and Camp Delta in a three part article in today\'s Daily Mirror.    He describes torture, systematic beatings, forced m');
INSERT INTO `rdf_items` VALUES (1,4,'Fighting Your Workplace: Corporate Funding of Politicians','http://www.kuro5hin.org/story/2004/3/5/15752/36703','When your company comes to you asking to give some of each paycheck to them so they can put it into a PAC (Political Action Committee) that translated to buying off politicians, what can you do? This especially counts when you work for a large company tha');
INSERT INTO `rdf_items` VALUES (1,3,'A new way to save the World: The Copenhagen Consensus','http://www.kuro5hin.org/story/2004/3/7/23496/47566','The Economist magazine has started a project, headed by Bjorn Lomberg, author of &quot;The Skeptical Environmentalist&quot;, to gather together economists and domain experts to answer the question of how the world should rank its problems and how they can');
INSERT INTO `rdf_items` VALUES (1,2,'GNU Screen: an introduction and beginner\'s tutorial','http://www.kuro5hin.org/story/2004/3/9/16838/14935','Most modern Unix-based operating systems (e.g. Linux, MacOS X, and BSD) come with a little console-mode utility called GNU Screen.  It\'s a powerful tool in the hands of the console warrior, a veritable Swiss Army knife of text-mode human-computer interact');
INSERT INTO `rdf_items` VALUES (3,8,'MySQL Writes Exception for PHP in License','http://slashdot.org/article.pl?sid=04/03/13/1414212',NULL);
INSERT INTO `rdf_items` VALUES (3,9,'Halloween X Author Mike Anderer Speaks Out','http://slashdot.org/article.pl?sid=04/03/13/140242',NULL);
INSERT INTO `rdf_items` VALUES (4,8,'Qfsm 0.42','http://freshmeat.net/releases/154224/',NULL);
INSERT INTO `rdf_items` VALUES (4,4,'Pegasi Web Server 0.2.3','http://freshmeat.net/releases/154231/',NULL);
INSERT INTO `rdf_items` VALUES (3,5,'U.S. Plans Targeted Draft for Computer Personnel','http://slashdot.org/article.pl?sid=04/03/13/1738221',NULL);
INSERT INTO `rdf_items` VALUES (3,7,'Bell Labs Plants Nanograss to Cool Mobile Chips','http://slashdot.org/article.pl?sid=04/03/13/1615219',NULL);
INSERT INTO `rdf_items` VALUES (3,6,'Sims Online Presidential Campaign Shapes Up','http://slashdot.org/article.pl?sid=04/03/13/151245',NULL);
INSERT INTO `rdf_items` VALUES (3,3,'Grand Challenge 1, Competitors 0','http://slashdot.org/article.pl?sid=04/03/13/1933247',NULL);
INSERT INTO `rdf_items` VALUES (4,3,'Electrocardiognosis 3078','http://freshmeat.net/releases/154232/',NULL);
INSERT INTO `rdf_items` VALUES (4,0,'For each File 1.6.1','http://freshmeat.net/releases/154237/',NULL);
INSERT INTO `rdf_items` VALUES (1,1,'Stations playing Bush campaign ads for free during news?','http://www.kuro5hin.org/story/2004/3/9/14659/65171','A few nights ago, I was watching the local news on an Hearst-Argyle owned ABC news affiliate, WCVB.   They launched into a story about Bush\'s reelection campaign, and how some of that huge pile of money was being put to action for a new commercial.  Then ');
INSERT INTO `rdf_items` VALUES (4,2,'DarkSnow 0.4.3','http://freshmeat.net/releases/154235/',NULL);
INSERT INTO `rdf_items` VALUES (3,4,'Is Security Holding VoIP Back?','http://slashdot.org/article.pl?sid=04/03/13/1810229',NULL);
INSERT INTO `rdf_items` VALUES (3,0,'Intel Plans CPU Naming Change','http://slashdot.org/article.pl?sid=04/03/13/1954216',NULL);
INSERT INTO `rdf_items` VALUES (3,1,'I, Robot Trailer Available','http://slashdot.org/article.pl?sid=04/03/13/1818248',NULL);
INSERT INTO `rdf_items` VALUES (3,2,'Canadian Record Industry Presses ISPs in Court','http://slashdot.org/article.pl?sid=04/03/13/1911240',NULL);
INSERT INTO `rdf_items` VALUES (4,9,'Conflux Groupware 1.1.0-rc2 (Lite)','http://freshmeat.net/releases/154222/',NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `rdf_items` ENABLE KEYS */;

--
-- Table structure for table `section_perms`
--

DROP TABLE IF EXISTS `section_perms`;
CREATE TABLE `section_perms` (
  `group_id` varchar(50) NOT NULL default '',
  `section` varchar(30) NOT NULL default '',
  `sect_perms` text,
  `default_sect_perm` int(1) default '0',
  PRIMARY KEY  (`group_id`,`section`)
) TYPE=MyISAM;

--
-- Dumping data for table `section_perms`
--


/*!40000 ALTER TABLE `section_perms` DISABLE KEYS */;
LOCK TABLES `section_perms` WRITE;
INSERT INTO `section_perms` VALUES ('Superuser','Diary',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Admins','Diary',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Editors','Diary',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Users','Diary',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Anonymous','Diary',',norm_read_comments,norm_post_comments,norm_read_stories,deny_post_stories',0);
INSERT INTO `section_perms` VALUES ('Superuser','news',',norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories',1);
INSERT INTO `section_perms` VALUES ('Admins','news',',norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories',1);
INSERT INTO `section_perms` VALUES ('Editors','news',',norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories',1);
INSERT INTO `section_perms` VALUES ('Users','news',',norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories',1);
INSERT INTO `section_perms` VALUES ('Anonymous','news',',norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories',1);
INSERT INTO `section_perms` VALUES ('Advertisers','Diary',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Advertisers','news',',norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories',1);
INSERT INTO `section_perms` VALUES ('Admins','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
INSERT INTO `section_perms` VALUES ('Advertisers','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
INSERT INTO `section_perms` VALUES ('Anonymous','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
INSERT INTO `section_perms` VALUES ('Editors','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
INSERT INTO `section_perms` VALUES ('Superuser','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
INSERT INTO `section_perms` VALUES ('Users','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
INSERT INTO `section_perms` VALUES ('Admins','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Advertisers','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Anonymous','events',',norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories',0);
INSERT INTO `section_perms` VALUES ('Editors','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Superuser','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
INSERT INTO `section_perms` VALUES ('Users','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories',0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `section_perms` ENABLE KEYS */;

--
-- Table structure for table `sections`
--

DROP TABLE IF EXISTS `sections`;
CREATE TABLE `sections` (
  `section` varchar(30) NOT NULL default '',
  `title` varchar(64) NOT NULL default '',
  `description` text,
  `icon` varchar(255) default NULL,
  PRIMARY KEY  (`section`)
) TYPE=MyISAM;

--
-- Dumping data for table `sections`
--


/*!40000 ALTER TABLE `sections` DISABLE KEYS */;
LOCK TABLES `sections` WRITE;
INSERT INTO `sections` VALUES ('Diary','Diaries','Reader diaries','');
INSERT INTO `sections` VALUES ('news','News','Just the news, ma\'am','');
INSERT INTO `sections` VALUES ('advertisements','Adverts','Adverts you can comment on','');
INSERT INTO `sections` VALUES ('events','Events','Section for event stories',NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `sections` ENABLE KEYS */;

--
-- Table structure for table `sessions`
--

DROP TABLE IF EXISTS `sessions`;
CREATE TABLE `sessions` (
  `session_id` varchar(32) NOT NULL default '',
  `item` varchar(255) NOT NULL default '',
  `value` text,
  `serialized` int(1) default '0',
  `last_update` datetime default NULL,
  PRIMARY KEY  (`session_id`,`item`)
) TYPE=MyISAM;

--
-- Dumping data for table `sessions`
--


/*!40000 ALTER TABLE `sessions` DISABLE KEYS */;
LOCK TABLES `sessions` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `sessions` ENABLE KEYS */;

--
-- Table structure for table `special`
--

DROP TABLE IF EXISTS `special`;
CREATE TABLE `special` (
  `pageid` varchar(50) NOT NULL default '',
  `title` varchar(255) NOT NULL default '',
  `description` text,
  `content` text,
  PRIMARY KEY  (`pageid`)
) TYPE=MyISAM;

--
-- Dumping data for table `special`
--


/*!40000 ALTER TABLE `special` DISABLE KEYS */;
LOCK TABLES `special` WRITE;
INSERT INTO `special` VALUES ('mission','Mission Statement','The site\'s purpose','This is this site\'s mission. To be as cool as possible. That is all.');
INSERT INTO `special` VALUES ('faq','Frequently Asked Questions','The FAQ, duh.','This is the FAQ for this fine Scoop site. It\'s brand new, so there haven\'t been any questions asked frequently yet. But if there were, you bet they\'d be right here!');
INSERT INTO `special` VALUES ('rate_warn','Warning: Posting rate exceeded','The page that explains what\'s going on when they exceed the defined post limit','You have exceeded this site\'s maximum posting rate. You are only allowed to post a certain number of comments or stories in a short period of time. Your user account is now locked from posting for a few minutes, after which it will become normal again. Be warned though: if you attempt to post again while you\'re locked out, the timeout period will double, and this will keep happening as long as you keep trying to post. Walk away for a few minutes, have a nice cup of coffee, come back, and everything will be cool. Thanks.');
INSERT INTO `special` VALUES ('rdf_preview','External Feeds Preview','Used to preview external feeds\'s boxes.','Below is a preview of what the selected feed will look like once it\'s been added. The headlines within it are the current ones.<p>\r\n<table align=\"center\" width=\"40%\" border=\"0\">\r\n<tr><td>\r\n%%BOX,rdf_feeds%%\r\n</td></tr>\r\n</table>');
INSERT INTO `special` VALUES ('adtypes','Advertisement Type Listing','Lists the different types of advertisements','%%BOX,ad_types%%');
INSERT INTO `special` VALUES ('adpay','Pay for Ad Order','','%%BOX,ad_pay_type_select%%');
INSERT INTO `special` VALUES ('paypal_confirm','Paypal auto-confirm','','%%BOX,paypal_confirm%%');
INSERT INTO `special` VALUES ('autoformat_syntax','Auto Format Mode Syntax','Description of the Auto Format syntax.','<p>If you don\'t know HTML, that won\'t stop you from making your stories and posts as nicely formatted and fancy as posts by those who do. If you set your \"Post Mode\" in Comment Preferences to \"Auto Format\", Scoop will do its best to format your comment based on its contents, instead of forcing you to litter it with tags. The following page will describe the mechanics used by Scoop to format comments and stories posted in \"Auto Format\" mode.</p>\r\n\r\n<h4>Paragraphs and line breaks</h4>\r\n\r\n<p>In order to start a new paragraph, simply press \r\nEnter twice. To insert a line break, press Enter once. Note that text will automatically wrap to fit the size of the screen, so line breaks like that are generally unnecessary. In most cases, you shouldn\'t need to hit Enter at all except for paragraph breaks.</p>\r\n\r\n<h4>Bold and Italics</h4>\r\n\r\n<p>If you want to emphasize a word or phrase, you can type it into the text box surrounded in asterisks (*), <code>*like this*</code>. This will cause the text between the asterisks to be rendered in <b>bold type</b>. Similarly, you can also enter text between underscores (_) or slashes (/), <code>_like this_ /or this/</code>, in order to render the given text in <i>italics</i>.</p>\r\n\r\n<h4>Making links</h4>\r\n\r\n<p>Of course, you can\'t post on the Web without needing to insert a link every now and then. Creating a link is as simple as typing in the URL (the address shown in your browser\'s toolbar at the top of the window). Auto Format mode will automatically turn all URLs into links. For example, if you were to type the following text:</p>\r\n<blockquote><code>This website runs weblog software from http://scoop.kuro5hin.org.</code></blockquote>\r\n<p>the resulting comment will look like this:</p>\r\n<blockquote>This website runs weblog software from <a href=\"http://scoop.kuro5hin.org\">http://scoop.kuro5hin.org</a>.</blockquote>\r\n<p>Of course, it\'s not always desirable to have the text of the link be the same as the target of the link. You can use brackets (\'[\' and \']\') in order to specify both the link text and link target. For example, if you wanted the text \"<code>This search engine</code>\" to point to <code>http://www.google.com/</code>, you would type the following:</p>\r\n<blockquote><code>[This search engine http://www.google.com/]</code></blockquote>\r\n<p>Which will render like so:</p>\r\n<blockquote><a href=\"http://www.google.com/\">This search engine</a></blockquote>\r\n\r\n<h4>Making lists</h4>\r\n\r\n<p>You can create bulleted lists by entering a series of lines starting with an asterisk followed by a space (\'* \'). Numbered lists can be created similarly, by typing a series of lines beginning with a number follwed by a period (\'1. \'). For example, typing in the following text:</p>\r\n<blockquote><pre>I had these items for breakfast this morning:\r\n* Eggs\r\n* Bacon\r\n* Toast\r\n* Hot grits\r\n</pre></blockquote>\r\n<p>will give the following result:</p>\r\n<blockquote>I had these items for breakfast this morning:\r\n<ul>\r\n<li>Eggs</li>\r\n<li>Bacon</li>\r\n<li>Toast</li>\r\n<li>Hot grits</li>\r\n</ul></blockquote>\r\n');
INSERT INTO `special` VALUES ('trusted','Trusted User Guidelines','An explanation of what privileges trusted users get, and what responsibilities they have','<P>This site uses a system called \"Mojo\" to try to keep the comments as high-signal as possible. All users can rate all comments, except their own, between 1 and 5. When your comments are rated by others, those ratings are combined into a weighted average (newer comments count more than older ones) called your \"Mojo\". This, roughly, represents the rating we could expect your next comment to receive based on your past comments.</P>\n\n<P>Users who have a mojo greater than a certain minimum, and who have posted a sufficient number of comments, such as yourself, for example, are considered \"trusted\" users, and have the added capability to rate comments below the normal minimum rating, and also to see comments rated below the minimum (they are hidden from normal users).</P>\n\n<P>This is a great responsibility for you. It means you\'ve earned the right to peer-review content from untrusted users, and determine if it is spam. We rely on you to rate as much as you can, and to keep the comments as high-signal as we\'ve all come to expect.</P>\n\n<P>Please use your \"zero\" rating with care! It is *only* for use on comments that are wholly content-free. If you think the poster is clueless, or an idiot, or you just don\'t agree with them, that is *not* grounds for a zero rating. Zero is for comments that are offensive, script-generated, or otherwise content-free and intended solely to annoy and/or abuse other readers.</P>\n\n<P><B>Please do not rate duplicate comments 0! As virtually all duplicate comments are accidental, this unfairly impacts the poster\'s mojo. A \"1\" rating and an email to %%local_email%% notifying us of the duplicate (please include direct link to the comment) is the appropriate response.</B></P>\n\n<P>You also have a duty to read comments posted by untrusted users (you are the only ones who can!) and rate them up if they deserve to be viewable. We hate to see users become untrusted, and want them to rejoin the community, and rating them up when they post good comments is the only way for that to happen.</P>\n\n<P>It is a cruel irony that those who are trusted, in any context, usually have more work with no particular reward for that work, and that is the case here as well. You still post with no initial rating, like a normal user, and your ratings do not carry any extra weight or power. The big reward for being trusted is that you get to see the bottom-of-the-barrel dreck. But basically, someone has to do this, and you have shown the rest of the %%sitename%% readers that you have the responsibility and perception to be trusted with this task. Hopefully there are enough of you that no one person will have to expend any unreasonable efforts.</P>\n\n<P>Thank you for contributing to %%sitename%%, and for taking on the mantle of responsibility for keeping the site as high-quality as you\'ve helped make it. I, and all the other readers, salute you.');
INSERT INTO `special` VALUES ('untrusted','Why am I untrusted?','An explanation of why somebody is untrusted, and what they can do about it','<P>This site uses a system called \"Mojo\" to try to keep the comments as high-signal as possible. All users can rate all comments, except their own, between %%rating_min%% and %%rating_max%%. When your comments are rated by others, those ratings are combined into a weighted average -- newer comments count more than older ones -- called your \"Mojo\". This, roughly, represents the rating we could expect your next comment to receive based on your past comments.</P>\r\n\r\n<P>Users who have a mojo greater than a certain minimum and who have posted a sufficient number of comments are considered \"trusted\" users, and have the added capability to rate comments below the normal minimum rating. If enough of a user\'s comments are rated below %%rating_min%%, that user becomes \"untrusted\", which means that respected members of the community have repeatedly indicated that your input is offensive, content-free, or merely intended to annoy others.</P>\r\n\r\n<P>If you are untrusted, then your comments are posted with an initial rating equal to your mojo. Since this is below the normal rating minimum, these comments are not visible to any but trusted users. They may, if they choose, rate your comments above the minimum, and make them visible to others. You may earn back the trust of the community simply by posting worthwhile comments, and not spamming.</P>\r\n\r\n<P>Please do not see this as a condemnation of you as a person. We\'re sure you\'re very nice once we get to know you. This merely means that perhaps you\'ve posted some rather ill-considered comments, and the community as a whole has decided that we\'d rather have your input peer-reviewed before it goes out to the general public. Next time you post, think carefully about what you\'re saying and whether it adds to the topic at hand. If not, there are plenty of places on the web that don\'t filter input at all, and would be glad to hear whatever\'s on your mind.</P>\r\n\r\n<P>If you believe your posting history does not warrant an untrusted rating and you have been the victim of malicious rating, then please contact us at %%local_email%%. Think carefully, and review your previous comments before you do this. If you complain and have in fact been spamming, then I will not be pleased with you. If your untrusted rating is unjustified though, then we will deal with the situation.</P>\r\n\r\n<P>Thank you for reading %%sitename%%.</P>');
UNLOCK TABLES;
/*!40000 ALTER TABLE `special` ENABLE KEYS */;

--
-- Table structure for table `statuscodes`
--

DROP TABLE IF EXISTS `statuscodes`;
CREATE TABLE `statuscodes` (
  `code` int(1) NOT NULL default '0',
  `name` varchar(32) default NULL,
  PRIMARY KEY  (`code`)
) TYPE=MyISAM;

--
-- Dumping data for table `statuscodes`
--


/*!40000 ALTER TABLE `statuscodes` DISABLE KEYS */;
LOCK TABLES `statuscodes` WRITE;
INSERT INTO `statuscodes` VALUES (-1,'Pending');
INSERT INTO `statuscodes` VALUES (0,'Normal');
INSERT INTO `statuscodes` VALUES (-2,'Submitted');
UNLOCK TABLES;
/*!40000 ALTER TABLE `statuscodes` ENABLE KEYS */;

--
-- Table structure for table `stories`
--

DROP TABLE IF EXISTS `stories`;
CREATE TABLE `stories` (
  `sid` varchar(20) NOT NULL default '',
  `tid` varchar(20) NOT NULL default '',
  `aid` int(11) NOT NULL default '0',
  `title` varchar(100) default NULL,
  `dept` varchar(100) default NULL,
  `time` datetime NOT NULL default '0000-00-00 00:00:00',
  `introtext` text,
  `bodytext` text,
  `writestatus` int(1) NOT NULL default '0',
  `hits` int(1) NOT NULL default '0',
  `section` varchar(30) NOT NULL default '',
  `displaystatus` int(1) NOT NULL default '0',
  `commentstatus` int(1) default NULL,
  `totalvotes` int(11) NOT NULL default '0',
  `score` int(11) NOT NULL default '0',
  `rating` int(11) NOT NULL default '0',
  `attached_poll` varchar(20) default NULL,
  `sent_email` int(1) NOT NULL default '0',
  `edit_category` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`sid`),
  KEY `section_idx` (`section`,`displaystatus`),
  KEY `displaystatus_idx` (`displaystatus`),
  FULLTEXT KEY `storysearch_idx` (`title`,`introtext`,`bodytext`)
) TYPE=MyISAM;

--
-- Dumping data for table `stories`
--


/*!40000 ALTER TABLE `stories` DISABLE KEYS */;
LOCK TABLES `stories` WRITE;
INSERT INTO `stories` VALUES ('2004/3/12/222115/671','scoop',1,'Congratulations! You\'ve installed Scoop!',NULL,'2004-03-12 22:21:15','<P>Well, if you\'re seeing this, then hot damn, it worked! I hope the install wasn\'t too hairy. Read below for a little more info about how to get started with this thing, and I wish you the best of luck!</P>\r\n\r\n<P>Oh yeah, and once you\'ve got it all ready for launch, why don\'t you drop by <A href=\"http://scoop.kuro5hin.org/\">the main Scoop site</A> and announce it? There\'s a whole section dedicated to new Scoop site announcements.</P>','<P>What you\'ll want to do now is login as \'scoop\', password \'scoop\', or whatever admin username and password you gave the install script, and edit some stuff.</P>\r\n\r\n<P>If you\'re using the default login and password, the first thing you\'ll want to do is change the admin account\'s password, and possibly username as well. Don\'t leave it as scoop/scoop! You can do this by clicking on the \"User Info\" link in scoop\'s user menu, then clicking on the \"Edit User\" link on that page.</P>\r\n\r\n<P>Once you\'ve done that, the first place you\'ll want to visit is the Site Controls Admin Tool, in the General category. The site controls that must be changed for your site to work properly are there - like your email, your site\'s URL, and so on. If you used the install script, some of these will be set already.</P>\r\n\r\n<P>I strongly recommend that you check out the admin guide - there is a lot of useful information in there. It can be found <A href=\"http://scoop.kuro5hin.org/guide/\">online</A> or in the doc/ directory of your Scoop install.</P>',0,0,'news',0,0,0,0,0,'1079158272_OOvrSGzI',0,0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `stories` ENABLE KEYS */;

--
-- Table structure for table `story_tags`
--

DROP TABLE IF EXISTS `story_tags`;
CREATE TABLE `story_tags` (
  `sid` varchar(20) NOT NULL default '',
  `tag` varchar(255) NOT NULL default '',
  `tag_order` int(11) NOT NULL default '0',
  PRIMARY KEY  (`sid`,`tag`),
  KEY `sid_idx` (`sid`),
  KEY `tag_idx` (`tag`)
) TYPE=MyISAM;

--
-- Dumping data for table `story_tags`
--


/*!40000 ALTER TABLE `story_tags` DISABLE KEYS */;
LOCK TABLES `story_tags` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `story_tags` ENABLE KEYS */;

--
-- Table structure for table `storymoderate`
--

DROP TABLE IF EXISTS `storymoderate`;
CREATE TABLE `storymoderate` (
  `sid` varchar(20) NOT NULL default '',
  `uid` int(11) NOT NULL default '0',
  `time` datetime default NULL,
  `vote` int(11) NOT NULL default '0',
  `section_only` enum('N','Y','X') NOT NULL default 'X',
  PRIMARY KEY  (`sid`,`uid`)
) TYPE=MyISAM;

--
-- Dumping data for table `storymoderate`
--


/*!40000 ALTER TABLE `storymoderate` DISABLE KEYS */;
LOCK TABLES `storymoderate` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `storymoderate` ENABLE KEYS */;

--
-- Table structure for table `subscription_info`
--

DROP TABLE IF EXISTS `subscription_info`;
CREATE TABLE `subscription_info` (
  `uid` int(11) NOT NULL default '0',
  `expires` int(11) NOT NULL default '0',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `last_updated` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_by` varchar(50) default '',
  `active` int(1) NOT NULL default '0',
  `type` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`uid`)
) TYPE=MyISAM;

--
-- Dumping data for table `subscription_info`
--


/*!40000 ALTER TABLE `subscription_info` DISABLE KEYS */;
LOCK TABLES `subscription_info` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `subscription_info` ENABLE KEYS */;

--
-- Table structure for table `subscription_payments`
--

DROP TABLE IF EXISTS `subscription_payments`;
CREATE TABLE `subscription_payments` (
  `uid` int(11) NOT NULL default '0',
  `order_id` varchar(50) NOT NULL default '',
  `cost` decimal(7,2) NOT NULL default '0.00',
  `pay_type` varchar(10) NOT NULL default '',
  `auth_date` date NOT NULL default '0000-00-00',
  `final_date` date default NULL,
  `paid` int(1) default NULL,
  `type` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`uid`,`order_id`)
) TYPE=MyISAM;

--
-- Dumping data for table `subscription_payments`
--


/*!40000 ALTER TABLE `subscription_payments` DISABLE KEYS */;
LOCK TABLES `subscription_payments` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `subscription_payments` ENABLE KEYS */;

--
-- Table structure for table `subscription_types`
--

DROP TABLE IF EXISTS `subscription_types`;
CREATE TABLE `subscription_types` (
  `type` varchar(50) NOT NULL default '',
  `perm_group_id` varchar(50) NOT NULL default '',
  `cost` decimal(7,2) NOT NULL default '0.00',
  `max_time` int(11) NOT NULL default '0',
  `renewable` int(1) NOT NULL default '1',
  `description` text
) TYPE=MyISAM;

--
-- Dumping data for table `subscription_types`
--


/*!40000 ALTER TABLE `subscription_types` DISABLE KEYS */;
LOCK TABLES `subscription_types` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `subscription_types` ENABLE KEYS */;

--
-- Table structure for table `subsections`
--

DROP TABLE IF EXISTS `subsections`;
CREATE TABLE `subsections` (
  `section` varchar(32) NOT NULL default '',
  `child` varchar(32) NOT NULL default '',
  `inheritable` tinyint(1) NOT NULL default '0',
  `invisible` tinyint(1) NOT NULL default '0',
  `time` timestamp NOT NULL,
  PRIMARY KEY  (`section`,`child`)
) TYPE=MyISAM;

--
-- Dumping data for table `subsections`
--


/*!40000 ALTER TABLE `subsections` DISABLE KEYS */;
LOCK TABLES `subsections` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `subsections` ENABLE KEYS */;

--
-- Table structure for table `topics`
--

DROP TABLE IF EXISTS `topics`;
CREATE TABLE `topics` (
  `tid` varchar(20) NOT NULL default '',
  `image` varchar(30) default NULL,
  `alttext` varchar(40) default NULL,
  `width` int(11) default NULL,
  `height` int(11) default NULL,
  PRIMARY KEY  (`tid`)
) TYPE=MyISAM;

--
-- Dumping data for table `topics`
--


/*!40000 ALTER TABLE `topics` DISABLE KEYS */;
LOCK TABLES `topics` WRITE;
INSERT INTO `topics` VALUES ('all','scoop.jpg','All Topics',80,50);
INSERT INTO `topics` VALUES ('scoop','scoop.jpg','Scoop',80,50);
INSERT INTO `topics` VALUES ('diary','scoop.jpg','Diary',80,50);
UNLOCK TABLES;
/*!40000 ALTER TABLE `topics` ENABLE KEYS */;

--
-- Table structure for table `userprefs`
--

DROP TABLE IF EXISTS `userprefs`;
CREATE TABLE `userprefs` (
  `uid` int(11) NOT NULL default '0',
  `prefname` varchar(200) NOT NULL default '',
  `prefvalue` text,
  PRIMARY KEY  (`uid`,`prefname`)
) TYPE=MyISAM;

--
-- Dumping data for table `userprefs`
--


/*!40000 ALTER TABLE `userprefs` DISABLE KEYS */;
LOCK TABLES `userprefs` WRITE;
INSERT INTO `userprefs` VALUES (1,'homepage','http://www.kuro5hin.org/');
INSERT INTO `userprefs` VALUES (1,'fakeemail','scoop@example.com');
INSERT INTO `userprefs` VALUES (1,'uid','1');
UNLOCK TABLES;
/*!40000 ALTER TABLE `userprefs` ENABLE KEYS */;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `uid` int(11) NOT NULL auto_increment,
  `nickname` varchar(50) default NULL,
  `realemail` varchar(50) default NULL,
  `origemail` varchar(50) default NULL,
  `passwd` varchar(12) default NULL,
  `trustlev` int(1) default NULL,
  `perm_group` varchar(50) default NULL,
  `mojo` varchar(5) default NULL,
  `creation_ip` varchar(16) NOT NULL default '',
  `creation_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `newpasswd` varchar(12) default NULL,
  `pass_sent_at` datetime default NULL,
  `is_new_account` tinyint(1) default NULL,
  `creation_passwd` varchar(50) default NULL,
  PRIMARY KEY  (`uid`)
) TYPE=MyISAM;

--
-- Dumping data for table `users`
--


/*!40000 ALTER TABLE `users` DISABLE KEYS */;
LOCK TABLES `users` WRITE;
INSERT INTO `users` VALUES (1,'scoop','scoop@example.com','scoop@example.com','MioQ79w6.4o',1,'Superuser',NULL,'','0000-00-00 00:00:00',NULL,NULL,1,NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `users` ENABLE KEYS */;

--
-- Table structure for table `vars`
--

DROP TABLE IF EXISTS `vars`;
CREATE TABLE `vars` (
  `name` varchar(32) NOT NULL default '',
  `value` text,
  `description` text,
  `type` varchar(5) NOT NULL default 'text',
  `category` varchar(128) NOT NULL default '',
  PRIMARY KEY  (`name`)
) TYPE=MyISAM;

--
-- Dumping data for table `vars`
--


/*!40000 ALTER TABLE `vars` DISABLE KEYS */;
LOCK TABLES `vars` WRITE;
INSERT INTO `vars` VALUES ('max_edit_stories','1','<P>This variable determines how many stories one user can have in the edit queue at one time.  The possible values are any positive integer.  The default value is 1.<BR>\nThis variable has no effect unless the edit queue is turned on for the user submitting the stories, using the perm <B>edit_own_story</B>.</P>','num','Stories');
INSERT INTO `vars` VALUES ('queue_edit_max_time','2h','<P>This variable determines how long a story may remain in the edit queue before being forced to voting.  The possible values are a number followed by a letter indicating the time unit.  The default value is 2h (2 hours).<BR>\nRecognised time units are s (seconds), m (minutes), h (hours) and d (days).  The author of a story in the edit queue may move the story to voting at any time; if this hasn\'t happened by the time this time limit has been reached, Scoop will force the story to voting.  This variable has no effect unless the edit queue is active.</P>','text','Stories');
INSERT INTO `vars` VALUES ('rootdir','','<P>This variable is the path that must precede all Scoop-generated pseudo-directories.  The possible values are any absolute path prefix, with no trailing slash.  The default is blank.<BR>\nThis will only be used if you are installing Scoop into a subdirectory.  If you are installing Scoop on its own virtualhost, this should be blank.  See the Scoop Admin Guide for details on how this variable should be set.</P>','text','General');
INSERT INTO `vars` VALUES ('sitename','Scoop','<P>This variable contains the name of the site.  The possible value is any short string.  The default is Scoop.<BR>\nThis value is used in the emails sent by the site, the browser title bar, and the RDF feeds.</P>','text','General');
INSERT INTO `vars` VALUES ('local_email','scoop@example.com','<P>This variable is used as the from address whenever Scoop has to send an email.  The possible values are any valid email address.  The default is an invalid email address and must be changed.<BR>\nThis email address should probably be one you check regularly.  Since members are send email from this address, they are likely to think that they can send to it as well, if they have any questions.  If this email address is not valid, nobody will be able to create accounts.</P>','text','General');
INSERT INTO `vars` VALUES ('topics','/topics','<P>This variable determines where Scoop will look for topic images.  The possible values are a valid directory name under the Scoop image directory, beginning with /.  The default value is /topics.<BR>\nThe contents of this variable are appended to the variable <B>imagedir</B> to provide the path to the topic images.  The topic image directory must be under the regular image directory.</P>','text','General');
INSERT INTO `vars` VALUES ('real_initial_rating','3','<P>This variable determines whether or not the initial rating on a comment counts as a \"real\" rating or if it disappears on the first rating done by a user. The possible values are: 0) initial rating is overridden by first user rating; or 1) initial rating counts as the first real rating.<BR>This variable has no effect unless the variable <B>use_initial_rating</B> is set to 1. The actual rating value given to a new comment is set in the variables <B>anonymous_default_points</B> and <B>user_default_points</B>.</P>','num','Comments');
INSERT INTO `vars` VALUES ('storylist','30','<P>This variable determines how many items will be displayed in lists.  The possible values are any positive integer.  The default value is 30.<BR>\nThis value applies to the story list, poll list, and ad list admin tools, as well as the voting and edit queue.</P>','num','Stories');
INSERT INTO `vars` VALUES ('cache_scan_interval','2','How many requests to handle before scanning the cache to check its size. This can be fairly intensive, so on larger sites you should set this higher.','num','General');
INSERT INTO `vars` VALUES ('post_story_threshold','4','<P>This variable determines the score a story must reach in the voting queue to be posted.  The possible values are: a positive integer) the absolute score of the story; and a positive percentage) a score represented as a percentage of registered users.  The default value is 4.<BR>\nIf the variable <B>use_alternate_scoring</B> is set to 1, this is the number of positive votes required; if it is set to 0, this is the score of the story found by adding all positive, negative, and neutral votes together.  If this number is a percentage, a score is calculated on the fly based on the number of registered users in the database.  So if you have a value of 5% here and there are currently 1,000 registered users, the post threshold will be 50.</P>','num','Stories');
INSERT INTO `vars` VALUES ('hide_story_threshold','-2','<P>This variable determines the score at which a story in the voting queue is hidden from sight.  The possible values are any negative integer, or any positive percentage.  The default value is -2.<BR>\nIf the value is a percentage, it is interpreted as the negative of the percentage of total user accounts.  If the value is a number, it is interpreted as an absolute score.  As soon as a vote makes the story\'s score at or below the value in this variable, the story is removed from the voting queue and hidden.  Do not put a positive number (except a percentage) in this variable, as stories begin voting with a score of 0.  After a single positive vote, the score will then be 1, below or equal to all positive numbers, and resulting in every single story being hidden.','num','Stories');
INSERT INTO `vars` VALUES ('show_dept','0','<P>This variable determines whether or not a story can be assigned a \"department\" (i.e., from the i-love-scoop department) to be displayed under the title.  The possible values are: 0) do not use departments; and 1) use departments.  The default value is 0.<BR>\nThis toggles both the display of the department when viewing the story, and the presence of an input box when submitting a story.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('rating_min','1','<P>This variable determines the minimum rating a normal user can give a comment.  The possible values are any integer.  The default value is 1.<BR>\nIf the variable <B>use_mojo</B> is set to 1, Trusted users (see the Scoop Admin Guide) can rate comments one point below this value, and any comment with an average score below this value are hidden from everybody except trusted users.</P>','num','Comments');
INSERT INTO `vars` VALUES ('rating_max','5','<P>This variable determines the maximum rating a comment can receive.  The possible values are any integer.  The default value is 5.</P>','num','Comments');
INSERT INTO `vars` VALUES ('time_zone','EST','<P>This variable tells Scoop which time zone the server\'s clock is set to.  The possible values are any valid time zone string.  The default value is EST.<BR>\nIf this variable is set incorrectly, all display times will be wrong, leading to much confusion.</p>','text','General');
INSERT INTO `vars` VALUES ('current_poll','967438565_opsmxIVg','<P>This variable identifies which poll is currently displayed on the front and section pages.  This variable should not be changed here; to change the front page poll, use the Poll List Admin Tool.</P>','text','Polls');
INSERT INTO `vars` VALUES ('story_count_words','1','<P>This variable determines whether Scoop counts words or bytes when displaying the size of a story.  The possible values are: 0) count bytes (letters) in the story; and 1) count words in the story.  The default value is 1.<BR>\nWords are defined as anything separated by spaces or tabs.  The number of bytes is displayed as the number of bytes, kilobytes, or megabytes, whichever is most appropriate.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('poll_num_ans','10','<P>This variable determines the number of answer fields for all new polls.  The possible values are any positive integer.  The default value is 10.<BR>\nIf this number is reduced after some polls are created, the existing polls are not affected and all their answers will still be available for viewing and voting.  This number only affects the number of poll form fields shown and processed when creating new polls and editing existing polls.</P>','num','Polls');
INSERT INTO `vars` VALUES ('max_comments_submit','4','<P>This variable determines how many comments a user can post before triggering the rate throttling mechanism used to limit crapflooding.  The possible values are any positive integer.  The default value is 4.<BR>\nThe variable <B>rate_limit_minutes</B> is used in combination with this variable to calculate a posting rate; if the rate of <B>max_comments_submit</B>/<B>rate_limit_minutes</B> is exceeded, the user is blocked from posting for a short time, set by the variable <B>timeout_minutes</B>.  These three values should be set so that most normal users will never encounter them, very active users will only rarely encounter them, and people or scripts attempting to flood the site with comments will be locked out.  The default values should probably only be changed if they aren\'t working.</P>','num','Comments,Post Throttle');
INSERT INTO `vars` VALUES ('max_stories_submit','2','<P>This variable determines how many stories a user can post before triggering the rate throttlineg mechanism used to limit crapflooding.  The possible values are any positive integer.  The default value is 2.<BR>\nThe variable <B>rate_limit_minutes</B> is used in combination with this variable to calculate a posting rate; if the rate of <B>max_stories_submit</B>/<B>rate_limit_minutes</B> is exceeded, the user is blocked from posting for a short time, set by the variable <B>timeout_minutes</B>.  These three values should be set so that most normal users will never encounter them, very active users will only rarely encounter them, and people or scripts attempting to flood the site with comments will be locked out.  The default values should probably only be changed if they aren\'t working.','num','Stories,Post Throttle');
INSERT INTO `vars` VALUES ('rate_limit_minutes','10','<P>This variable contains the time span to calculate the posting rate for post throttling.  The possible values are any positive number of minutes.  The default value is 10.<BR>\nThis is used with the variables <B>max_comments_submit</B> and <B>max_stories_submit</B> to calculate the maximum allowed posting rate.  It should be set so that normal users will rarely or never encounter the limit, but abusive users or scripts attempting to flood the site with garbage comments or stories are blocked.  If the posting rate is exceeded, the user is blocked from posting for a time set in <B>timeout_minutes</B>.</P>','num','Comments,Post Throttle');
INSERT INTO `vars` VALUES ('timeout_minutes','2','<P>This variable determines how long a user exceeding the post throttle rate will be blocked from posting.  The possible values are any positive number of minutes.  The default value is 2.<BR>\nThe post throttle rate is set using the variables <B>max_post_comments</B>, <B>max_post_stories</B>, and <B>rate_limit_minutes</B>.  If a blocked user attempts to post while locked out, the timeout period doubles and restarts.  If the timeout period exceeds the value given in the variable <B>max_timeout</B>, the user is moved to the group specified in the variable <B>untrusted_group</B>, or failing that, the Anonymous group.</P>','num','Post Throttle');
INSERT INTO `vars` VALUES ('max_timeout','300','<P>This variable determines the maximum amount of accumulated rate-throttle timout time a user can have before being blocked from posting permanently.  The possible values are any positive number of minutes.  The default value is 300.<BR>\nSee the Scoop Admin Guide for a description of rate throttling and the timeout.</P>','num','Post Throttle');
INSERT INTO `vars` VALUES ('template_recurse','5','<P>This variable determines how many passes Scoop will make looking for keys before calling it a day and clearing any remaining.  The possible values are any positive integer.  The default value is 5.<BR>\nFIXME: There\'s a bug in this somewhere; all keys that need to be interpolated are, no matter what you set this value to.  Just leave it be for now.</P>','num','General');
INSERT INTO `vars` VALUES ('use_mojo','1','<P>This variable determines whether or not the mojo system should be used to determine user trust levels.  The possible values are: 0) do not use mojo; and 1) use mojo.  The default value is 1.<BR>\nFor a description of mojo calculations and limits, and trusted and untrusted users, see the Scoop Admin Guide.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('use_topics','1','<P>This variable determines whether or not topics are used.  FIXME: this setting has weird behaviour that I\'ve made suggestions for fixing and making more consistent.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('use_macros','0','Set to 1 to enable the use of macros in stories and comments.','bool','Macros');
INSERT INTO `vars` VALUES ('macro_render_on_save','0','Set to 1 to cause macros to render when saved; if 0, macros remain as raw macro text in stories and comments until archived','bool','Macros');
INSERT INTO `vars` VALUES ('macro_render_verbose','0','Set to 1 to render macros verbosely, with HTML comments as delimiters and original macro text preserved in comment (for post-processing)','bool','Macros');
INSERT INTO `vars` VALUES ('use_ref_check','0','<P>This variable determines whether or not Scoop will check your referer before allowing access to any administrator functions.  The possible values are: 0) do not check referer; and 1) check referer and deny administrator access if it does not match the server\'s hostname.  The default value is 0.<BR>\nThis is not real security; the referer field is very easy to change.  If your browser blocks the referer by default, you will not be able to perform any site administration.</P>','bool','Security');
INSERT INTO `vars` VALUES ('enable_story_digests','0','<P>This variable determines whether or not users will have the option of requesting a story digest sent to their email address periodically.  The possible values are: 0) users cannot request a digest and digests will not be sent; and 1) users may request a digest and digests will be sent according to the schedule requested.<BR>\nBefore enabling this variable, make sure that the variables <B>digest_subject</B> and <B>local_email</B>, the blocks <B>digest_header</B> and <B>digest_footer</B> (or <B>digest_headerfooter</B> if you want the header and footer of the email to be the same) are properly set, and that the <B>digest</B> cron is enabled.','bool','Stories');
INSERT INTO `vars` VALUES ('auto_post_alert','1','<P>This variable determines whether or not the site administrator is notified when a story is posted or dropped using the auto-post algorithm (described in the Scoop Admin Guide).  The possible values are: 0) do not email the admin; and 1) email the admin.  The default value is 1.<BR>\nThis variable has no effect unless the variable <B>use_auto_post</B> is set to 1.  This variable uses the email addresses present in the variable <B>admin_alert</B> as the recipient.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('use_auto_post','0','<P>This variable determines whether or not Scoop will make a posting decision after certain criteria have been met, if the story is not posted or hidden using the normal voting mechanism.  The possible values are: 0) use only the normal voting mechanism; and 1) use the normal voting mechanism plus the auto-post algorithm where needed.  The default value is 0.<BR>\nThe criteria are based on the time the story has spent in the voting queue if the variable <B>auto_post_use_time</B> is set to 1, and based on the total number of votes received if that variable is set to 0.  See the Scoop Admin Guide for more details on the autopost algorithm.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('auto_post_frontpage','4','<P>This variable determines the minimum score a story can have for the auto-post algorithm to post it to the site\'s front page.  The possible values are any number between the variables <B>rating_max</B> and <B>rating_min</B>, including fractional values.  The default value is 4.<BR>\nThis variable has no effect unless the variable <B>use_auto_post</B> is set to 1.  If the comment rating scale is set to anything other than 1-5, care must be taken when choosing the auto-post thresholds.  See the Scoop Admin Guide for a full description of the auto-posting algorithm.</P>','num','Stories');
INSERT INTO `vars` VALUES ('auto_post_section','3.25','<P>This variable determines the minimum score a story can have for the auto-post algorithm to post it to the site\'s section page.  The possible values are any number between the variables <B>rating_max</B> and <B>rating_min</B>, including fractional values.  The default value is 3.25.<BR>\nThis variable has no effect unless the variable <B>use_auto_post</B> is set to 1.  This value should not be higher than the value in the variable <B>auto_post_frontpage</B>, as stories with scores higher than that value are posted to the front page without considering this value.  Stories with a score lower than this value are auto-hidden.  See the Scoop Admin Guide for a full description of the auto-posting algorithm.</P>','num','Stories');
INSERT INTO `vars` VALUES ('allow_ballot_stuffing','0','<P>This variable determines whether or not a new poll can have a pre-set number of votes, before anybody has voted in the poll (also known as ballot stuffing).  The possible values are: 0) do not allow ballot stuffing; and 1) allow ballot stuffing.  The default value is 0.<BR>\n  This variable only applies to users with the perm <B>edit_polls</B>.  \"Stuffed\" ballots do not have any checks made for sanity.  Non-numeric values are changed to 0, but negative values are not filtered and result in some very strange poll results.  If you change the number of votes in the poll, any users who have voted already will not be able to vote again, even if you set the number of votes to zero.</P>','bool','Polls');
INSERT INTO `vars` VALUES ('max_intro_words','0','<P>This variable determines the maximum number of words Scoop will allow in the introtext part of a story.  The possible values are: 0) no limit; and any positive integer) the number of words (excluding HTML).  The default value is 0.<BR>\nThe variable <B>max_intro_chars</B> does the same thing but counts characters instead of words.  Onely one of the two should be used.</P>','num','Stories');
INSERT INTO `vars` VALUES ('max_intro_chars','0','<P>This variable determines the maximum number of characters Scoop will allow in the introtext part of a story.  The possible values are: 0) no limit; and any positive integer) the number of characters (including spaces but excluding HTML) permitted.  The default value is 0.<BR>\nThe variable <B>max_intro_words</B> does the same thing but counts words instead of characters.  Only one of the two should be used.</P>','num','Stories');
INSERT INTO `vars` VALUES ('max_cache_size','5M','<P>This variable determines the maximum amount of memory Scoop\'s cache is allowed to use per site and per process. The possible values are any positive number followed by one of b) bytes; k) kilobytes; m) megabytes; g) gigabytes. The default value is 5M. If no unit is specified, `bytes\' is assumed.<BR>This is a per-site and per-process value so if you have two sites running and apache has 5 processes handling them, you will have a maximum of 5*5*2 = 50 megabytes of memory taken up by Scoop\'s cache. If this number is set too large, your server may run out of available memory, degrading performance. If this number is set too small, Scoop will be forced to hit the database a lot more frequently, degrading performance.</P>','text','General');
INSERT INTO `vars` VALUES ('site_url','http://www.example.com','<P>This variable contains the URL for the server the site is hosted on.  The possible value is a fully qualified domain name with no path information and no trailing slash.  The default value is an invalid URL.<BR>\r\nThe <B>rootdir</b> is appended to this variable to create the full URL to the site\'s front page.  If this variable or <B>rootdir</b> ends in a slash, many URLs including the ones sent in emails will not work properly.</p>','text','General');
INSERT INTO `vars` VALUES ('max_rdf_intro','15','<P>This variable determines how long the introtext in your site\'s RDF feed may be, in number of words, and replaces anything more with the string \"...\".  The possible values are: 0) no limit; and any positive integer) the number of words in the RDF feed.  The default value is 15.<BR>\nThis variable has no effect unless the RDF generator is active.  See the Scoop Admin Guide for details.</P>','num','RDF');
INSERT INTO `vars` VALUES ('rdf_use_images','1','<P>This variable determines whether or not images included in an external RDF feed are displayed.  The possible values are: 0) do not display images; and 1) display images.  The default value is 1.<BR>\nThis variable has no effect unless the site is fetching RDF feeds for display; see the Scoop Admin Guide for details.</P>','bool','RDF');
INSERT INTO `vars` VALUES ('rdf_use_forms','1','<P>This variable determines whether or not form elements (such as the search box Scoop includes in its RDF feeds) included in an external RDF feed are displayed.  The possible values are: 0) do not display form elements; and 1) display form elements.  The default value is 1.<BR>\nThis variable has no effect unless the site is fetching RDF feeds for display; see the Scoop Admin Guide for details.</P>','bool','RDF');
INSERT INTO `vars` VALUES ('use_rdf_feeds','1','<P>This variable determines whether or not external RDF feeds should be fetched, stored, and displayed.  The possible values are: 0) do not use external RDF feeds; and 1) use external RDF feeds.  The default value is 1.<BR>\nFor Scoop to fetch RDF feeds, the cron <B>rdf_fetch</B> must also be turned on.  See the Scoop Admin Guide for details.</P>','bool','RDF');
INSERT INTO `vars` VALUES ('allow_sig_behavior','1','<P>This variable determines whether or not a user may choose between \"sticky\" and \"retroactive\" signatures on their comments.  The possible values are: 0) users may choose only between having a retroactive sig or not having a sig at all; and 1) users may choose between sticky, retroactive, or no sigs.<BR>\nThe default value is 1.<BR>\nDepending on the placement of the comment vs. the signature in the <B>comment</B> and <B>moderation_comment</B> blocks, sticky or no sig may not render correctly.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('show_new_comments','all','<P>This variable determines when new/read comments are tracked.  The possible values are: all) track and display new comments for all stories for all registered users; hotlist) track and display new comments only for stories a user has in his hotlist; and never) do not track or display new comments for any story or any user.  The default value is all.<BR>\nNew comments are marked with the contents of the block <B>new_comment_marker</B> when appropriate.</P>','text','Comments,Stories');
INSERT INTO `vars` VALUES ('allow_admin_notes','1','<P>This variable turns the \"admin notes\" field on or off.  The possible values are: 0) disable admin notes; and 1) enable admin notes.  The default value is 1.<BR>\nAdmin notes are displayed on the edit user form, and are only visible to users with the perm <B>edit_user</B>.  They are useful for a site with multiple admins, so the admins can leave messages for each other regarding a particular account\'s past abuses, or making a record of changes made to an account.  They can also be useful even when a site has only one admin, so the admin can leave a record of past changes or abuses and not rely on memory.</P>','bool','Security,General');
INSERT INTO `vars` VALUES ('allow_rdf_fetch','1','<P>This variable determines whether or not Scoop will allow an admin to fetch external RDF feeds through the RDF Admin Tool.  The possible values are: 0) do not allow RDF fetching through the admin tool; and 1) allow RDF fetching through the admin tool.  The default value is 1.<BR>\nThis variable should be left at 1 unless there is a problem with fetching external RDF feeds through the RDF Admin Tool.  It is intended as a workaround for those situations where Apache cannot be recompiled to correct the issue with RDF fetches.  Please see the Scoop Admin Guide for details.</P>','bool','RDF');
INSERT INTO `vars` VALUES ('rdf_http_proxy','','<P>This variable determines which http proxy (if any) Scoop uses when fetching external RDF feeds.  The possible values are a fully qualified domain name and port of the proxy.  The default value is blank.<BR>\nThis variable has no effect unless the site is fetching RDF feeds for display; see the Scoop Admin Guide for details.  If blank, Scoop connects directly when fetching; if filled, Scoop uses the server named as its proxy server.  The name must be in the form http://host.name:port/</P>','text','RDF');
INSERT INTO `vars` VALUES ('rdf_max_headlines','15','<P>This variable determines the maximum number of headlines to display in an external RDF feed.  The possible values are any positive integer.  The default value is 15.<BR>\nThis variable has no effect unless the site is fetching RDF feeds for display; see the Scoop Admin Guide for details.  This variable can be overruled by a user preference.</P>','num','RDF');
INSERT INTO `vars` VALUES ('rdf_max_stories','7','<P>This variable determines the maximum number of stories to include in the site\'s generated RDF feed.  The possible values are any positive integer.  The default value is 7.<BR>\nThis variable has no effect unless the site is generating RDF feeds for syndication; see the Scoop Admin Guide for details.  This variable is used with the variable <B>rdf_days_to_show</B> to determine how many stories to include in the RDF file.</P>','num','RDF');
INSERT INTO `vars` VALUES ('rdf_file','/www/scoop/html/backend.rdf','<P>This variable names the file Scoop saves its generated RDF feed to.  The possible values are an absolute filesystem path.  The default is the probably incorrect /www/scoop/html/backend.rdf<BR>\nThis variable has no effect unless the site is generating RDF feeds for syndication; see the Scoop Admin Guide for details.  The file named must be writeable by the Apache server and in a web-accessible location.</P>','text','RDF');
INSERT INTO `vars` VALUES ('rdf_image','http://example.com/images/logo.jpg','<P>This variable gives the full external URL of an image file you want included with your site\'s RDF feed, or blank.  The possible value is the fully qualified URL of your image file.  The default value is wrong.<BR>\nThis variable has no effect unless the site is generating RDF feeds for syndication; see the Scoop Admin Guide for details.  If you are including an image in your RDF feed, it should generally be fairly small; large images can ruin another site\'s layout, and they may refuse to display your feed for that reason.</P>','text','RDF');
INSERT INTO `vars` VALUES ('rdf_days_to_show','30','<P>This variable determines how many days worth of stories to include in the RDF file your site generates.  The possible values are any positive integer.  The default value is 30.<BR>\nThis is used in combination with <B>rdf_max_stories</B> to limit the number of headlines your site syndicates.  This variable has no effect unless the site is generating RDF feeds for syndication; see the Scoop Admin Guide for details.</P>','num','RDF');
INSERT INTO `vars` VALUES ('rdf_copyright','Copyright 2000 - My Site','<P>This variable contains the text of the copyright notice to include in the site\'s RDF feed.  The possible values are any string.  The default value will need to be changed, at least for the name of your site.<BR>\nThis variable has no effect unless the site is generating RDF feeds for syndication; see the Scoop Admin Guide for details.  Do not include special characters such as the copyright symbol in this field, as it causes some RDF parsers to choke.</P>','text','RDF');
INSERT INTO `vars` VALUES ('keep_sessions_for','21 day','<P>This variable determines how long login sessions are saved for.  The possible values are in the format time unit (eg, 5 day) and can be any valid time.  The number may be any positive integer, and the unit may be any of second, minute, hour, day, month, or year.<BR>\nThis variable has no effect unless the <B>sessionreap</B> cron is enabled.  Login sessions are updated on every visit, so frequent visitors will not have their sessions expire.  Expired sessions result in logging out the user; they will have to log in again on their next visit.</P>','text','Cron');
INSERT INTO `vars` VALUES ('mojo_max_comments','30','<P>This variable determines the maximum number of comments that count towards a user\'s mojo score.  The possible values are any positive integer.  The default value is 30.<BR>\nThis value is the number of rated comments, not the number of total comments, counted toward mojo.  Unrated comments are excluded from the calculation entirely and have no effect on mojo at all.  Newer comments are weighted higher than older comments, using this value is a weight factor.  See the Scoop Admin Guide for details on mojo calculation.  See also <B>mojo_max_days</B>.  This variable has no effect unless the variable <B>use_mojo</B> is set to 1.</P>','num','Comments');
INSERT INTO `vars` VALUES ('notify_author','1','<P>This variable determines whether or not the author of a story is notified when the story is either posted or dropped through the voting queue.  The possible values are: 0) do not send an email notification; and 1) send and email notification.  The default value is 1.<BR>\nEmail notification is only sent if Scoop does the posting or hiding through either the normal voting mechanism or the auto-post mechanism.  The email is sent from the email address specified in the variable <B>local_email</B>. Manually posted or hidden stories do not cause an email to be sent.  This can cause performance issues on very large sites, so if you\'re having problems try disabling this feature.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('mojo_max_days','60','<P>This variable determines the maximum age of comments that count towards a user\'s mojo score.  The possible values are any positive number of days.  The default value is 60.<BR>\nThis value is used when selecting the comments to be used in mojo calculations; only comments newer than this will be considered.  Mojo must be maintained and cannot be accumulated.  See the Scoop Admin Guide for details on mojo calculation.  See also <B>mojo_max_comments</B>.  This variable has no effect unless the variable <B>use_mojo</B> is set to 1.</P>','num','Comments');
INSERT INTO `vars` VALUES ('mojo_min_trusted','10','<P>This variable determines how many rated comments a user must have before being considered for \"Trusted User\" status.  The possible values are any positive integer.  The default value is 10.<BR>\nThis value should be less than the value in <B>mojo_max_comments</B> because a user will never have more than that number of comments considered for mojo calculations.  This variable has no effect unless the variable <B>use_mojo</B> is set to 1.</P>','num','Comments');
INSERT INTO `vars` VALUES ('mojo_rating_trusted','3.5','<P>This variable determines the minimum mojo score a user must have before being considered a \"Trusted User\".  The possible values are any number between <B>rating_min</B> and <B>rating_max</B>.  The default value is 3.5.<BR>\nTrusted users have some extra abilities; see the Scoop Admin Guide for details on trusted users.  This variable has no effect unless the variable <B>use_mojo</B> is set to 1.</P>','num','Comments');
INSERT INTO `vars` VALUES ('mojo_min_untrusted','10','<P>This variable determines how many rated comments a user must have before being considered for \"Untrusted\" status.  The possible values are any positive integer.  The default value is 10.<BR>\nThis value should be less then the value in <B>mojo_max_comments</B> because a user will never have more than that number of comments considered for mojo calculations.  This variable has no effect unless the variable <B>use_mojo</B> is set to 1.</P>','num','Comments');
INSERT INTO `vars` VALUES ('use_subscriptions','0','<P>This variable determines whether or not the subscription system is used.  The possible values are: 0) do not use subscriptions; and 1) use subscriptions.  The default value is 0.<BR>\nSee the Scoop Admin Guide for details on setting up the subscription system.</P>','bool','General');
INSERT INTO `vars` VALUES ('max_accounts_per_day','2','<P>This variable determines how many accounts can be created per day from a given IP address.  The possible values are any positive integer.  The default value is 2.<BR>\nThis number should always be 1 or higher, or nobody will be allowed to create an account.  Users behind proxies (such as at work, or at school, and some ISPs) will all appear to come from the same IP address, so we can\'t limit the number of accounts total per IP.</P>','num','Security');
INSERT INTO `vars` VALUES ('min_pw_request_interval','120','<P>This variable determines the number of minutes required between password requests.  The possible values are any positive number of minutes.  The default value is 120.<BR>\nWhen a password is requested, a new password is created and emailed to the account holder at their \"real email\" account.  This variable is designed to prevent a user from being flooded with new password emails sent by an abusive user.</P>','num','General');
INSERT INTO `vars` VALUES ('use_static_pages','0','<P>This variable determines whether or not Scoop will cache story pages as plain text files for faster display to anonymous users.  The possible values are: 0) do not use static pages; and 1) use static pages.  The default value is 1.<BR>\nStatic pages are only shown to anonymous users, who do not get any customization beyond the comment view chosen.  The static pages are stored in the filesystem at the location defined in the variable <B>page_path</B>.  See the Scoop Admin Guide for details.</P>','bool','Static Pages');
INSERT INTO `vars` VALUES ('page_path','/www/scoop/cache','<P>This variable sets the filesystem location of cached pages.  The possible values are an absolute filesystem path which is owned by the apache user, or at least for which the apache user has write permission.  The default value is the probably invalid /www/scoop/cache.<BR>\nThis variable has no effect unless the variable <B>use_static_pages</B> is set to 1.  Pages are only cached for anonymous users.</P>','text','Static Pages');
INSERT INTO `vars` VALUES ('wrap_long_lines','1','<P>This variable determines whether or not Scoop will force a newline for a very long word in a comment which won\'t wrap on its own.  The possible values are: 0) do not force line wrapping; and 1) force line wrapping.  The default value is 1.<BR>\nThis feature has no effect on normal English writing, and only modifies a long series of non-space characters, such as those used to force a page ridiculously wide so readers have to scroll sideways.  The maximum length of a word without a space is set in the variable <B>wrap_long_lines_at</B>.</P>','bool','Security');
INSERT INTO `vars` VALUES ('wrap_long_lines_at','100','<P>This variable determines how long a word (non-space characters in a row) can be before Scoop forces a newline to allow browsers to wrap the lines properly.  The possible values are any positive integer.  The default value is 100.<BR>\nThis variable has no effect unless the variable <B>wrap_long_lines</B> is set to 1.  This variable should be set longer than any legitimate word, and short enough that displaying it will not widen the page for people with small browser windows.</P>','num','Security');
INSERT INTO `vars` VALUES ('wrap_pre','1','<P>This variable determines whether or not Scoop will force a newline on long lines in the &lt;PRE&gt; environment.  The possible values are: 0) allow PRE lines to be as long as the user specifies; and 1) force a wrap after a certain length for PRE lines.  The default value is 1.<BR>\nThis variable is only useful if you have allowed the PRE tag in the variable <B>allowed_html</B>.</P>','bool','Security');
INSERT INTO `vars` VALUES ('wrap_pre_at','100','<P>This variable determines the maximum length of a line inside the PRE tag.  The possible values are any positive integer.  The default value is 100.<BR>\nThis variable has no effect unless the variable <B>wrap_pre</B> is set to 1.  This variable should be set long enough that it doesn\'t interfere with desirable displays (such as code snippets, if your site has programmer members) but short enough that lines near the maximum length do not widen the page excessively.</P>','num','Security');
INSERT INTO `vars` VALUES ('spellcheck_enabled','0','<P>This variable determines whether or not Scoop uses the optional spell-checking functionality.  The possible values are: 0) do not use spellcheck; and 1) use spellcheck.  The default value is 0.<BR>\nSpell-checking requires the aspell program and the Text::Aspell perl module.  See the Scoop Admin Guide for details.</P>','bool','Spellchecker');
INSERT INTO `vars` VALUES ('advertiser_group','Advertisers','This variable is not actually used at this time, as most sites which use Scoop\'s ad server allow regular users to submit advertisements so the feature was never completed.','text','Advertising');
INSERT INTO `vars` VALUES ('use_ads',NULL,'<P>This variable determines whether or not Scoop\'s advertisement system is active.  The possible values are: 0) no ads; and 1) use ads.  The default value is 0.<BR>\nBefore turning on the ad system, please read the Scoop Admin Guide for detailed instructions on its configuration and use.</P>','bool','Advertising');
INSERT INTO `vars` VALUES ('ad_server_url','http://ads.example.com/','<P>This variable determines where advertisement files will be served from.  This does not apply to text ads, only to ads including a separate file, such as an image file.  The value must be an absolute public URL ending in a slash, including any path elements required to bring it to the same level as the local pathname set in <B>ad_files_base</B>.  In both cases, the user id is appended as a subdirectory, and the file is placed in the user\'s subdirectory.  If this public URL does not correspond to the local path set in <B>ad_files_base</B>, the saved ad files will not be displayed.<BR>\nThis variable has no effect unless the variable <B>use_ads</B> is set to 1.</P>','text','Advertising');
INSERT INTO `vars` VALUES ('ad_files_base','/www/scoop/html/images/ads','<P>This variable determines where advertisement file uploads will be stored, if an ad type requiring file uploads is available.  The value must be an absolute local pathname, not ending in a slash.<BR>\nThe default value is a (probably) invalid local path.  The value set here should be that of a path for which apache has full write access, and which is available from the internet at the URL specified in the variable <B>ad_server_url</B>.  In both cases, the user id is appended as a subdirectory, and the file is placed in the user\'s subdirectory.  If the path set in this variable does not exist, or does not allow apache write access, any ads that require file uploads will not work.<BR>\nThis variable has no effect unless the variable <B>use_ads</B> is set to 1.</P>','text','Advertising');
INSERT INTO `vars` VALUES ('rating_wipe_group','','<P>This variable names the group a user is moved to if an admin wipes their ratings.  The possible value is any existing user group which does not have the perm <B>comment_rate</B> set.  The default value is blank.<BR>\nIf the variable is blank, the user\'s group is not changed and only past ratings are undone.  If an existing user group which still has permission to rate comments is set here, it\'s rather pointless.</P>','text','Security');
INSERT INTO `vars` VALUES ('sendmail_program','/usr/sbin/sendmail','<P>This variable contains the full path to the sendmail program Scoop uses to send email.  The possible value is an absolute local filesystem path to the sendmail executable.  The default value is /usr/sbin/sendmail<BR>\nThis variable has no effect unless the SMTP host variable in httpd.conf is set to \"-\".</P>','text','General');
INSERT INTO `vars` VALUES ('paranoid_logging','0','<P>This variable determines whether or not identifying info is logged in Apache\'s error log with every request.  The possible values are: 0) do not log extra information; and 1) record the extra information.  The default value is 0.<BR>\nThe information logged is the IP address, apache process ID, user ID, nickname, session, and any arguments, including the op and the full contents of any form.  There\'s a reason it\'s called \"paranoid\"...</P>','bool','Security');
INSERT INTO `vars` VALUES ('req_extra_advertiser_info','0','<P>This variable determines whether or not advertisers must provide extra information before they can submit advertisements to the site.  FIXME: Yet another unimplemented ad feature.','bool','Advertising');
INSERT INTO `vars` VALUES ('time_24h_format','0','<P>This variable determines whether Scoop displays times using the 24 hour format, or with AM/PM.  The possible values are: 0) use AM/PM times; and 1) use the 24-hour clock.  The default value is 0.</P>','bool','General');
INSERT INTO `vars` VALUES ('use_fulltext_indexes',NULL,'<P>This variable determines whether or not Scoop should use the \"fulltext\" indexes when searching comments and stories.  The possible values are: 0) do not use fulltext indexes; and 1) use fulltext indexes.  The default value is 0.<BR>\nThis variable should only be set to 1 if your database is capable of fulltext indexes and you have created the required indexes beforehand.  Fulltext indexes allows you to sort search results by relevance or date, and weights search terms based on how frequently they appear.  See the Scoop Admin Guide for details.</P>','bool','General');
INSERT INTO `vars` VALUES ('formkey_timeout','21600','<P>This variable determines how long a form key (used in comment and story posting) is valid for.  The possible values are any positive number of seconds.  The default value is 21600 (6 hours).<BR>\nThe formkey is required to validate comments and stories, and helps prevent accidental duplicate posting due to double-clicking the Post button and similar situations.</P>','num','Comments,Stories');
INSERT INTO `vars` VALUES ('log_ip_for_ads','0','<P>This variable determines whether or not ad impressions and clickthroughs are logged.  The possible values are: 0) do not log individual impressions; and 1) log individual impressions.  The default value is 0.<BR>\nAd logging includes the UID and IP of the person viewing or clicking the ad, as well as the ad\'s ID and a timestamp.  This variable has no effect unless the advertising system is active; see the Scoop Admin Guide for more details on advertising.</P>','bool','Advertising');
INSERT INTO `vars` VALUES ('mail_ad_reminders','1','<P>This variable determines whether or not a notice will be sent to the advertiser when a particular ad has almost run out of impressions.  The possible values are: 0) do not email the notice; and 1) email the notice.  The default value is 1.<BR>\nThe number of impressions remaining which triggers the notice is set in the variable <B>mail_ad_reminder_on</B>.  This variable has no effect unless the advertising system is active; see the Scoop Admin Guide for more details on advertising.</P>','bool','Advertising');
INSERT INTO `vars` VALUES ('mail_ad_reminder_on','100','<P>This variable determines how many impressions must be left for Scoop to send the advertiser a notice informing him his impressions are running low.  The possible values are any positive integer.  The default value is 100.<BR>\nThis variable has no effect unless the variable <B>mail_ad_reminders</B> is set to 1, and the advertising system is active; see the Scoop Admin Guide for more details on advertising.  The value should be high enough that the advertiser has time to return to the site and create a new ad, but low enough that the campaign really is \"almost finished\", relative to the minimum number of impressions that may be purchased.</P>','num','Advertising');
INSERT INTO `vars` VALUES ('mail_ad_finished_reminder','1','<P>This variable determines whether or not a notice will be sent to the advertiser when a particular ad has run out of impressions.  The possible values are: 0) do not email the advertiser when the last impression is viewed; and 1) email the advertiser when the last impression is viewed.  The default value is 1.<BR>\nThis variable has no effect unless the advertising system is active; see the Scoop Admin Guide for more details on advertising.</P>','bool','Advertising');
INSERT INTO `vars` VALUES ('activate_upon_approve','1','<P>This variable affects the activation of new advertisements.  The possible values are: 1) activate an advertisement automatically when the ad is approved by an admin; and 0) the advertisement is activated by the payment processing system.<BR>\nThe default value is 1.  If you <I>are not</I> getting payments for the ads via Scoop\'s payment processing system, 1 is an appropriate value.  If you <I>are</I> getting payments for the ads via Scoop\'s payment processing system, the ads will be activated by the payment processing system once they have been approved and paid for and this variable can be set to 0.<BR>\nThis variable has no effect unless the variable <B>use_ads</B> is set to 1.<BR>\nSetting this variable to 1 when you are using Scoop\'s payment processing system results in ads paid for via credit card to not actually get paid for, as credit card payments are approved through the credit card company, then sent for admin approval, and only after approval are they actually paid for and activated by the cc_bill_orders box.</P>','bool','Advertising');
INSERT INTO `vars` VALUES ('default_box_template','box','<P>This variable names the default box template, for use when a box is not assigned a template on creation.  The possible values are the names of any of the box templates (in the Blocks Admin Tool, in the boxes category).  The default value is box.<BR>\nChanging this value may have unintended effects on the site\'s display; some boxes may not have had a box template assigned when they were created.</P>','text','General');
INSERT INTO `vars` VALUES ('min_ad_prepay_amount','12.00','<P>This variable determines the minimum amount of money Scoop will allow people to pay when ordering ads or subscriptions.  FIXME: Yet another unimplemented ad feature.</P>','text','Advertising');
INSERT INTO `vars` VALUES ('auto_post_floor','0','<P>This variable affects the story auto-posting system.  It determines the lowest score at which a story will still be considered for auto-posting.  Any stories with scores below this value will simply be dumped when the auto-post limit is reached.  The possible value is any number between the variables <B>hide_story_threshold</B> and <B>post_story_threshold</B>, inclusive.  The default value is 0.<BR>\nThis variable has no effect unless the variable <B>use_auto_post</B> is set to 1.  If this value is set too high, good stories may not be auto-posted when they otherwise should be.<BR>\nPlease read the Scoop Admin Guide for a description of how the auto-post system works.</P>','num','Stories');
INSERT INTO `vars` VALUES ('auto_post_min_ratings','0','<P>This variable affects the calculations in the auto-post algorithm (described in the Scoop Admin Guide).  The possible value is any positive integer.  The default value is 0.<BR>\nThis variable has no effect unless the variable <B>use_auto_post</B> is set to 1.<BR>\nThis variable is also known as the \"boring story penalty\", since if the number of rated comments in a story is below this number, the number of rated comments used in the auto-post calculations is set equal to this number, while the value of those rated comments is left alone.  This results in a lower score for the story when it is considered for auto-posting.  If the value is too high, it will reduce the number of stories that are auto-posted.</P>','num','Stories');
INSERT INTO `vars` VALUES ('auto_post_use_time','0','<P>This variable determines whether or not the auto-post algorithm is triggered by a time limit or by a total number of votes.  The possible values are: 0) auto-post stories when a certain number of votes have been cast; and 1) auto-post stories when the story has been in the voting queue for more than a certain period of time.  The default value is 0.<BR>\nThis variable has no effect unless the variable <B>use_auto_post</B> is set to 1.<BR>\nThe maximum time a story may spend in the queue is set in the variable <B>auto_post_max_minutes</B>.  The maximum number of votes a story may receive before being subject to the auto-post algorithm is set in the variable <B>end_voting_threshold</B>.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('auto_post_max_minutes','2160','<P>This variable determines how long a story must remain in the voting queue before Scoop runs the auto-post algorithm (described in the Scoop Admin Guide) on it.  The possible value is any positive integer number of minutes.  The default value is 2160 (36 hours).<BR>\nThis variable has no effect unless both the variables <B>use_auto_post</B> and <B>auto_post_use_time</B> are set to 1.  If this value is set too low, stories that would otherwise be voted up normally will be subject to auto-posting; if set too high, stories that need auto-posting will languish in the voting queue for far too long.  A suitable value for your site will depend entirely on the amount of traffic you get and how active members are in voting on articles.</P>','num','Stories');
INSERT INTO `vars` VALUES ('ad_story_section','advertisements','<P>This variable determines which section advertisements will be filed in if they allow comments.  The value must be the internal name (not the display name) of an existing section with the section permission \"Post Stories\" set to \"Hide\" for all groups.<BR>\nThe default value is advertisements.  This value is invalid because Scoop does not include an advertisements section by default.  The section name may be any string of letters or numbers, but no spaces.  It should be something that indicates the presence of ads.  Once some ads with discussions available have been posted, this variable <I>should not</I> be changed.<BR>\nThis variable has no effect unless both the variable <B>use_ads</B> and at least one active ad type has the ad property \"Allow Ad Discussions\" turned on.</P>','text','Advertising');
INSERT INTO `vars` VALUES ('ads_judge_unpaid','1','<P>This variable affects the judging process for new advertisements.  The possible values are: 0) Only paid ads will be presented for judging and approval, or 1) All ads not yet approved will be presented for judging and approval, regardless of paid status.<BR>\nThe default value is 1.  Free ads are automatically marked as paid when submitted.  Setting this variable to 0 is recommended, so you don\'t have to sort through a mixture of paid and unpaid ads awaiting approval.<BR>\nThis variable has no effect unless the variable <B>use_ads</b> is set to 1.</p>','bool','Advertising');
INSERT INTO `vars` VALUES ('default_displaystatus','0','<P>This variable determines what the default display status should be when the story edit form is opened. The possible values are: -3) Editing; -2) Voting; -1) Never Display (deleted); 0) Always Display (front page); 1) Only Display in Section. The default value is 0.<BR>This variable is used if the story edit form is loaded without a story, as in the New Story Admin Tool or the regular submit story form for users with the perm <B>story_displaystatus_select</B>.</P>','num','Stories');
INSERT INTO `vars` VALUES ('ad_story_topic','ads','<P>This variable determines which topic advertisements will be filed in if they allow comments.  The value must be the internal name (not the display name) of an existing topic.<BR>\nThe default value is ads.  This value is invalid because Scoop does not include an ads topic by default.  The topic name may be any string of letters or numbers, but no spaces.  It may be something that indicates the presence of ads, but a generic topic may also be used, as this topic will also be available to anybody posting a story.  Once some ads with discussions available have been posted, this variable <I>should not</I> be changed.<BR>\nThis variable has no effect unless both the variable <B>use_ads</B> and at least one active ad type has the ad property \"Allow Ad Discussions\" turned on.</P>','text','Advertising');
INSERT INTO `vars` VALUES ('comment_ip_log','0','<P>This variable determines whether or not Scoop records the IP address of a poster with each comment.  The possible values are: 0) do not log poster IP address; and 1) log poster IP address.  The default value is 0.<BR>\nHopefully this can help identify problem duplicate accounts.  To view the IP addresses saved, see the variable <B>view_ip_log</B>.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('view_ip_log','0','<P>This variable determines whether or not comment poster IP addresses are displayed in the comment header.  The possible values are: 0) do not display IP addresses; and 1) display IP addresses.  The default value is 0.<BR>\nThis variable has no effect unless the variable <B>comment_ip_log</B> is set to 1 and the user has the perm <B>view_comment_ip</B>.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('charset','ISO-8859-1','<P>This variable determines which character set Scoop sends to a browser.  The possible values are theoretically any valid character set, but there appear to be issues with some non-western character sets (such as big5).  The default value is ISO-8859-1.<BR>\nIf you must use a different character set, be aware that it may cause things to break in unusual ways.  Scoop internationalization is still in the planning stages; check http://scoop.kuro5hin.org/ for any updates.</P>','text','General');
INSERT INTO `vars` VALUES ('no_cache','0','<P>This variable determines whether or not Scoop will include the header information required to prevent proxies from caching your pages.  The possible values are: 0) do not include the cache prevention headers; and 1) include the cache prevention headers.  The default value is 0.<BR>\nSince Scoop\'s pages are generally entirely dynamic, having them cached will litter out-of-date scoop pages around in caches all over the internet.</P>','bool','General');
INSERT INTO `vars` VALUES ('enable_subsections',NULL,'<P>This variable determines whether or not your site will handle subsections.  The possible values are: 0) subsections are not used; and 1) subsections are used.  The default value is 0.<BR>\nPlease see the Scoop Admin Guide for more information on Scoop\'s subsections.</P>','bool','General');
INSERT INTO `vars` VALUES ('mojo_ignore_diaries','0','<P>This variable determines whether or not comments posted to diaries are counted toward a user\'s mojo.  The possible values are: 0) comments in diaries are treated the same as other comments; and 1) comments in diaries do not have their ratings counted in mojo calculations.  The default value is 0.<BR>\nThis variable has no effect unless the variable <B>use_mojo</B> is set to 1.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('allow_ad_renewal','1','<P>This variable determines whether or not a user is allowed to renew an existing advertisement.  The possible values are: 0) renewals are not allowed; and 1) renewals are allowed.  The default value is 1.<BR>\nThis variable has no effect unless the advertising system is active.  If ad renewals are permitted, the renewal link is shown on the ad statistics page which only the ad owner can see. Ad renewal is yet another unimplemented ad feature. Leave this off.</p>','bool','Advertising');
INSERT INTO `vars` VALUES ('allow_dynamic_comment_mode','1','<P>This variable determines whether or not a user may use one of the dynamic comment modes to view comments.  The possible values are: 0) do not allow users to choose either of the dynamic comment modes; and 1) allow users to choose either of the dynamic comment modes.  The default value is 0.<BR>\nBefore dynamic comments can be used, several blocks must be modified to include the necessary javascript and setup information.  See the Scoop Admin Guide for details on how to set up dynamic comments.<BR>\nDynamic comment mode requires javascript to work, and will only work with \"5th generation\" browsers, that is, Netscape 6 or higher, IE 5 or higher, Mozilla, and other browsers with equivalent javascript support.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('secure_site_url','https://scoop.example.com','<P>This variable contains the secure version of <B>site_url</b>.  The possible values are a fully qualified domain name.  The default value is an invalid URL.<BR>\r\nThis should most likely be the same as <B>site_url</b> except with https:// instead of http://.  This variable has no effect unless you have the payment processing system turned on.  See the Scoop Admin Guide for more details.  If you have a secure site running, the entire Scoop site is browsable using it.  Some pages (such as those collecting payment details) must be; you may be able to configure Apache to disallow secure browsing of other pages.</p>','text','General');
INSERT INTO `vars` VALUES ('default_theme','default','<P>This variable determines which theme will be used as a base for all other themes to build on.  The possible values are any theme name which is a complete set of Scoop blocks when taken alone.  The default value is default.<BR>\nThis variable is used whether or not the variable <B>use_themes</B> is set to 1 or 0; it provides a full set of blocks to use alone or as a base for other themes either way.  It must always be set to a fully populated theme or your site may become completely unusable, depending on which blocks are missing.</P>','text','Themes');
INSERT INTO `vars` VALUES ('use_themes','0','<P>This variable determines whether or not themes are used at all.  The possible values are: 0) do not use any themes; and 1) use themes.  The default value is 0.<BR>\nSee the Scoop Admin Guide for details on configuring themes.</P>','bool','Themes');
INSERT INTO `vars` VALUES ('spam_votes_percentage','0.25','<P>This variable determines what percentage of spam votes must be cast for an article in the editing queue to be forced to voting without the author\'s consent.  The possible values are any number between 0 and 1.  The default value is 0.25.<BR>\nThis variable has no effect unless the variable <B>use_anti_spam</B> is set to 1.  For a description of the edit queue anti-spam algorithm, see the Scoop Admin Guide.</P>','num','Stories');
INSERT INTO `vars` VALUES ('spam_votes_threshold','100','<P>This variable determines how many spam votes must be registered before the anti-spam algorithm determines whether or not force a story into the voting queue without the author\'s consent.  The possible values are any positive integer.  The default value is 100.<BR>\nThis variable has no effect unless the variable <B>use_anti_spam</B> is set to 1.  For a description of the edit queue anti-spam algorithm, see the Scoop Admin Guide.</P>','num','Stories');
INSERT INTO `vars` VALUES ('logout_url','','<P>This variable is used when a user logs off.  The possible values are an absolute path (beginning with a /), a fully qualified URL, or blank, which will go to the site\'s front page.  The default value is blank.<BR>\nIf you like, you can create a page saying goodbye or any other message appropriate for logging out using the Special Pages Admin Tool, and put its path here.</P>','text','General');
INSERT INTO `vars` VALUES ('use_anti_spam','1','<P>This variable determines whether or not a spam button is displayed in the editing queue.  The possible values are: 0) no spam button; and 1) show the spam button.  The default value is 1.<BR>\nThe variables <B>spam_votes_threshold</B> and <B>spam_votes_percentage</B> are used to calculated whether or not a story should be forcibly removed from the edit queue.  Without the spam button, a \"crapflood\" or garbage story placed in the edit queue will remain there until the edit queue time limit.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('use_edit_categories','0','<P>This variable determines whether or not \"edit categories\" should be used.  The possible values are: 0) do not use edit categories; and 1) use edit categories.  The default value is 0.<BR>\nEdit categories are really only useful with a closed moderation queue, and provide a way for the admins to distinguish between stories still being written and stories being considered for publication.  See the Scoop Admin Guide for details.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('story_auto_vote_zero','0','<P>This variable determines whether or not a story in the voting queue receives an automatic zero (Abstain) vote when the story is viewed.  The possible values are: 0) do not auto-vote; and 1) auto-vote.  The default value is 0.<BR>\nThis variable is only useful if your site is using a closed voting queue and stories are published by an editor marking it as published instead of the normal voting mechanism.  The purpose of this variable is to allow editors to see which stories they\'ve read already.  If this variable is set, editing a story clears all votes, indicating to the editor that there has been an unread change to the story.<BR>\nThis variable should never be set to 1 if you are using an open voting queue.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('editorial_comment_default','0','<P>This variable determines whether or not the mode of a comment posted to a story in one of the queues is automatically set to \"editorial\" or if it is not pre-set.  The possible values are: 0)do not pre-set the comment type; and 1) pre-set the comment type to editorial.  The default value is 0.<BR>\nOnce a story is out of the queue and is published, editorial comments are hidden by default.  Users must have the permission <B>editorial_comments</B> in order to post comments in editorial mode.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('default_commentstatus','0','<P>This variable determines whether comments are permitted or not when a new story is created.  The possible values are: 0) comments are permitted; -1) comments are not permitted; and 1) comments are \"read only\".  The default value is 0.<BR>\nThe distinction between \"not permitted\" and \"read only\" is explained in the Scoop Admin Guide.<BR>\nIf you were creating a discussion site, you would want to leave this set to 0; if, however, you were using Scoop to manage articles but did not want comments by regular users, you would then change this value.</P>','num','Stories, Comments');
INSERT INTO `vars` VALUES ('allow_uploads','0','<P>This variable determines whether or not any file uploads are permitted.  The possible values are: 0) no file uploads are permitted; and 1) file uploads are permitted.  The default value is 0.<BR>\nPlease see the Scoop Admin Guide for a description of what file upload functions are available, and for an explanation of how to configure them.  The variables which must be configured before this variable is set to 1 are described in the Scoop Admin Guide, and are located in the Uploads category of the Site Controls.</P>','bool','Uploads');
INSERT INTO `vars` VALUES ('upload_delete','0','<P>This variable determines whether or not a user can delete the files he uploaded to Scoop.  The possible values are: 0) do not allow file deletion; and 1) allow file deletion.  The default value is 0.<BR>\nThis variable has no effect unless the variable <B>allow_uploads</B> is set to 1.  If users are permitted to embed items (such as images) in their file upload space in their stories, allowing file deletion will break the display.</P>','bool','Uploads');
INSERT INTO `vars` VALUES ('upload_rename','0','<P>This variable determines whether or not uploaded files can be renamed by their owner.  The possible values are: 0) do not allow file deletion; and 1) allow file deletion.  The default value is 0.<BR>\nThis variable has no effect unless the variable <B>allow_uploads</B> is set to 1.  If users are permitted to embed items (such as images) in their file upload space in their stories, allowing file renaming will break the display of those images.</P>','bool','Uploads');
INSERT INTO `vars` VALUES ('upload_link_admin','','<P>This variable determines where admin uploaded files will be accessible through the web.  The possible values are an absolute path, ending in a /.  The default value is blank.<BR>\nThis variable has no effect unless the variable <B>allow_uploads</B> is set to 1.  The admin upload path is shared by all users with the perm <B>upload_admin</B>.</P>','text','Uploads');
INSERT INTO `vars` VALUES ('upload_link_user','','<P>This variable determines where user uploaded files will be accessible through the web.  The possible values are an absolute path, ending in a /.  The default value is blank.<BR>\nThis variable has no effect unless the variable <B>allow_uploads</B> is set to 1.  The user upload path is a subdirectory named for the user\'s UID under the path defined here.</P>','text','Uploads');
INSERT INTO `vars` VALUES ('upload_path_admin','','<P>This variable determines where admin uploaded files are saved on the filesystem.  The possible values are any absolute local filesystem path, ending with a /.  The default value is blank.<BR>\nThis variable has no effect unless the variable <B>allow_uploads</B> is set to 1.  The directory named in this variable must be either owned by the web server user, or writeable by it.','text','Uploads');
INSERT INTO `vars` VALUES ('upload_path_user','','<P>This variable determines where user uploaded files are saved on the filesystem.  The possible values are any absolute local filesystem path, ending with a /.  The default value is blank.<BR>\nThis variable has no effect unless the variable <B>allow_uploads</B> is set to 1.  The directory named in this variable must be either owned by the web server user, or writeable by it, and the web server must be able to create subdirectories in this directory.','text','Uploads');
INSERT INTO `vars` VALUES ('show_prefs_on_first_login','1','<P>This variable determines whether or not a new user is sent to the user preferences page the first time he logs on.  The possible values are: 0) the first login is normal, and sends the user to the front page; and 1) the first login is special, and sends the user to his preferences page.  The default value is 1.</P>','bool','General');
INSERT INTO `vars` VALUES ('require_story_preview','1','<P>This variable determines whether or not a user must preview story and diary submissions at least once before submitting.  The possible values are: 0) user can submit without previewing; and 1) user must preview at least once before submitting.  The default values is 1.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('use_logging','0','<P>This variable determines how much administrator activity is logged.  The possible values are: 0) log nothing; 1) log basic information; and 2) log extended information.  The default value is 0.<BR>\nLogging requires that the logging hooks as well as this variable are activated.  See the Scoop Admin Guide for more details.</P>','num','General');
INSERT INTO `vars` VALUES ('order','section','<P>This variable determines which themes to apply in what order.  The possible values are a comma-separated list of criteria.  The default value is section.<BR>\nThis variable has no effect unless the variable <B>use_themes</B> is set to 1.  The themes associated with the criteria are applied in the order listed here, with later themes overwriting earlier ones, if they overlap.  The possible criteria are: section, siteid, agent, pref, and group.  See the Scoop Admin Guide for more information on themes.</P>','text','Themes');
INSERT INTO `vars` VALUES ('allow_user_themes','0','<P>This variable determines whether or not the user may choose a theme to apply to the site.  The possible values are: 0) users may not choose a theme; and 1) users may choose a theme from a specified list. The default value is 0.<BR>\nIf this variable is set to 1, users may only choose a theme from the list in the variable <B>user_themes</B>, or choose to apply none.  This variable has no effect unless the variable <B>use_themes</B> is set to 1.<BR>\nFor more details on themes, see the Scoop Admin Guide.</P>','bool','Themes');
INSERT INTO `vars` VALUES ('user_themes','','<P>This variable determines which themes a user may choose from in his display preferences.  The possible values are a comma-separated list of themes present in the Blocks Admin Tool.  The default value is blank.<BR>\nThis variable has no effect unless the variables <B>use_themes</B> and <B>allow_user_themes</B> are set to 1.  The user may choose between the themes listed here.</P>','text','Themes');
INSERT INTO `vars` VALUES ('section_news','greyscale','<P>This variable sets which theme is applied to the news section.  The possible value is any existing theme name.  The default value is greyscale.<BR>\nThis variable has no effect unless the variable <B>use_themes</B> is turned on.  This is a demonstration variable; to set themes for other sections, create new variables with the internal name of the section in place of \"news\", the same way this variable is set up.  For more information on setting up themes, see the Scoop Admin Guide.</P>','text','Themes');
INSERT INTO `vars` VALUES ('autorelated','Scoop, http://scoop.kuro5hin.org/\r\nKuro5hin, http://www.kuro5hin.org/\r\nSlashdot, http://www.slashdot.org/\r\nFreshmeat, http://www.freshmeat.net/\r\n','<P>This variable extends the \"related links\" box associated with a story by allowing you to define some links Scoop should automatically add every time a particular keyword appears in a story.<BR>\r\nThis variable affects display only.  The \"related links\" box lists every link in the story in one convenient spot.<BR>\r\nThe format is a keyword or keyphrase, a comma, and a URL.  One entry per line, no comma at the end of the line.</p>','tarea','Stories');
INSERT INTO `vars` VALUES ('admin_alert','scoop@example.com','<P>This variable is used throughout Scoop, whenever something requires the attention of an administrator.  The only possible values for this variable are a single valid email address or a list of valid email addresses separated by commas.<BR>\nThe default value is an invalid email address, and must be changed.  The email address entered should be the email address of the site administrator or administrators, and should be one that is checked regularly.<BR>\nMany error and security functions depend on this variable holding a valid, actively read email address.  If this variable contains an invalid or unread email address, notices of site errors, posting violations, and situations which require admin intervention will not be dealt with as an email to the addresses in this variable are usually the only notification provided.</P>','tarea','General');
INSERT INTO `vars` VALUES ('allowed_html','A, HREF, NAME, -close\r\nB, -close\r\nP\r\nI, -close\r\nOL, -close\r\nUL, -close\r\nLI\r\nDL, -close\r\nDT\r\nDD\r\nEM, -close\r\nBR\r\nSTRONG, -close\r\nBLOCKQUOTE, TYPE=cite, -close\r\nCITE, -close\r\nTT, -close\r\nCODE, -close\r\n','<P>This variable determines which HTML tags are available to users posting comments or stories, and which elements of those tags are allowed.  The value must follow the format described below.  You should have a reasonable knowledge of HTML before editing this variable.<BR>\nThe default allows a fairly flexible, if limited, subset of HTML in all comments and stories to all user groups.  Tags may be added or removed depending on the culture of the site, and you may specify some tags as allowed only to certain users or only in certain locations.<BR>\nOne HTML tag is listed per line, beginning with the tag itself, followed by a comma-separated list of allowed tag elements and parser commands.  For example:\n<PRE>A, HREF, NAME, -close</PRE>\nallows the A tag to be used with only the elements \"href\" and \"name\", and requires that the tag be closed with a &lt;/A&gt;.  To further specify what is permitted, a perl regular expression may be used alongside a tag element.  For example:\n<PRE>A, HREF=\"^http://\", NAME, -close</PRE>\nallows the A tag to be used with the same two elements as above, but the \"href\" element must contain a value which begins with (the ^ indicates the string following must be at the beginning of the string we\'re testing against) http://.<BR>\nYou may also specify which user groups are permitted to use a specific HTML tag.  For example:\n<PRE>IMG, src, alt, height, width, -groups=\"Superuser Admins Editors\"</PRE>\nwould allow the use of the IMG tag and the listed tag elements for the three groups listed only.  Any group name may be used here.  The entire list of groups may be inverted, giving all groups <I>except</I> those listed access to the tag with\n<PRE>-group=\"!Anonymous Restricted\"</PRE>\nwhich denies the use of a tag to the Anonymous and Restricted groups but allows it to all others).<BR>\nSimilarly, you may specify where a tag may be used.  For example:\n<PRE>IMG, src, alt, height, width, -context=\"body\"</PRE>\nwould allow the use of the IMG tag to any user group but only in the body (extended copy) of a story.  The list may be inverted in the same way as -group.  Valid contexts are intro (story\'s intro copy), body (story\'s extended copy), comment (comment body), and pref (signature and bio fields).<BR>\nWhich tags you permit in which locations depends entirely on you and the culture of your site.  Some sites will do fine with images allowed to all users in all locations; others will need to restrict images or remove them entirely.  Before adding a new tag, consider carefully how it could be used and abused by the members of your site.','tarea','Stories,Comments');
INSERT INTO `vars` VALUES ('all_html','TT, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nI, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nB, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nU, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nS, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nBIG, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nSMALL, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nEM, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nSTRONG, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nDFN, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nCODE, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nSAMP, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nKBD, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nVAR, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nCITE, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nABBR, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nACRONYM, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nSUB, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nSUP, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nSPAN, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nBDO, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nBASEFONT, id, size, color, face\r\nFONT, id, class, style, title, lang, dir, size, color, face, -close\r\nBR, id, class, style, title, clear=\"(?i)^(left|all|right|none)$\"\r\nBODY, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, onload, onunload, background, bgcolor, text, link, vlink, alink, -close\r\nADDRESS, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nDIV, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify)$\", -close\r\nCENTER, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nA, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, charset, type, name, href, hreflang, target, rel, rev, accesskey, shape, coords, tabindex, onfocus, onblur, -close\r\nMAP, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, name, -close\r\nAREA, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, shape, coords, href, target, nohref, alt, tabindex, accesskey, onfocus, onblur\r\nLINK, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, charset, href, hreflang, type, rel, rev, media, target\r\nIMG, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, src, alt, longdesc, name, height, width, usemap, ismap, align=\"(?i)^(top|middle|bottom|left|right)$\", border, hspace, vspace\r\nOBJECT, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, declare, classid, codebase, data, type, codetype, archive, standby, height, width, usemap, name, tabindex, align, border, hspace, vspace, -close\r\nPARAM, id, name, value, valuetype=\"(?i)^(DATA|REF|OBJECT)$\", type\r\nAPPLET, id, class, style, title, codebase, archive, code, object, alt, name, width, height, align, hspace, vspace, -close\r\nHR, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right)$\", size, width\r\nP, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify)$\"\r\nH1, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify)$\", -close\r\nH2, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify)$\", -close\r\nH3, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify)$\", -close\r\nH4, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify)$\", -close\r\nH5, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify)$\", -close\r\nH6, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify)$\", -close\r\nPRE, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, width, -close\r\nQ, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, cite, -close\r\nBLOCKQUOTE, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, cite, -close\r\nINS, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, cite, datetime, -close\r\nDEL, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, cite, datetime, -close\r\nDL, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, compact, -close\r\nDT, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nDD, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nOL, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, type=\"^(1|a|A|i|I)$\", compact, start, -close\r\nUL, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, type=\"(?i)^(disk|square|circle)$\", compact, -close\r\nDIR, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, compact, -close\r\nMENU, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, compact, -close\r\nLI, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, type=\"^(1|a|A|i|I|((?i)disk|square|circle))$\", value\r\nFORM, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, action, method=\"(?i)^(GET|POST)$\", enctype, accept, name, onsubmit, onreset, target, accept-charset, -close\r\nLABEL, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, for, accesskey, onfocus, onblur, -close\r\nINPUT, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, type=\"(?i)^(text|password|checkbox|radio|submit|reset|file|hidden|image|button)$\", name, value, checked, disabled, readonly, size, maxlength, src, alt, usemap, ismap, tabindex, accesskey, onfocus, onblur, onselect, onchange, accept, align\r\nSELECT, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, name, size, multiple, disabled, tabindex, onfocus, onblur, onchange, -close\r\nOPTGROUP, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, disabled, label, -close\r\nOPTION, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, selected, disabled, label, value\r\nTEXTAREA, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, name, rows, cols, disabled, readonly, tabindex, accesskey, onfocus, onblur, onselect, onchange, -close\r\nFIELDSET, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nLEGEND, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, accesskey, align=\"(?i)^(top|bottom|left|right)$\", -close\r\nBUTTON, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, name, value, type, disabled, tabindex, accesskey, onfocus, onblur, -close\r\nTABLE, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, summary, width, border, frame=\"(?i)^(void|above|below|hsides|lhs|rhs|vsides|box|border)$\", rules=\"(?i)^(none|groups|rows|cols|all)$\", cellspacing, cellpadding, align=\"(?i)^(left|center|right)$\", bgcolor, -close\r\nCAPTION, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(top|bottom|left|right)$\", -close\r\nCOLGROUP, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, span, width, align=\"(?i)^(left|center|right|justify|char)$\", char, charoff, valign=\"(?i)^(top|middle|bottom|baseline)$\", -close\r\nCOL, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, span, width, align=\"(?i)^(left|center|right|justify|char)$\", char, charoff, valign=\"(?i)^(top|middle|bottom|baseline)$\"\r\nTHEAD, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify|char)$\", char, charoff, valign=\"(?i)^(top|middle|bottom|baseline)$\", -close\r\nTBODY, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify|char)$\", char, charoff, valign=\"(?i)^(top|middle|bottom|baseline)$\", -close\r\nTFOOT, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify|char)$\", char, charoff, valign=\"(?i)^(top|middle|bottom|baseline)$\", -close\r\nTR, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify|char)$\", char, charoff, valign=\"(?i)^(top|middle|bottom|baseline)$\", bgcolor, -close\r\nTH, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify|char)$\", char, charoff, valign=\"(?i)^(top|middle|bottom|baseline)$\", abbr, acis, headers, scope=\"(?i)^(row|col|rowgroup|colgroup)$\", rowspan, colspan, nowrap, bhcolor, width, height, -close\r\nTD, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, align=\"(?i)^(left|center|right|justify|char)$\", char, charoff, valign=\"(?i)^(top|middle|bottom|baseline)$\", abbr, acis, headers, scope=\"(?i)^(row|col|rowgroup|colgroup)$\", rowspan, colspan, nowrap, bhcolor, width, height, -close\r\nFRAMESET, id, class, style, title, rows, cols, onload, onunload, -close\r\nFRAME, id, class, style, title, longdesc, name, src, frameborder=\"^(1|0)$\", marginwidth, marginheight, noresize, scrolling=\"(?i)^(yes|no|auto)$\"\r\nIFRAME, id, class, style, title, longdesc, name, src, frameborder=\"^(1|0)$\", marginwidth, marginheight, scrolling=\"(?i)^(yes|no|auto)$\", align, height, width, -close\r\nNOFRAMES, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nHEAD, lang, dir, profile, -close\r\nTITLE, lang, dir, -close\r\nISINDEX, id, class, style, title, lang, dir, prompt\r\nBASE, href, target\r\nMETA, lang, dir, http-equiv, name, content, scheme\r\nSTYLE, lang, dir, type, media, title, -close\r\nSCRIPT, charset, type, language, src, defer, event, for, -close\r\nNOSCRIPT, id, class, style, title, lang, dir, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, -close\r\nHTML, lang, dir, version, -close\r\n','<P>This variable contains a list of all HTML tags and their possible tag elements, using the same format as the variable <B>allowed_html</B>.  This is used for Scoop\'s HTML validator and parser for the blocks and special pages.<BR>\nThis variable should generally never be changed.</P>','tarea','Stories,Comments');
INSERT INTO `vars` VALUES ('perms','edit_user,\r\nedit_special,\r\nedit_boxes,\r\nedit_vars,\r\nedit_topics,\r\nlist_polls,\r\nedit_polls,\r\nedit_sections,\r\nstory_admin,\r\nstory_post,\r\nstory_list,\r\ncomment_post,\r\ncomment_delete,\r\ncomment_rate,\r\nmoderate,\r\nattach_poll,\r\npoll_vote,\r\npoll_post_comments,\r\npoll_read_comments,\r\nview_polls,\r\nedit_groups,\r\nsuper_mojo,\r\nrdf_admin,\r\nsubmit_rdf,\r\ncron_admin,\r\nad_admin,\r\nedit_blocks,\r\nsubmit_ad,\r\nhotlist,\r\nuse_spellcheck,\r\nview_comment_ip,\r\nshow_hidden_sections,\r\nedit_own_story,\r\nedit_ops,\r\nedit_hooks,\r\neditorial_comments,\r\nupload_content,\r\nupload_admin,\r\nupload_user,\r\nview_log,\r\nsubscription_admin,\r\nallow_subscription,\r\nsuballow_group_change,\r\nedit_macros,\r\nstory_displaystatus_select,\r\nstory_commentstatus_select,\r\nmake_new_accounts,\nbypass_safe_mode,\nadmin_search,\nad_opt_out,\nedit_prefs,\nedit_events,\nedit_event_properties,\nedit_calendars,\nsubmit_event,\nupdate_own_event,\nedit_own_calendar,\ncomment_toggle,\ncomment_remove,\r\nedit_my_stories,\r\nstory_time_update,\nview_user_files,\nevade_intro_limits,\nedit_story_tags','<P>This variable contains a list of all permissions used by Scoop, in a comma-separated list, one permission per line.<BR>\nIf any perm is added or removed from this list, the change will be reflected in the list of perms in the Groups Admin Tool.  Added perms default to off for all groups.  Removed perms are only removed from the admin tool; any removed perms that had been granted to groups before removal are still granted to those groups afterward.</P>','tarea','Security');
INSERT INTO `vars` VALUES ('hooks','comment_new(sid, cid)\r\ncomment_rate(sid, cid, uid, rating)\r\nstory_hide(sid)\r\nstory_leave_editing(sid)\r\nstory_new(sid)\r\nstory_post(sid, where)\r\nstory_update(sid)\r\nstory_vote(sid, uid, vote, section_only)\r\nuser_new(nick, is_advertiser)\r\ncomment_delete(sid, cid)\r\nstory_delete(sid)\r\ncomment_toggle(sid,cid,tool)\r\nfile_upload(path)\r\nuser_confirm(nick)\npref_change(uid,pref,newvalue)','<P>This variable contains a list of hooks recognised by Scoop for use in the Hooks Admin Tool.  The format of this variable is: one hook definition per line; each definition consists of the hook name and a comma-separated list of arguments it accepts in parentheses.<BR>\nEach hook is named based on an activity that can be taken on a Scoop site.  In the Hooks Admin Tool, each of these hooks can have code attached which will run when those activities are performed.  See the Scoop Admin Guide for more details.</P>','tarea','General');
INSERT INTO `vars` VALUES ('poll_archive_age','0','<P>This variable determines how old a poll must be before it is archived.  The possible values are: 0) do not archive polls; and any positive integer) the age of a poll in days before it will be considered for archiving.  The default value is 0.<BR>\nThis variable has no effect unless the archiving system is active.</P>','num','Polls,Archive');
INSERT INTO `vars` VALUES ('archive_ratings','1','<P>This variable determines whether or not the individual ratings of a comment are archived when the comment is archived.  The possible values are: 0) do not archive the individual ratings; and 1) archive the individual ratings.  The default value is 1.<BR>\nThis variable has no effect unless the comment archiving system is configured and enabled.  For more details on archiving, see the Scoop Admin Guide.  Since a comment\'s score and number of ratings are archived with the comment and archived comments cannot be rated, the individual ratings are not required to determine the comment\'s score, it is only available for extra information.</P>','bool','Comments,Archive');
INSERT INTO `vars` VALUES ('archive_moderations','1','<P>This variable determines whether or not the voting history of a story is archived when the story is archived.  The possible values are: 0) do not archive the voting history; and 1) archive the voting history.  The default value is 1.<BR>\nThis variable has no effect unless the story archiving system is configured and enabled.  For more details on archiving, see the Scoop Admin Guide.  Since a story\'s display status (ie, front page or section) is archived with the story, the voting history is not required to determine where it should be displayed but is only available for extra information.</P>','bool','Stories,Archive');
INSERT INTO `vars` VALUES ('comment_archive_age','31','<P>This variable prevents old stories with still-active discussions from being archived.  The possible values are any positive integer or zero and represent a number of days.  The default is 31.<BR>\nThis variable should be set to a smaller value than <B>story_archive_age</B>.  If zero, stories are archived according to <B>story_archive_age</B> alone; if any positive number, stories that would otherwise be archived are not if they have a comment posted fewer days ago than the value of this variable.</P>','num','Comments,Archive');
INSERT INTO `vars` VALUES ('story_archive_age','0','<P>This variable determines the age in days of stories to be archived.  The possible values are any positive number of days.  The default value is 0 (disabled).<BR>\nThis variable has no effect unless the archive database has been created and configured properly.  See the Scoop Admin Guide for details.  The effect of this variable is modified by the variable <B>comment_archive_age</B>; stories older than the value in this variable but with comments newer than the age specified in <B>comment_archive_age</B> will not be archived.</P>','num','Stories,Archive');
INSERT INTO `vars` VALUES ('disable_story_navbar','0','<P>This variable determines whether or not the navigation bar at the bottom of stories is displayed.  The possible values are: 0) show the navigation bar; and 1) hide the navigation bar.  The default value is 0.<BR>\nThe navigation bar is displayed directly underneath the story text and provides links to the previous and next stories.  Which stories those are can be the subject of confusion among users of the site.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('end_voting_threshold','-1','<P>This variable determines the number of votes a story in the voting queue must receive before the auto-post algorithm activates and determines if and where to post the story.  The possible values are any positive integer number, or any positive percentage.  The default value is -1.<BR>\nThis variable has no effect unless the variable <B>use_auto_post</B> is set to 1.  If the variable <B>auto_post_use_time</B> is set to 1, this variable is ignored and a time-based limit is used to activate the auto-post algorithm instead.</P>','num','Stories');
INSERT INTO `vars` VALUES ('use_alternate_scoring','0','<P>This variable determines which scoring calculations are used in the story voting queue.  The possible values are: 0) compare the story\'s total score to the thresholds; and 1) compare the number of positive and negative votes to the thresholds separately.  The default value is 0.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('front_page_ratio','0.50','<P>This variable determines whether a posted story should be placed on the front page or in the section page only.  The possible values are any decimal number between 0 and 1.  The default value is 0.50.<BR>\nThe number of front page votes is divided by the total number of positive votes to provide the ratio of front page votes.  If the calculated ratio is less than the value of this variable, the article is posted to the section.  This variable only takes effect if a story is voted up through the normal voting queue, and not if the story is posted using the auto-post algorithm.</P>','num','Stories');
INSERT INTO `vars` VALUES ('rdf_creator','','<P>This variable contains the name of the creator of your site\'s RDF feed.  The possible values are any string.  The default value is blank.<BR>\nThis variable has no effect unless the site is generating RDF feeds for syndication; see the Scoop Admin Guide for details.  If this variable is blank, the text in the variable <B>sitename</B> is used instead.</P>','text','RDF');
INSERT INTO `vars` VALUES ('rdf_publisher','','<P>This variable sets the identity of the publisher of the RDF file.  The possible values are any short string.  The default value is blank.<BR>\nThis variable has no effect unless the site is generating RDF feeds for syndication; see the Scoop Admin Guide for details.  If this is blank, the value of the variable <B>sitename</B> is used in its place.</P>','text','RDF');
INSERT INTO `vars` VALUES ('rdf_fetch_timeout','60','<P>This variable determines how long your site will wait before giving up when fetching another site\'s RDF feed.  The possible values are any positive number of seconds.  The default value is 60.<BR>\nThis variable has no effect unless the site is fetching RDF feeds for display; see the Scoop Admin Guide for details.</P>','num','RDF');
INSERT INTO `vars` VALUES ('hide_diary_search','0','<P>This variable determines whether or not diaries can be searched using Scoop\'s search form.  The possible values are: 0) allow diary searching; and 1) do not allow diary searching.  The default value is 0.<BR>\nThis variable has no effect unless the variable <B>use_diaries</B> is set to 1.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('hide_disabled_comments','0','<P>This variable determines whether or not comments to stories with comments disabled can be found in a comment search.  The possible values are: 0) allow disabled comments in search results; and 1) hide disabled comments in search results.  The default value is 0.<BR>\nStories with comments disabled don\'t display any comments or the comment controls when the story is viewed.</P>','bool','Search');
INSERT INTO `vars` VALUES ('hide_unposted_comments','0','<P>This variable determines whether or not comments from stories not published to either the front of any section are displayed in search results.  The possible values are: 0) comments attached to stories in the queue or hidden are shown in search results; and 1) comments attached to stories in the queue or hidden are not shown in search results.  The default value is 0.<BR>\nThis variable only applies to search results; comments on hidden stories can still be viewed when this variable is set to 1.</P>','bool','Search');
INSERT INTO `vars` VALUES ('carry_comment_titles','0','<P>This variable determines whether or not comments require new subjects or use the parent comment as a source.  The possible values are: 0) the comment\'s subject line is empty when a user clicks on the reply link; and 1) the comment\'s subject line contains \"Re: (previous subject line)\" when a user clicks on the reply link.  The default value is 0.<BR>\nIf the parent comment already has a subject beginning with \"Re:\", Scoop does not add another one.  If the user has changed the subject line, Scoop does not override it with the parent\'s subject.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('use_initial_rating','0','<P>This variable determines whether or not newly posted comments are given an initial rating.  The possible values are: 0) do not give an initial rating; and 1) give an initial rating.  The default value is 0.<BR>\nThe initial rating is completely overridden by the first real rating given by another user, unless the variable <B>real_initial_rating</B> is set to 1.  The actual value of the initial rating given is set in the variables <B>anonymous_default_points</B> and <B>user_default_points</B>.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('anonymous_default_points','2','<P>This variable sets an anonymously posted comment\'s initial value.  The possible values are any number between the values set in <B>rating_min</B> and <B>rating_max</B>, inclusive.  The default value is 2.<BR>\nThis variable has no effect unless the variable <B>use_initial_rating</B> is set to 1.<BR>\nThe value is used as an initial comment rating on all comments posted anonymously; a single rating by a user will cause the initial rating to vanish because it is not an actual comment rating.  It is merely used to give unrated comments a rank when comments are sorted by rating.</P>','num','Comments');
INSERT INTO `vars` VALUES ('user_default_points','3','<P>This variable determines the initial rating all registered users will receive on their comments.  The possible values are any number between <B>rating_min</B> and <B>rating_max</B>.  The default value is 3.<BR>\nThis variable has no effect unless the variable <B>use_initial_rating</B> is set to 1.</P>','num','Comments');
INSERT INTO `vars` VALUES ('recent_topics_num','0','<P>This variable determines how many topic images are shown in the (slashdot-style) list of most recent story topics.  The possible values are any positive integer.  The default value is 0.<BR>\nFIXME: The box displaying the recent topic images is not included in Scoop by default.  It seems to have been lost.</P>','num','Stories');
INSERT INTO `vars` VALUES ('show_threshold','0','<P>This variable determines whether or not the post and hide thresholds are displayed in the story moderation queue.  The possible values are: 0) do not show the thresholds; and 1) show the post and hide thresholds.  The default is 0.<BR>\nThe thresholds are taken from the variables <B>post_story_threshold</B> and <B>hide_story_threshold</B>.  If one or both of those thresholds are percentages, the numeric value at the time of the page request is calculated and displayed instead of the percentage.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('sections_excluded_from_all','Diary, advertisements, events','<P>This variable determines which sections will not be shown in the \"Everything\" pseudo-section or the RDF feed.  The possible values are a comma-separated list of section names.  The default list contains the Diary and adverts sections.</p>','text','Stories');
INSERT INTO `vars` VALUES ('story_nav_bar_sections','Diary, advertisements','<P>This variable lists the sections whose story navigation bar should only contain other stories from that section. The possible value is a comma-separated list of section names. The default value is the diary and ad sections.<BR>This only has an effect if the variable <B>disable_story_navbar</B> is set to 0. If the current story is not from one of the sections listed, then only stories also not in this list are considered when building the story navbar. If the current story is from one of the sections listed, then only stories also in that one section are considered when building the story navbar.</P>','text','Stories');
INSERT INTO `vars` VALUES ('diary_topics','0','<P>This variable determines whether or not users can select topics other than `diary\' for their diaries. The possible values are: 0) users may not select a topic; and 1) users may select any topic available to regular stories. The default value is 0.</P>','bool','Stories');
INSERT INTO `vars` VALUES ('anon_user_nick','Anonymous Hero','The nickname which will be used for the default anonymous user.','text','General');
INSERT INTO `vars` VALUES ('anon_user_group','Anonymous','The group which the standard anonymous user is a part of (most likely, this will be \"Anonymous\").','text','General');
INSERT INTO `vars` VALUES ('blocked_domains','example.com,\r\nexample.net','<P>This variable contains a comma-separated list of domains that may not be used to create a new account with. The default value lists the ever-popular `nospam.com\' and the by-definition-invalid `example.com\'.<BR>If a user tries to create an account with an email address in one of the blocked domains, he is told so and cannot create an account with that address.</P>','tarea','Security');
INSERT INTO `vars` VALUES ('rating_labels','','<P>This variable replaces the numeric values for ratings with text labels. The numbers are still there behind the scenes, but this allows you to specify right in the rating form what the different numbers mean. The possible values are a comma-separated string of values, from lowest to highest (including the \'hide\' value for trusted users as the first entry). The default value is blank, meaning numbers only are used in the rating form.<BR>\nSo users know what the averaged score means in relation to the text labels, it\'s a good idea to include the numeric value in the text label.</P>','text','Comments');
INSERT INTO `vars` VALUES ('minimum_ratings_to_count','1','<P>This variable determines the number of ratings that must be done before the comment\'s rating is calculated and its value applied to a users mojo score. The possible values are any positive number. The default value is 1.<BR>\nThis can prevent a single malicious vote from hiding a comment if set above 1.</P>','num','Comments');
INSERT INTO `vars` VALUES ('filter_ratings_by_ip',NULL,'<P>This variable determines whether or not multiple ratings from the same client IP address are counted when determining a comment\'s score and a user\'s mojo. The possible values are: 0) allow any number of ratings from one IP; and 1) only count the first rating from any given IP address. The default value is 0.<BR>\nBefore turning this variable on, consider that there are several situations in which multiple ratings may appear to come from the same IP. One is the case of a lot of computers behind a firewall; all of the computers will appear to come from one IP even though there are many people and many computers. Another is the case of a computer lab, where many users may log on or off of any number of computers at different times, and two different users may rate the same comment from the same computer. This variable does not affect the normal behaviour of only allowing one rating per account.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('hide_rating_value',NULL,'<P>This variable sets the numeric value of the hide rating. The possible values are any number below <B>rating_min</B>. The default value is blank.<BR>\nIf this variable is blank or zero, a value one below <B>rating_min</B> is used.</P>','num','Comments');
INSERT INTO `vars` VALUES ('safe_mode','0','<P>This variable determines whether or not non-Superusers will have access to the site.  The possible values are 0) everybody has access, as normal; and 1) only accounts in the <B>Superuser</B> group will be allowed normal access.  The default value is 0.<BR>\nThis variable should only be set to 1 when you are making changes to the site or upgrading the code, and want to deny general access while still having access yourself.  When this variable is set to 1, all non-Superuser accounts will be sent 503 Service Unavailable, which you can then configure however you like via Apache\'s ErrorDocument directive.  If set to 1, make sure not to log out, or you will have to change it back to 0 via the mysql shell.  The group which can access the site when this variable is active is not configurable.</P>','bool','Security');
INSERT INTO `vars` VALUES ('main_op_eval','0','<P>This variable determines whether or not the \'main\' op (front page request, no path) will allow an EVAL block in its URL Templates field. The possible values are: 0) do not allow EVALs; and 1) allow EVALs. The default value is 0.<BR>\nThis is useful if you have subdomains that you want to have different front pages, such as using news.mysite.org instead of www.mysite.org/section/news, or nickname.mysite.org instead of www.mysite.org/user/nickname/diary. To use the domain name as part of the path, the variable <B>use_host_parse</B> must be turned on. See the Scoop Admin Guide for details on Ops and how they use EVAL blocks.</P>','bool','Ops');
INSERT INTO `vars` VALUES ('use_host_parse','0','URL (op) Templates can be constructed that make use of a special array @host, which contains fragments of the hostname used in the HTTP request. $host[0] contains the FQDN. the other array elements contain 1 or more elements of the hostname, split from left to right. These tokens can be used to set param values within URL (op) Templates.\r\nExample for \'main\' OP:   /op=section/page=$host[1]/\r\ncauses display of section based on first host fragment','bool','Ops');
INSERT INTO `vars` VALUES ('use_whosonline','0','<P>This variable determines whether or not visitors should be tracked for the \"who\'s online?\" box. The possible values are: 0) do not track visitors; and 1) track visitors. The default value is 0.<BR>\nThis only keeps user ID, IP address, and a timestamp, it does no other hit tracking. It is really only useful for seeing when a user last requested a page from your site.</P>','bool','General');
INSERT INTO `vars` VALUES ('payment_use_cc','0','<P>This variable determines whether or not Scoop will provide a link to pay for ads or subscriptions via credit card. The possible values are: 0) do not offer credit card payments as an option; or 1) offer credit card payments as an option. The default value is 0.<BR>\nTo use credit card payments, you must have an SSL-enabled webserver, a certificate, and a credit card merchant account. Scoop currently only supports the Linkpoint credit card processor, which requires a proprietary module. If you want to use credit card payments through scoop, email rusty@kuro5hin.org for help, he has very reasonable rates.</P>','bool','Advertising');
INSERT INTO `vars` VALUES ('payment_use_paypal','0','<P>This variable determines whether or not Scoop will provide a link to pay for ads or subscriptions via paypal. The possible values are: 0) do not offer paypal as an option; or 1) offer paypal as an option. The default value is 0.<BR>\nTo use paypal payments, you must have a paypal account. If you will be doing any kind of traffic, you will probably find that their free account is not sufficient, and you have to go with one of their pay accounts.</P>','bool','Advertising');
INSERT INTO `vars` VALUES ('paypal_business_id','paypal@example.com','<P>This variable contains the email address associated with your Paypal account and is used to receive payments from advertising or subscriptions. The default value is an invalid email address.<BR>To set up payment processing, see the Scoop Admin Guide.</P>','text','Advertising,General');
INSERT INTO `vars` VALUES ('hide_story_allowed_html','0','Set true to suppress the Allowed html line in the in story editing form. Useful for sites where users will likely just be confused by that line.','bool','Stories');
INSERT INTO `vars` VALUES ('hide_comment_allowed_html','0','Set true to suppress the Allowed html line in the in comment posting form. Useful for sites where users will likely just be confused by that line.','bool','Comments');
INSERT INTO `vars` VALUES ('safe_mode_redirect','','This variable determines which page a visitor will be redirected to when the variable <B>safe_mode</B> is turned on. It must contain the fully-qualified URL of a page outside of Scoop\'s control.<BR>\nIf left blank, Scoop will return a 503 Service Unavailable status. The page returned with that error code can be customized as described in the <B>safe_mode</B> site control description.<BR>\nUsing safe_mode_redirect, the user\'s browser will move to a different page than the one they requested, but requires no changes to Apache\'s configuration file. Leaving this blank, the user\'s browser will stay on the page they requested but display the 503 ErrorDocument as set in Apache\'s configuration file.','text','Security');
INSERT INTO `vars` VALUES ('new_user_email_from','','<P>This variable is used as the from email address used by Scoop when sending user creation emails. The possible values are any valid email address, or blank. If blank, the email address set in the variable <B>local_email</B> will be used instead.<BR>\nThis email address should probably be one you check regularly.  Since members are sent email from this address, they are likely to think that they can send to it as well, if they have any questions.  If this email address is not valid, nobody will be able to create accounts.</p>','text','General');
INSERT INTO `vars` VALUES ('allow_multiple_choice','0','<P>This variable determines whether or not users will be allowed to create multiple-choice polls (checkboxes) as well as single choice (radio).</P>','bool','Polls');
INSERT INTO `vars` VALUES ('use_alt_image_dir','1','<P>This variable determines whether or not Scoop will use the alternate image servers listed in the variable <B>image_mirrors</B>. Turning this on when there are no alternate image servers listed will have no effect.</p>','bool','General');
INSERT INTO `vars` VALUES ('use_ratings','1','<P>This variable turns the entire rating system on and off. FIXME: not implemented yet.</P>','bool','Comments');
INSERT INTO `vars` VALUES ('image_mirrors','Australia,http://au.example.com/images\r\nEurope,http://www.bigmirrorsite.fi/scoopsite/images','<P>This variable defines the names and URLs of any alternate image servers you may have, so the users can choose an image server closer to them if necessary. This variable has no effect unless the variable <B>use_alt_image_dir</B> is set to 1.</P>\r\n\r\n<P>The format for this variable is one image mirror per line; each line consists of a descriptive name, a comma, and the URL of the mirrored image directory, without a trailing slash. The default value is invalid.</P>\r\n\r\n<P>The default value for the image directory is set in the User Preferences Admin Tool, in the \'imagedir\' preference.</P>','tarea','General');
INSERT INTO `vars` VALUES ('first_login_page_order','User Info','<P>This variable determines which prefs page(s) the user sees first when first logging in, if the variable <B>show_prefs_on_first_login</b> is set. The possible values are any list of valid prefs page names, separated by commas. The default value is \'Protected, User Info\'. This value is strongly recommended as it encourages the user to change his password immediately.</p>','text','General');
INSERT INTO `vars` VALUES ('allow_event_stories','1','<P>This variable determines whether or not events can have stories attached to them. The possible values are: 0) events cannot have stories attached; and 1) events can have stories attached.<BR>Events can have multiple stories attached. Event stories are stored in the section named in <B>event_story_section</B>. Whether or not individual users can attach a story to an event is determined by the specific event\'s permissions. This variable has no effect unless <B>use_calendars</B> is on.</P>','bool','Events');
INSERT INTO `vars` VALUES ('allow_personal_calendar_view','0','<P>This variable determines whether or not users may have their own personal calendar views, and may subscribe to other calendars. The possible values are: 0) require explicit calendars to be requested; and 1) users may have a personalized calendar view which combines several calendars\' events.<BR>If <B>allow_user_calendars</B> is on or if you are setting up more than one site calendar, turning this on is recommended. If this is off, the calendar named in <B>default_calendar_id</B> is used if no calendar is explicitly selected. This variable has no effect unless <B>use_calendars</B> is on.</P>','bool','Events');
INSERT INTO `vars` VALUES ('allow_user_calendars','0','<P>This variable determines whether or not users can have their own individual calendars. The possible values are: 0) only admin-created calendars are permitted; and 1) users may create their own calendars as well.<BR>This variable has no effect unless <B>use_calendars</B> is on.</P>','bool','Events');
INSERT INTO `vars` VALUES ('use_calendars','1','<P>This variable determines whether or not the entire event calendar system is used at all. The possible values are: 0) do not use calendars; and 1) use calendars.<BR>See all of the other Site Controls in the <B>Events</B> category for further configuration.</P>','bool','Events');
INSERT INTO `vars` VALUES ('calendar_navigation_range','2','<P>The number of navigation elements on either side of \"today\" in the calendar views. The possible values are any positive integer. The default value is 4.<BR>The value chosen should be big enough to allow the user to easily navigate the calendar, but small enough that it doesn\'t wrap the navigation in ugly ways. This variable has no effect unless <B>use_calendars</B> is on.</P>','num','Events');
INSERT INTO `vars` VALUES ('default_calendar_id','1','<P>This variable sets the calendar ID number to be used when no calendar ID is specified on the event submission form. The default value is 1 (the site global calendar, included by default).<BR>This variable has no effect unless <B>use_calendars</b> is on.</p>','num','Events');
INSERT INTO `vars` VALUES ('event_search_num_options','3','<P>This variable sets the number of different event properties a user can use in one event search query. The possible values are any positive integer. The default value is 3.<BR>This should be set to a number high enough to allow reasonably flexible searching, but not so high that the search form is over-complicated.</P>','num','Events');
INSERT INTO `vars` VALUES ('event_story_section','events','<P>The name of the section used for stories attached to events. The possible values are any internal section name.<BR>If the section named here does not exist, event stories won\'t be posted properly. This variable has no effect unless <B>use_calendars</B> and <B>allow_event_stories</B> are on.</P>','text','Events');
INSERT INTO `vars` VALUES ('date_format_default','%a %b %d, %Y at %r |zone|','<p>This var can be used to change the formatting style of default dates, such as those displayed in story and comment info. If you\'re happy with the way Scoop does them, then leave this blank. If you want to change them, you may put in a formatting template here which uses the date formatting strings of your database. The formatting codes for mysql are all described here: <a href=\"http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html\">http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html</a> (scroll down to the DATE_FORMAT() function). For Postgres, prehaps someone could add a link here to those codes.</p>\r\n\r\n<p>For example, the Scoop default formatting template for mysql would be: \"%a %b %D, %Y at %r |zone|\" (or %T instead of %r if you have \"time_24h_format\" set). Note that this will override time_24h_format if you change it -- Scoop will just use whatever you put here.</p>\r\n\r\n<p><b>Special keys:</b></p>\r\n<ul>\r\n<li>|zone|: will be replaced by the user\'s time zone code as a string.\r\n</ul>','text','General');
INSERT INTO `vars` VALUES ('date_format_short','','<p>This var can be used to change the formatting style of short dates, such as those displayed in search results, the admin story list, and a couple other places. If you\'re happy with the way Scoop does them, then leave this blank. If you want to change them, you may put in a formatting template here which uses the date formatting strings of your database. The formatting codes for mysql are all described here: <a href=\"http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html\">http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html</a> (scroll down to the DATE_FORMAT() function).</p>\r\n\r\n<p>For example, the Scoop default formatting template for mysql would be: \"%m/%d/%Y %r |zone|\" (or %T instead of %r if you have \"time_24h_format\" set).</p>\r\n\r\n<p><b>Special keys:</b></p>\r\n<ul>\r\n<li>|zone|: will be replaced by the user\'s time zone code as a string.\r\n</ul>','text','General');
INSERT INTO `vars` VALUES ('date_format_wmd','','<p>This var can be used to change the formatting style of \"week month day\" dates, such as those produced by the \"titlesonly\" mode of getstories(). To be honest, I\'m not sure where these are used. If you\'re happy with the way Scoop does them, then leave this blank. If you want to change them, you may put in a formatting template here which uses the date formatting strings of your database. The formatting codes for mysql are all described here: <a href=\"http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html\">http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html</a> (scroll down to the DATE_FORMAT() function).</p>\r\n\r\n<p>For example, the Scoop default formatting template for mysql would be: \"%W %M %D\".</p>\r\n\r\n<p><b>Special keys:</b></p>\r\n<ul>\r\n<li>|zone|: will be replaced by the user\'s time zone code as a string.\r\n</ul>','text','General');
INSERT INTO `vars` VALUES ('signup_with_password','1','Collect a user\'s desired password on signup? If set to 1, the signup form will also include a password field. The initial account email will send a link which includes a key rather than a random password. This link will take a user directly to their prefs page (logging them in and activating the account) without the user needing to explicitly log in, and will also enable the password they chose on signup for future logins.\r\n<p>\r\nThis should actually be more secure than the random password method, since if the initial email is intercepted, the attacker still won\'t know the actual account password, and thus will be unable to hijack the account. It should also be easier for users to deal with.\r\n<p>\r\nIf you are upgrading from an older version of Scoop, and wish to enable this feature, you\'ll want to edit several of the blocks in the Accounts category, to remove the references to changing your password. You\'ll also need to add the box \"signup_password\" to the block new_user_html, and replace the username and password lines in the new_user_email block with the link \"|url|/activate/|pass|\".\r\n','bool','Security');
INSERT INTO `vars` VALUES ('use_diaries','1','Set to one to use diaries on this site.','bool','Stories');
INSERT INTO `vars` VALUES ('tag_threshold_classes','1,tag-popularity-1\r\n5,tag-popularity-5\r\n10,tag-popularity-10\r\n15,tag-popularity-15\r\n','Tag Count Threshholds for altering the font styling for each tag on the all tags page depending on what story count threshold it meets. Each threshold is on a line by itself, and consists of two parts: the number of stories associated with a given tag, and the CSS class name used for that tag. The styling of the CSS classes named here is done in the block <B>main_css</B>.','tarea','Tags');
INSERT INTO `vars` VALUES ('use_tags','0','Turns the \"tag\" categorization system on or off. Tags are user-input freeform story categories. Any story can have any number of associated tags. Tags are input as a simple comma-delimited string of words, and can only consist of alphanumeric characters (a-z, A-Z, 0-9).','bool','Tags');
INSERT INTO `vars` VALUES ('shared_db_tables','users userprefs pref_items','Space Seperated list of tables to be retrieved from <b>master_db</b> if <b>use_shared_database</b> is true','text','Shared Database');
INSERT INTO `vars` VALUES ('use_shared_db','0','Enable use of shared user accounts across two mysql databases on the same server.','bool','Shared Database');
INSERT INTO `vars` VALUES ('shared_db_name','scoop','Name Of the database from which to read the tables listed in <b>shared_tables</b>','text','Shared Database');
INSERT INTO `vars` VALUES ('max_title_len','100','The maximum length in characters a title can be.','num','Stories');
INSERT INTO `vars` VALUES ('min_intro_chars','0','The minimum number of characters that can be used in a story. The default is 0, which disables use of this. It works much the same as min_intro_words. Only one of the two should be used.','num','Stories');
INSERT INTO `vars` VALUES ('min_intro_words','300','The minimum number of words that can be used in a story. The default is 300. 0 disables this feature. It works much the same as min_intro_chars. Only one of the two should be used.','num','Stories');
INSERT INTO `vars` VALUES ('use_editorial_comments','0','Use editorial type comments at all. If unchecked, we won\'t include anything that refers to ed comments.','bool','Comments');
INSERT INTO `vars` VALUES ('require_tags','0','If this var is set, users <b>must</b> submit at least one tag when they submit a story.','bool','Tags');
INSERT INTO `vars` VALUES ('tu_perms','zero_rate','Comma seperated list of special permissions that trusted users can have. \"zero_rate\" is the default provided, but others can be added\nas well.','text','Security');
UNLOCK TABLES;
/*!40000 ALTER TABLE `vars` ENABLE KEYS */;

--
-- Table structure for table `viewed_stories`
--

DROP TABLE IF EXISTS `viewed_stories`;
CREATE TABLE `viewed_stories` (
  `uid` int(11) NOT NULL default '0',
  `sid` varchar(20) NOT NULL default '',
  `lastseen` int(11) NOT NULL default '0',
  `highest_idx` int(11) NOT NULL default '0',
  `hotlisted` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`uid`,`sid`),
  KEY `hotlist_idx` (`uid`,`hotlisted`)
) TYPE=MyISAM;

--
-- Dumping data for table `viewed_stories`
--


/*!40000 ALTER TABLE `viewed_stories` DISABLE KEYS */;
LOCK TABLES `viewed_stories` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `viewed_stories` ENABLE KEYS */;

--
-- Table structure for table `whos_online`
--

DROP TABLE IF EXISTS `whos_online`;
CREATE TABLE `whos_online` (
  `ip` varchar(16) NOT NULL default '',
  `uid` int(11) NOT NULL default '0',
  `last_visit` timestamp NOT NULL,
  PRIMARY KEY  (`ip`,`uid`)
) TYPE=MyISAM;

--
-- Dumping data for table `whos_online`
--


/*!40000 ALTER TABLE `whos_online` DISABLE KEYS */;
LOCK TABLES `whos_online` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `whos_online` ENABLE KEYS */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

