DELETE from blocks WHERE bid="sub_email_success" AND category = "email";
ALTER TABLE blocks DROP PRIMARY KEY, ADD PRIMARY KEY(bid,theme,language);

UPDATE blocks SET category="Admin Pages" WHERE bid="admin_boxes_form";
UPDATE blocks SET description="<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>" WHERE bid="admin_boxes_form";
UPDATE blocks SET category="Page Templates" WHERE bid="admin_template";
UPDATE blocks SET description="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>" WHERE bid="admin_template";
UPDATE blocks SET category="Ads" WHERE bid="advertising_account_disclaimer";
UPDATE blocks SET description="<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>" WHERE bid="advertising_account_disclaimer";
UPDATE blocks SET category="Ads,Emails" WHERE bid="ad_approval_mail";
UPDATE blocks SET description="<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>" WHERE bid="ad_approval_mail";
UPDATE blocks SET category="Ads" WHERE bid="ad_confirm_text";
UPDATE blocks SET description="<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>" WHERE bid="ad_confirm_text";
UPDATE blocks SET category="Ads,Emails" WHERE bid="ad_disapproval_mail";
UPDATE blocks SET description="<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>" WHERE bid="ad_disapproval_mail";
UPDATE blocks SET category="Ads,Emails" WHERE bid="ad_renewal_mail";
UPDATE blocks SET description="not used.  Yet another unimplemented ad feature." WHERE bid="ad_renewal_mail";
UPDATE blocks SET category="Ads" WHERE bid="ad_step1_rules";
UPDATE blocks SET description="<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>" WHERE bid="ad_step1_rules";
UPDATE blocks SET category="Ads" WHERE bid="ad_submit_help";
UPDATE blocks SET description="<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>" WHERE bid="ad_submit_help";
UPDATE blocks SET category="Ads,Page Templates" WHERE bid="ad_test_template";
UPDATE blocks SET description="<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>" WHERE bid="ad_test_template";
UPDATE blocks SET category="Polls,Stories" WHERE bid="attach_poll_message";
UPDATE blocks SET description="<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>" WHERE bid="attach_poll_message";
UPDATE blocks SET category="Stories" WHERE bid="author_edit_console";
UPDATE blocks SET description="<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>" WHERE bid="author_edit_console";
UPDATE blocks SET category="General" WHERE bid="bars";
UPDATE blocks SET description="<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>" WHERE bid="bars";
UPDATE blocks SET category="Box Templates" WHERE bid="blank_box";
UPDATE blocks SET description="<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>" WHERE bid="blank_box";
UPDATE blocks SET category="Page Templates" WHERE bid="blank_template";
UPDATE blocks SET description="<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>" WHERE bid="blank_template";
UPDATE blocks SET category="Admin Pages" WHERE bid="block_category_list";
UPDATE blocks SET description="<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>" WHERE bid="block_category_list";
UPDATE blocks SET category="Box Templates" WHERE bid="box";
UPDATE blocks SET description="<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>" WHERE bid="box";
UPDATE blocks SET category="Colours" WHERE bid="box_title_bg";
UPDATE blocks SET description="<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>" WHERE bid="box_title_bg";
UPDATE blocks SET category="Fonts" WHERE bid="box_title_font";
UPDATE blocks SET description="<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>" WHERE bid="box_title_font";
UPDATE blocks SET category="Fonts" WHERE bid="box_title_font_end";
UPDATE blocks SET description="<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>" WHERE bid="box_title_font_end";
UPDATE blocks SET category="Ads" WHERE bid="buy_ad_impression_message";
UPDATE blocks SET description="not used.  Yet another unimplemented ad feature." WHERE bid="buy_ad_impression_message";
UPDATE blocks SET category="Comments" WHERE bid="comment";
UPDATE blocks SET description="<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>" WHERE bid="comment";
UPDATE blocks SET category="Comments" WHERE bid="commentdisclaimer";
UPDATE blocks SET description="<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>" WHERE bid="commentdisclaimer";
UPDATE blocks SET category="Colours" WHERE bid="comment_head_bg";
UPDATE blocks SET description="<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>" WHERE bid="comment_head_bg";
UPDATE blocks SET category="Comments" WHERE bid="comment_num_format_end";
UPDATE blocks SET description="<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>" WHERE bid="comment_num_format_end";
UPDATE blocks SET category="Comments" WHERE bid="comment_num_format_start";
UPDATE blocks SET description="<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>" WHERE bid="comment_num_format_start";
UPDATE blocks SET category="Comments" WHERE bid="comment_plural";
UPDATE blocks SET description="<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>" WHERE bid="comment_plural";
UPDATE blocks SET category="Comments" WHERE bid="comment_posted_message";
UPDATE blocks SET description="<P>This block is displayed after a user has successfully posted a message.  It should contain a message telling the user so.  The table structure in this block should not be changed as it is very much not self-contained and is like that in the code as well.  Ugly ugly ugly.  There are no special keys.</P>" WHERE bid="comment_posted_message";
UPDATE blocks SET category="Comments" WHERE bid="comment_word";
UPDATE blocks SET description="<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>" WHERE bid="comment_word";
UPDATE blocks SET category="Ads" WHERE bid="confirm_ad_renew";
UPDATE blocks SET description="<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>" WHERE bid="confirm_ad_renew";
UPDATE blocks SET category="Ads" WHERE bid="confirm_purchase_impressions";
UPDATE blocks SET description="yet another unimplemented ad feature" WHERE bid="confirm_purchase_impressions";
UPDATE blocks SET category="Page Templates" WHERE bid="content_only_page_template";
UPDATE blocks SET description="<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>" WHERE bid="content_only_page_template";
UPDATE blocks SET category="Page Templates" WHERE bid="cron_template";
UPDATE blocks SET description="<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>" WHERE bid="cron_template";
UPDATE blocks SET category="Page Templates" WHERE bid="default_template";
UPDATE blocks SET description="<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>" WHERE bid="default_template";
UPDATE blocks SET category="Fonts" WHERE bid="dept_font";
UPDATE blocks SET description="<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>" WHERE bid="dept_font";
UPDATE blocks SET category="Diaries" WHERE bid="diary_submission_message";
UPDATE blocks SET description="<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>" WHERE bid="diary_submission_message";
UPDATE blocks SET category="Story Digests" WHERE bid="digest_headerfooter";
UPDATE blocks SET description="<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>" WHERE bid="digest_headerfooter";
UPDATE blocks SET category="Story Digests" WHERE bid="digest_storyformat";
UPDATE blocks SET description="<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" WHERE bid="digest_storyformat";
UPDATE blocks SET category="Story Digests" WHERE bid="digest_subject";
UPDATE blocks SET description="<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>" WHERE bid="digest_subject";
UPDATE blocks SET category="Emails" WHERE bid="donate_email_pledge";
UPDATE blocks SET description="<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>" WHERE bid="donate_email_pledge";
UPDATE blocks SET category="Emails" WHERE bid="donate_email_success";
UPDATE blocks SET description="<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>" WHERE bid="donate_email_success";
UPDATE blocks SET category="General" WHERE bid="dot";
UPDATE blocks SET description="<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>" WHERE bid="dot";
UPDATE blocks SET category="Comments" WHERE bid="dynamic_collapse_bottom_link";
UPDATE blocks SET description="<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>" WHERE bid="dynamic_collapse_bottom_link";
UPDATE blocks SET category="Comments" WHERE bid="dynamic_collapse_link";
UPDATE blocks SET description="<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>" WHERE bid="dynamic_collapse_link";
UPDATE blocks SET category="Comments" WHERE bid="dynamic_collapse_thread_link";
UPDATE blocks SET description="<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>" WHERE bid="dynamic_collapse_thread_link";
UPDATE blocks SET category="Comments" WHERE bid="dynamic_expand_link";
UPDATE blocks SET description="<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>" WHERE bid="dynamic_expand_link";
UPDATE blocks SET category="Comments" WHERE bid="dynamic_expand_thread_link";
UPDATE blocks SET description="<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>" WHERE bid="dynamic_expand_thread_link";
UPDATE blocks SET category="Comments" WHERE bid="dynamic_js_tag";
UPDATE blocks SET description="<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." WHERE bid="dynamic_js_tag";
UPDATE blocks SET category="Comments" WHERE bid="dynamic_loading_link";
UPDATE blocks SET description="<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>" WHERE bid="dynamic_loading_link";
UPDATE blocks SET category="Comments" WHERE bid="dynamic_loading_message";
UPDATE blocks SET description="<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>" WHERE bid="dynamic_loading_message";
UPDATE blocks SET category="Comments,Page Templates" WHERE bid="dynamic_template";
UPDATE blocks SET description="<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>" WHERE bid="dynamic_template";
UPDATE blocks SET category="Colours" WHERE bid="editqueuespam_bg";
UPDATE blocks SET description="<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>" WHERE bid="editqueuespam_bg";
UPDATE blocks SET category="Colours" WHERE bid="editqueuestory_bg";
UPDATE blocks SET description="<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>" WHERE bid="editqueuestory_bg";
UPDATE blocks SET category="Admin Pages" WHERE bid="edit_block";
UPDATE blocks SET description="<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>" WHERE bid="edit_block";
UPDATE blocks SET category="Admin Pages" WHERE bid="edit_cat_blocks";
UPDATE blocks SET description="<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>" WHERE bid="edit_cat_blocks";
UPDATE blocks SET category="Admin Pages" WHERE bid="edit_cat_vars";
UPDATE blocks SET description="<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>" WHERE bid="edit_cat_vars";
UPDATE blocks SET category="Stories" WHERE bid="edit_instructions";
UPDATE blocks SET description="<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>" WHERE bid="edit_instructions";
UPDATE blocks SET category="Stories" WHERE bid="edit_instructions_abuse";
UPDATE blocks SET description="<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>" WHERE bid="edit_instructions_abuse";
UPDATE blocks SET category="Admin Pages" WHERE bid="edit_one_block";
UPDATE blocks SET description="<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>" WHERE bid="edit_one_block";
UPDATE blocks SET category="Admin Pages" WHERE bid="edit_one_var";
UPDATE blocks SET description="<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>" WHERE bid="edit_one_var";
UPDATE blocks SET category="Admin Pages" WHERE bid="edit_ops";
UPDATE blocks SET description="<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>" WHERE bid="edit_ops";
UPDATE blocks SET category="Admin Pages" WHERE bid="edit_var";
UPDATE blocks SET description="<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>" WHERE bid="edit_var";
UPDATE blocks SET category="Box Templates" WHERE bid="empty_box";
UPDATE blocks SET description="<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>" WHERE bid="empty_box";
UPDATE blocks SET category="Page Templates" WHERE bid="error_template";
UPDATE blocks SET description="<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>" WHERE bid="error_template";
UPDATE blocks SET category="General" WHERE bid="footer";
UPDATE blocks SET description="<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>" WHERE bid="footer";
UPDATE blocks SET category="FZ" WHERE bid="fz_ad_url";
UPDATE blocks SET description="forumzilla support is going to be removed in the near future. Ignore this block." WHERE bid="fz_ad_url";
UPDATE blocks SET category="FZ" WHERE bid="fz_navigation_url";
UPDATE blocks SET description="forumzilla support is going to be removed in the near future. Ignore this block." WHERE bid="fz_navigation_url";
UPDATE blocks SET category="FZ" WHERE bid="fzdisplay_template";
UPDATE blocks SET description="forumzilla support is going to be removed in the near future. Ignore this block." WHERE bid="fzdisplay_template";
UPDATE blocks SET category="General" WHERE bid="header";
UPDATE blocks SET description="<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>" WHERE bid="header";
UPDATE blocks SET category="Stories" WHERE bid="hotlist_link";
UPDATE blocks SET description="<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>" WHERE bid="hotlist_link";
UPDATE blocks SET category="Stories" WHERE bid="hotlist_remove_link";
UPDATE blocks SET description="<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>" WHERE bid="hotlist_remove_link";
UPDATE blocks SET category="Page Templates" WHERE bid="index_template";
UPDATE blocks SET description="<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>\n<DL>\n <DT>subtitle</DT>\n  <DD>This is replaced with the display name of the section being displayed.</DD>\n <DT>CONTENT</DT>\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>\n</DL>\n" WHERE bid="index_template";
UPDATE blocks SET category="Preferences" WHERE bid="interface_prefs_main_form";
UPDATE blocks SET description="<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>" WHERE bid="interface_prefs_main_form";
UPDATE blocks SET category="Accounts" WHERE bid="login_box";
UPDATE blocks SET description="<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>" WHERE bid="login_box";
UPDATE blocks SET category="Accounts" WHERE bid="login_error_message";
UPDATE blocks SET description="<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>" WHERE bid="login_error_message";
UPDATE blocks SET category="Accounts" WHERE bid="login_mailed_message";
UPDATE blocks SET description="<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>" WHERE bid="login_mailed_message";
UPDATE blocks SET category="Accounts" WHERE bid="login_mail_failed";
UPDATE blocks SET description="<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>" WHERE bid="login_mail_failed";
UPDATE blocks SET category="Ads,Emails" WHERE bid="mail_ad_almost_done_msg";
UPDATE blocks SET description="<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>" WHERE bid="mail_ad_almost_done_msg";
UPDATE blocks SET category="Ads,Emails" WHERE bid="mail_ad_done_msg";
UPDATE blocks SET description="<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>" WHERE bid="mail_ad_done_msg";
UPDATE blocks SET category="Subscriptions" WHERE bid="mark_Subscribers";
UPDATE blocks SET description="<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." WHERE bid="mark_Subscribers";
UPDATE blocks SET category="Stories" WHERE bid="moderate_head";
UPDATE blocks SET description="<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>" WHERE bid="moderate_head";
UPDATE blocks SET category="Comments" WHERE bid="moderation_comment";
UPDATE blocks SET description="<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>" WHERE bid="moderation_comment";
UPDATE blocks SET category="Ads" WHERE bid="new_advertiser_html";
UPDATE blocks SET description="<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>" WHERE bid="new_advertiser_html";
UPDATE blocks SET category="Fonts" WHERE bid="new_comment_format_end";
UPDATE blocks SET description="<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>" WHERE bid="new_comment_format_end";
UPDATE blocks SET category="Fonts" WHERE bid="new_comment_format_start";
UPDATE blocks SET description="<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>" WHERE bid="new_comment_format_start";
UPDATE blocks SET category="Comments" WHERE bid="new_comment_marker";
UPDATE blocks SET description="<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>" WHERE bid="new_comment_marker";
UPDATE blocks SET category="Stories" WHERE bid="new_story_marker";
UPDATE blocks SET description="<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>" WHERE bid="new_story_marker";
UPDATE blocks SET category="General" WHERE bid="new_user_html";
UPDATE blocks SET description="<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>\n<DL>\n <DT>FORM</DT>\n  <DD>The form should post to your site's rootdir.</DD>\n <DT>op</DT>\n  <DD>This should be a hidden field with a value of \"newuser\".</DD>\n <DT>tool</DT>\n  <DD>This should be a hidden field with a value of \"writeuser\".</DD>\n <DT>formkey</DT>\n  <DD>This should be a hidden field with a value of \"|formkey|\" (see special keys, below).</DD>\n <DT>nickname</DT>\n  <DD>This should be a text field with a default value of \"|uname|\" (see special keys, below).</DD>\n <DT>email</DT>\n  <DD>This should be a text field with a default value of \"|email|\" (see special keys, below).</DD>\n <DT>button</DT>\n  <DD>A submit button to send the fields in.</DD>\n</DL>\n<P>The following special keys are recognized:</P>\n<DL>\n <DT>error</DT>\n  <DD>Any error messages (such as invalid characters in the nickname field).</DD>\n <DT>uname</DT>\n  <DD>Usually blank; if there is an error with the email field, this is the nickname entered by the user.</DD>\n <DT>email</DT>\n  <DD>Usually blank; if there is an error with the nickname field, this is the email address entered by the user.</DD>\n <DT>formkey</DT>\n  <DD>A code-generated formkey used to hinder scripts trying to make large numbers of accounts.</DD>\n</DL>" WHERE bid="new_user_html";
UPDATE blocks SET category="General" WHERE bid="next_page_link";
UPDATE blocks SET description="<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>" WHERE bid="next_page_link";
UPDATE blocks SET category="General" WHERE bid="next_previous_links";
UPDATE blocks SET description="<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." WHERE bid="next_previous_links";
UPDATE blocks SET category="Fonts" WHERE bid="norm_font";
UPDATE blocks SET description="<P>This block is used extensively in the default install. It should be a complete opening FONT tag. It must match the closing tag set in the block <B>norm_font_end</B>. If it is not a FONT tag, the user-selected font size and face from the display preferences page will not work properly.</P>" WHERE bid="norm_font";
UPDATE blocks SET category="Fonts" WHERE bid="norm_font_end";
UPDATE blocks SET description="<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>" WHERE bid="norm_font_end";
UPDATE blocks SET category="Fonts" WHERE bid="norm_font_face";
UPDATE blocks SET description="<P>The default font face used in a user's display preferences.</P>" WHERE bid="norm_font_face";
UPDATE blocks SET category="Fonts" WHERE bid="norm_font_size";
UPDATE blocks SET description="<P>The default font size used in a user's display preferences.</P>" WHERE bid="norm_font_size";
UPDATE blocks SET category="Stories" WHERE bid="no_body_txt";
UPDATE blocks SET description="<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>" WHERE bid="no_body_txt";
UPDATE blocks SET category="Ads" WHERE bid="no_submit_ad_perm";
UPDATE blocks SET description="<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>" WHERE bid="no_submit_ad_perm";
UPDATE blocks SET category="Payments" WHERE bid="paypal_canceled";
UPDATE blocks SET description="<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>" WHERE bid="paypal_canceled";
UPDATE blocks SET category="Payments" WHERE bid="paypal_finished";
UPDATE blocks SET description="<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>" WHERE bid="paypal_finished";
UPDATE blocks SET category="Polls" WHERE bid="poll_block";
UPDATE blocks SET description="<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>" WHERE bid="poll_block";
UPDATE blocks SET category="Polls" WHERE bid="poll_img";
UPDATE blocks SET description="<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>" WHERE bid="poll_img";
UPDATE blocks SET category="Polls" WHERE bid="poll_img_width";
UPDATE blocks SET description="<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>" WHERE bid="poll_img_width";
UPDATE blocks SET category="Ads" WHERE bid="preview_text_ad_template";
UPDATE blocks SET description="<P>This block is used in conjunction with <B>text_ad_template</B>. It should be substantially the same, but set reasonable dimensions for the template. It is used when previewing ads. 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>" WHERE bid="preview_text_ad_template";
UPDATE blocks SET category="General" WHERE bid="prev_page_link";
UPDATE blocks SET description="<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>" WHERE bid="prev_page_link";
UPDATE blocks SET category="Comments" WHERE bid="rating_format";
UPDATE blocks SET description="<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>" WHERE bid="rating_format";
UPDATE blocks SET category="Stories" WHERE bid="readmore_txt";
UPDATE blocks SET description="<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>" WHERE bid="readmore_txt";
UPDATE blocks SET category="Ads" WHERE bid="renew_ad_message";
UPDATE blocks SET description="<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>" WHERE bid="renew_ad_message";
UPDATE blocks SET category="Ads" WHERE bid="renew_ad_no_permission";
UPDATE blocks SET description="<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>" WHERE bid="renew_ad_no_permission";
UPDATE blocks SET category="Ads" WHERE bid="renew_choose_ad";
UPDATE blocks SET description="<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>" WHERE bid="renew_choose_ad";
UPDATE blocks SET category="Ads" WHERE bid="renew_confirm_message";
UPDATE blocks SET description="not used. Yet another unimplemented ad feature." WHERE bid="renew_confirm_message";
UPDATE blocks SET category="FZ" WHERE bid="rss_box";
UPDATE blocks SET description="forumzilla support is going to be removed in the near future. Ignore this block." WHERE bid="rss_box";
UPDATE blocks SET category="FZ" WHERE bid="rss_template";
UPDATE blocks SET description="forumzilla support is going to be removed in the near fiture. Ignore this block." WHERE bid="rss_template";
UPDATE blocks SET category="General" WHERE bid="scoop_intro";
UPDATE blocks SET description="<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>" WHERE bid="scoop_intro";
UPDATE blocks SET category="Colours" WHERE bid="sectiononlystory_bg";
UPDATE blocks SET description="<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." WHERE bid="sectiononlystory_bg";
UPDATE blocks SET category="General" WHERE bid="section_links";
UPDATE blocks SET description="<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>" WHERE bid="section_links";
UPDATE blocks SET category="General" WHERE bid="slogan";
UPDATE blocks SET description="<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>" WHERE bid="slogan";
UPDATE blocks SET category="Fonts" WHERE bid="smallfont";
UPDATE blocks SET description="<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>" WHERE bid="smallfont";
UPDATE blocks SET category="Fonts" WHERE bid="smallfont_end";
UPDATE blocks SET description="<P>This block should be a closing FONT tag, or otherwise close the tag opened in the block <B>smallfont</B>.</P>" WHERE bid="smallfont_end";
UPDATE blocks SET category="Fonts" WHERE bid="spell_err";
UPDATE blocks SET description="<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>" WHERE bid="spell_err";
UPDATE blocks SET category="Fonts" WHERE bid="spell_err_end";
UPDATE blocks SET description="<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>" WHERE bid="spell_err_end";
UPDATE blocks SET category="Stories" WHERE bid="story_body";
UPDATE blocks SET description="<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>" WHERE bid="story_body";
UPDATE blocks SET category="Stories" WHERE bid="story_info";
UPDATE blocks SET description="<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>" WHERE bid="story_info";
UPDATE blocks SET category="Colours" WHERE bid="story_mod_bg";
UPDATE blocks SET description="<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>" WHERE bid="story_mod_bg";
UPDATE blocks SET category="Colours" WHERE bid="story_nav_bg";
UPDATE blocks SET description="<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>" WHERE bid="story_nav_bg";
UPDATE blocks SET category="Stories" WHERE bid="story_separator";
UPDATE blocks SET description="<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>" WHERE bid="story_separator";
UPDATE blocks SET category="Stories" WHERE bid="story_summary";
UPDATE blocks SET description="<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>" WHERE bid="story_summary";
UPDATE blocks SET category="Page Templates" WHERE bid="story_template";
UPDATE blocks SET description="<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>\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.</DD>\n</DL>" WHERE bid="story_template";
UPDATE blocks SET category="Stories" WHERE bid="story_vote_form";
UPDATE blocks SET description="<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>" WHERE bid="story_vote_form";
UPDATE blocks SET category="Stories" WHERE bid="submission_guidelines";
UPDATE blocks SET description="<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>" WHERE bid="submission_guidelines";
UPDATE blocks SET category="Stories" WHERE bid="submission_message";
UPDATE blocks SET description="<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>" WHERE bid="submission_message";
UPDATE blocks SET category="Colours" WHERE bid="submittedstory_bg";
UPDATE blocks SET description="<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." WHERE bid="submittedstory_bg";
UPDATE blocks SET category="RDF" WHERE bid="submit_rdf_message";
UPDATE blocks SET description="<P>This block is displayed just above the form used to submit an RDF file explaining what the form is for.</P>" WHERE bid="submit_rdf_message";
UPDATE blocks SET category="Page Templates" WHERE bid="submit_template";
UPDATE blocks SET description="<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>" WHERE bid="submit_template";
UPDATE blocks SET category="Subscriptions" WHERE bid="subscribe";
UPDATE blocks SET description="<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>" WHERE bid="subscribe";
UPDATE blocks SET category="Subscriptions" WHERE bid="subscribe_denied_message";
UPDATE blocks SET description="<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>" WHERE bid="subscribe_denied_message";
UPDATE blocks SET category="Subscriptions" WHERE bid="subscribe_intro_text";
UPDATE blocks SET description="<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>" WHERE bid="subscribe_intro_text";
UPDATE blocks SET category="Page Templates" WHERE bid="subscribe_template";
UPDATE blocks SET description="<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>" WHERE bid="subscribe_template";
UPDATE blocks SET category="Subscriptions,Emails" WHERE bid="sub_email_success";
UPDATE blocks SET description="<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>" WHERE bid="sub_email_success";
UPDATE blocks SET category="Subscriptions,Emails" WHERE bid="sub_manual_change_email";
UPDATE blocks SET description="<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>" WHERE bid="sub_manual_change_email";
UPDATE blocks SET category="Payments,Subscriptions" WHERE bid="sub_paypal_canceled";
UPDATE blocks SET description="<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>" WHERE bid="sub_paypal_canceled";
UPDATE blocks SET category="Payments,Subscriptions" WHERE bid="sub_paypal_finished";
UPDATE blocks SET description="<P>This block is displayed when a user has finished paying for a subscription using paypal. It should be self-contained HTML and should let the user know that the transaction has been completed.</P>" WHERE bid="sub_paypal_finished";
UPDATE blocks SET category="Ads" WHERE bid="text_ad_template";
UPDATE blocks SET description="<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>" WHERE bid="text_ad_template";
UPDATE blocks SET category="Admin Pages" WHERE bid="theme_list";
UPDATE blocks SET description="<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>" WHERE bid="theme_list";
UPDATE blocks SET category="Box Templates" WHERE bid="titled_box";
UPDATE blocks SET description="<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>" WHERE bid="titled_box";
UPDATE blocks SET category="Colours" WHERE bid="title_bgcolor";
UPDATE blocks SET description="<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>" WHERE bid="title_bgcolor";
UPDATE blocks SET category="Fonts" WHERE bid="title_font";
UPDATE blocks SET description="<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>" WHERE bid="title_font";
UPDATE blocks SET category="Fonts" WHERE bid="title_font_end";
UPDATE blocks SET description="<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>" WHERE bid="title_font_end";
UPDATE blocks SET category="Comments" WHERE bid="trusted_info_message";
UPDATE blocks SET description="<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>" WHERE bid="trusted_info_message";
UPDATE blocks SET category="Colours" WHERE bid="undisplayedstory_bg";
UPDATE blocks SET description="<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 #." WHERE bid="undisplayedstory_bg";
UPDATE blocks SET category="Comments" WHERE bid="untrusted_post_message";
UPDATE blocks SET description="<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>" WHERE bid="untrusted_post_message";
UPDATE blocks SET category="General" WHERE bid="user_prefs_message";
UPDATE blocks SET description="<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>" WHERE bid="user_prefs_message";
UPDATE blocks SET category="Admin Pages" WHERE bid="var_category_list";
UPDATE blocks SET description="<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>" WHERE bid="var_category_list";
UPDATE blocks SET category="Stories" WHERE bid="vote_console";
UPDATE blocks SET description="<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>" WHERE bid="vote_console";

