UPDATE vars SET name = 'payment_use_cc' WHERE name = 'ads_use_cc';
UPDATE vars SET name = 'payment_use_paypal' WHERE name = 'ads_use_paypal';

UPDATE blocks SET block = CONCAT('', '<a class="light" href="%%LINK%%">', block, '</a>') WHERE bid = 'prev_page_link';
UPDATE blocks SET block = CONCAT('', '<a class="light" href="%%LINK%%">', block, '</a>') WHERE bid = 'next_page_link';
UPDATE blocks SET block = '<table border="0" cellspacing="0" cellpadding="0" width="100%">\n<tr>\n<td>%%PREVIOUS_LINK%%</td>\n<td align="right">%%NEXT_LINK%%</td>\n</tr>\n</table>' WHERE bid = 'next_previous_links';

INSERT INTO blocks (bid, block, description, category, theme, language) VALUES ('sub_paypal_finished', 'Thank you, your PayPal payment has been recieved.', 'Message displayed in the body of the page after a user returns from making a paypal payment.', 'advertising,subscriptions', 'default', 'en');

INSERT INTO blocks VALUES ('error_font','<FONT COLOR=\"#FF0000\">','1','','display','default','en');
INSERT INTO blocks VALUES ('error_font_end','</FONT>','1','','display','default','en');
INSERT INTO blocks VALUES ('main_css','/* main page stuff */\r\nBODY       { background-color: #ffffff;\r\n             color: #000000; }\r\n\r\n:link      { color: #006699; }\r\n:visited   { color: #003366; }\r\n\r\n#main      { width: 100%;\r\n             border-spacing: 7px; }\r\n\r\n#main TD   { vertical-align: top; }\r\n\r\nH1         { background-color: %%title_bgcolor%%;\r\n             font-size: 1.6em;\r\n             padding: 3px;\r\n             margin: 0px; }\r\n\r\n.advert    { border: 1px solid #ff0000; }\r\n\r\n.loginform { text-align: right; }\r\n\r\n/* header and footer */\r\n\r\n#section_links { float: right;\r\n                 padding: 0.5em; }\r\n\r\n#footer    { text-align: center; }\r\n\r\n#footer FORM { display: inline; \r\n               vertical-align: top; }\r\n\r\n/* sidebar boxes */\r\n\r\n.box       { border: 1px solid black;\r\n             padding: 3px;\r\n             margin-bottom: 8px; }\r\n\r\n.box H2    { background-color: %%box_title_bg%%;\r\n             color: #ffffff;\r\n             font-size: 1.2em;\r\n             padding: 5px;\r\n             margin: -3px;\r\n             margin-bottom: 3px; }\r\n\r\n/* sections admin tool */\r\n/* this is because box_title_font is used in the code */\r\n/* and not in a DIV.box - this will be fixed in later */\r\n/* releases of Scoop as HTML is moved out of the code */\r\n\r\nTH H2        { color: #ffffff;\r\n               font-size: 1em; }\r\n\r\nTD H2        { color: #ffffff;\r\n               font-size: 1em; }\r\n\r\n/* story stuff */\r\n\r\n.story_title H2 { font-size: 1.2em;\r\n                  color: #000000;\r\n                  display: inline; }\r\n\r\n.story_summary { border-bottom: 1px dashed black;\r\n                 padding-top: 0.5em; }\r\n\r\n.story_body { padding-top: 0.5em; }\r\n\r\n.story_info { background-color: %%story_mod_bg%%;\r\n              text-align: center; }\r\n\r\n#author_console { border: 1px solid #006699;\r\n                  background-color: %%story_mod_bg%% }\r\n\r\n#vote_console { border: 1px solid #006699;\r\n                background-color: %%story_mod_bg%% }\r\n\r\n/* comment stuff */\r\n\r\n.commenthead { border: 1px solid #006699;\r\n               background-color: %%comment_head_bg%%; }\r\n\r\n.editorialhead { border: 1px solid #FF0000;\r\n                 background-color: %%comment_head_bg%%; }\r\n','1','<P>This block contains the CSS stylesheet for the site. It should be what you\'d expect to find in a .css file on the filesystem, except it recognizes the standard keys for interpolation. There are no special keys. This is sent to the client via the URL |rootdir|/css/main - any other stylesheets you create must also have _css at the end of their name if you want them accessible via the css op.</p>','CSS','default','en');
-- This is the admin_template from the new default db. script-30-post will
-- replace this with the existing default_template so that no appearance is
-- changed

INSERT INTO blocks (bid, block) VALUES ('admin_template', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n<LINK rel="stylesheet" type="text/css" href="%%rootdir%%/css/main">\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id="main">\r\n  <!-- Main page block -->\r\n  <TR>\r\n		\r\n    <!-- Center content section -->\r\n    <TD VALIGN="top" width="72%">\r\n      %%CONTENT%%\r\n    </TD>\r\n    <!-- X center content section -->\r\n		\r\n    <!-- Right boxes column -->\r\n    <TD VALIGN="top" WIDTH="25%">\r\n\r\n      %%BOX,main_menu%%\r\n      %%BOX,hotlist_box%%\r\n      %%BOX,user_box%%\r\n      %%BOX,admin_tools%%\r\n		\r\n    </TD>\r\n    <!-- X Right boxes column -->\r\n  </TR>\r\n  <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n');

INSERT INTO box (boxid, title, content, description, template) VALUES ('css', 'css', 'my $content;\r\n\r\nmy $file = $S->cgi->param(\'file\');\r\nmy $block = $file."_css";\r\n\r\n$content = $S->{UI}->{BLOCKS}->{$block};\r\n$S->apache->content_type(\'text/css\');\r\n\r\nreturn {content => $content};', 'Returns a block with type text/css', 'empty_box');
INSERT INTO ops (op, template, func, is_box, enabled, perm, aliases, urltemplates, description) VALUES ('css', 'content_only_page_template', 'css', 1, 1, '', '', '/file/', 'Returns a block of CSS with the correct file type.');
UPDATE ops SET template = 'admin_template' WHERE op = 'admin';