UPDATE vars SET description="<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>" WHERE name="safe_mode";
UPDATE vars SET description="<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>" WHERE name="rating_labels";
UPDATE vars SET description="<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>" WHERE name="minimum_ratings_to_count";
UPDATE vars SET description="<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>" WHERE name="filter_ratings_by_ip";
UPDATE vars SET description="<P>This variable sets the default for the user preference \"Show Hidden Comments\". The possible values are: no) never show comments with scores below <B>rating_min</B>; yes) always show comments with scores below <B>rating_min</B>; and untilrating) show all comments until the user has rated them, then show or hide comments based on score. The default value is untilrating.<BR>\nOnly trusted users have access to this preference. All other users cannot see comments with scores below <B>rating_min</B>.</P>" WHERE name="default_hidingchoice";
UPDATE vars SET description="<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>" WHERE name="hide_rating_value";
UPDATE vars SET description="<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>" WHERE name="main_op_eval";
UPDATE vars SET description="<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>" WHERE name="use_whosonline";
UPDATE vars SET description="<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>" WHERE name="allow_ad_renewal";
UPDATE vars SET description="<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>" WHERE name="ads_judge_unpaid";

INSERT IGNORE INTO vars VALUES('ads_use_cc', '0', '', 'bool', 'Payment Processing');
INSERT IGNORE INTO vars VALUES('ads_use_paypal', '0', '', 'bool', 'Payment Processing');
INSERT IGNORE INTO vars VALUES('default_displaystatus', '0', '', 'num', 'Stories');
INSERT IGNORE INTO vars VALUES('real_initial_rating', '0', '', 'bool', 'Comments');

UPDATE vars SET description="<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>" WHERE name="ads_use_cc";
UPDATE vars SET description="<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>" WHERE name="ads_use_paypal";
UPDATE vars SET description="<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>" WHERE name="default_displaystatus";
UPDATE vars SET type="bool" WHERE name="diary_topics";
UPDATE vars SET description="<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>" WHERE name="diary_topics";
UPDATE vars SET description="<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>" WHERE name="real_initial_rating";
UPDATE vars SET description="<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>" WHERE name="use_initial_rating";
UPDATE vars SET description="<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>" WHERE name="max_cache_size";
UPDATE vars SET description="<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>" WHERE name="paypal_business_id";
UPDATE vars SET description="<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>" WHERE name="story_nav_bar_sections";
UPDATE vars SET description="<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>" WHERE name="blocked_domains";
DELETE FROM vars WHERE name="op_aliases";
DELETE FROM vars WHERE name="op_templates";

