/textpattern/setup/txpsql.php
PHP | 586 lines | 515 code | 60 blank | 11 comment | 17 complexity | 32d2b2c425c1e61b640bd318c7d099fd MD5 | raw file
Possible License(s): AGPL-1.0
Large files files are truncated, but you can click here to view the full file
- <?php
- /*
- $HeadURL: http://textpattern.googlecode.com/svn/development/4.0/textpattern/setup/txpsql.php $
- $LastChangedRevision: 2893 $
- */
- if (!defined('TXP_INSTALL'))
- exit;
- @ignore_user_abort(1);
- @set_time_limit(0);
- mysql_connect($dhost,$duser,$dpass,false,$dclient_flags);
- mysql_select_db($ddb);
- $result = mysql_query("describe `".PFX."textpattern`");
- if ($result) die("Textpattern database table already exist. Can't run setup.");
- $version = mysql_get_server_info();
- //Use "ENGINE" if version of MySQL > (4.0.18 or 4.1.2)
- $tabletype = ( intval($version[0]) >= 5 || preg_match('#^4\.(0\.[2-9]|(1[89]))|(1\.[2-9])#',$version))
- ? " ENGINE=MyISAM "
- : " TYPE=MyISAM ";
- // On 4.1 or greater use utf8-tables
- if ( isset($dbcharset) && (intval($version[0]) >= 5 || preg_match('#^4\.[1-9]#',$version)))
- {
- $tabletype .= " CHARACTER SET = $dbcharset ";
- if ($dbcharset == 'utf8')
- $tabletype .= " COLLATE utf8_general_ci ";
- mysql_query("SET NAMES ".$dbcharset);
- }
- // Default to messy URLs if we know clean ones won't work
- $permlink_mode = 'section_id_title';
- if (is_callable('apache_get_modules'))
- {
- $modules = apache_get_modules();
- if (!in_array('mod_rewrite', $modules))
- $permlink_mode = 'messy';
- }
- else
- {
- $server_software = (@$_SERVER['SERVER_SOFTWARE'] || @$_SERVER['HTTP_HOST'])
- ? ( (@$_SERVER['SERVER_SOFTWARE']) ? @$_SERVER['SERVER_SOFTWARE'] : $_SERVER['HTTP_HOST'] )
- : '';
- if (!stristr($server_software, 'Apache'))
- $permlink_mode = 'messy';
- }
- $name = ps('name') ? ps('name') : 'anon';
- $create_sql = array();
- $create_sql[] = "CREATE TABLE `".PFX."textpattern` (
- `ID` int(11) NOT NULL auto_increment,
- `Posted` datetime NOT NULL default '0000-00-00 00:00:00',
- `Expires` datetime NOT NULL default '0000-00-00 00:00:00',
- `AuthorID` varchar(64) NOT NULL default '',
- `LastMod` datetime NOT NULL default '0000-00-00 00:00:00',
- `LastModID` varchar(64) NOT NULL default '',
- `Title` varchar(255) NOT NULL default '',
- `Title_html` varchar(255) NOT NULL default '',
- `Body` mediumtext NOT NULL,
- `Body_html` mediumtext NOT NULL,
- `Excerpt` text NOT NULL,
- `Excerpt_html` mediumtext NOT NULL,
- `Image` varchar(255) NOT NULL default '',
- `Annotate` int(2) NOT NULL default '0',
- `AnnotateInvite` varchar(255) NOT NULL default '',
- `comments_count` int(8) NOT NULL default '0',
- `Status` int(2) NOT NULL default '4',
- `textile_body` int(2) NOT NULL default '1',
- `textile_excerpt` int(2) NOT NULL default '1',
- `Section` varchar(64) NOT NULL default '',
- `override_form` varchar(255) NOT NULL default '',
- `Keywords` varchar(255) NOT NULL default '',
- `url_title` varchar(255) NOT NULL default '',
- `custom_1` varchar(255) NOT NULL default '',
- `custom_2` varchar(255) NOT NULL default '',
- `custom_3` varchar(255) NOT NULL default '',
- `custom_4` varchar(255) NOT NULL default '',
- `custom_5` varchar(255) NOT NULL default '',
- `custom_6` varchar(255) NOT NULL default '',
- `custom_7` varchar(255) NOT NULL default '',
- `custom_8` varchar(255) NOT NULL default '',
- `custom_9` varchar(255) NOT NULL default '',
- `custom_10` varchar(255) NOT NULL default '',
- `uid` varchar(32) NOT NULL default '',
- `feed_time` date NOT NULL default '0000-00-00',
- PRIMARY KEY (`ID`),
- KEY `Posted` (`Posted`),
- FULLTEXT KEY `searching` (`Title`,`Body`)
- ) $tabletype PACK_KEYS=1 AUTO_INCREMENT=2 ";
- $setup_comment_invite = doSlash( ( gTxt('setup_comment_invite')=='setup_comment_invite') ? 'Comment' : gTxt('setup_comment_invite') );
- $create_sql[] = "INSERT INTO `".PFX."textpattern` VALUES (1, now(), '', '".doSlash($name)."', now(), '', 'Welcome to Your Site!', '', 'h3. What do you want to do next?\n\n* Modify or even delete this article? The \"article list\":./textpattern/index.php?event=list is the place to start.\n* Change this site\'s name, or modify the style of the URLs? It\'s all up to your \"preferences\":./textpattern/index.php?event=prefs.\n* Get yourself acquainted with Textile, the humane web text generator which comes with Textpattern? The basics are \"simple\":http://textile.thresholdstate.com/. If you want to learn more about Textile, you can dig into an \"extensive manual\":http://thresholdstate.com/articles/4312/the-textile-reference-manual later.\n* Be guided through your \"Textpattern first steps\":http://textpattern.net/wiki/index.php?title=Textpattern_First_Steps by completing some basic tasks?\n* Study the \"Textpattern Semantic Model?\":http://textpattern.net/wiki/index.php?title=Textpattern_Semantic_Model\n* Add \"another user\":./textpattern/index.php?event=admin, or extend the capabilities with \"third party plugins\":./textpattern/index.php?event=plugin you discovered from the central plugin directory at \"Textpattern Resources\":http://textpattern.org/?\n* Dive in and learn by trial and error? Then please note:\n** When you \"write\":./textpattern/index.php?event=article an article you assign it to a section of your site.\n** Sections use a \"page template\":./textpattern/index.php?event=page and a \"style\":./textpattern/index.php?event=css as an output scaffold.\n** Page templates use XHTML and Textpattern tags (like this: @<txp:print_a_thingy />@) to build the markup.\n** Some Textpattern tags use \"forms\":./textpattern/index.php?event=form, which are building blocks for reusable snippets of code and markup you may build and use at your discretion.\n\nThere are a host of \"Frequently Asked Questions\":http://textpattern.com/faq to help you get started.\n\n\"Textpattern tags\":http://textbook.textpattern.net/wiki/index.php?title=Alphabetical_Tag_Listing, their attributes and values are as well explained as sampled at the \"Textbook Wiki\":http://textbook.textpattern.net/wiki/index.php?title=TextBook_International, where you will also find valuable tips and tutorials.\n\nIf all else fails, there\'s a whole crowd of friendly, helpful people over at the \"Textpattern support forum\":http://forum.textpattern.com/. Come and pay a visit!\n', '<h3>What do you want to do next?</h3>\n\t<p>Modify or even delete this article? The <a href=\"<txp:site_url />textpattern/index.php?event=list\">article list</a> is the place to start.</p>\n\t<p>Change this site’s name, or modify the style of the <span class=\"caps\">URL</span>s? It’s all up to your <a href=\"<txp:site_url />textpattern/index.php?event=prefs\">preferences</a>.</p>\n\t<p>Get yourself acquainted with Textile, the humane web text generator which comes with Textpattern? The basics are <a href=\"http://textile.thresholdstate.com/\">simple</a>. If you want to learn more about Textile, you can dig into an <a href=\"http://thresholdstate.com/articles/4312/the-textile-reference-manual\">extensive manual</a> later.</p>\n\t<p>Be guided through your <a href=\"http://textpattern.net/wiki/index.php?title=Textpattern_First_Steps\">Textpattern first steps</a> by completing some basic tasks?</p>\n\t<p>Study the <a href=\"http://textpattern.net/wiki/index.php?title=Textpattern_Semantic_Model\">Textpattern Semantic Model?</a></p>\n\t<p>Add <a href=\"<txp:site_url />textpattern/index.php?event=admin\">another user</a>, or extend the capabilities with <a href=\"<txp:site_url />textpattern/index.php?event=plugin\">third party plugins</a> you discovered from the central plugin directory at <a href=\"http://textpattern.org/\">Textpattern Resources</a>?</p>\n\t<p>Dive in and learn by trial and error? Then please note:\n\t<ul>\n\t\t<li>When you <a href=\"<txp:site_url />textpattern/index.php?event=article\">write</a> an article you assign it to a section of your site.</li>\n\t\t<li>Sections use a <a href=\"<txp:site_url />textpattern/index.php?event=page\">page template</a> and a <a href=\"<txp:site_url />textpattern/index.php?event=css\">style</a> as an output scaffold.</li>\n\t\t<li>Page templates use <span class=\"caps\">XHTML</span> and Textpattern tags (like this: <code><txp:print_a_thingy /></code>) to build the markup.</li>\n\t\t<li>Some Textpattern tags use <a href=\"<txp:site_url />textpattern/index.php?event=form\">forms</a>, which are building blocks for reusable snippets of code and markup you may build and use at your discretion.</li>\n\t</ul>\n\t<p>There are a host of <a href=\"http://textpattern.com/faq\">Frequently Asked Questions</a> to help you get started.</p>\n\t<p><a href=\"http://textbook.textpattern.net/wiki/index.php?title=Alphabetical_Tag_Listing\">Textpattern tags</a>, their attributes and values are as well explained as sampled at the <a href=\"http://textbook.textpattern.net/wiki/index.php?title=TextBook_International\">Textbook Wiki</a>, where you will also find valuable tips and tutorials.</p>\n\t<p>If all else fails, there’s a whole crowd of friendly, helpful people over at the <a href=\"http://forum.textpattern.com/\">Textpattern support forum</a>. Come and pay a visit!</p>\n', '', '', '', 1, '".$setup_comment_invite."', 1, 4, 1, 1, 'articles', '', '', 'welcome-to-your-site', '', '', '', '', '', '', '', '', '', '', '".md5(uniqid(rand(), true))."', now())";
- $create_sql[] = "CREATE TABLE `".PFX."group` (
- `id` int(6) NOT NULL,
- `name` varchar(64) NOT NULL default '',
- PRIMARY KEY (`id`),
- UNIQUE KEY `name` (`name`)
- ) $tabletype PACK_KEYS=1";
- $create_sql[] = "INSERT INTO `".PFX."group` VALUES (0, 'none')";
- $create_sql[] = "INSERT INTO `".PFX."group` VALUES (1, 'publisher')";
- $create_sql[] = "INSERT INTO `".PFX."group` VALUES (2, 'managing_editor')";
- $create_sql[] = "INSERT INTO `".PFX."group` VALUES (3, 'copy_editor')";
- $create_sql[] = "INSERT INTO `".PFX."group` VALUES (4, 'staff_writer')";
- $create_sql[] = "INSERT INTO `".PFX."group` VALUES (5, 'freelancer')";
- $create_sql[] = "INSERT INTO `".PFX."group` VALUES (6, 'designer')";
- $create_sql[] = "CREATE TABLE `".PFX."txp_category` (
- `id` int(6) NOT NULL auto_increment,
- `name` varchar(64) NOT NULL default '',
- `type` varchar(64) NOT NULL default '',
- `parent` varchar(64) NOT NULL default '',
- `lft` int(6) NOT NULL default '0',
- `rgt` int(6) NOT NULL default '0',
- `title` varchar(255) NOT NULL default '',
- PRIMARY KEY (`id`)
- ) $tabletype PACK_KEYS=1 AUTO_INCREMENT=10 ";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (1, 'root', 'article', '', 1, 8, 'root')";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (2, 'root', 'link', '', 1, 4, 'root')";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (3, 'root', 'image', '', 1, 4, 'root')";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (4, 'root', 'file', '', 1, 2, 'root')";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (5, 'hope-for-the-future', 'article', 'root', 2, 3, 'Hope for the Future')";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (6, 'meaningful-labor', 'article', 'root', 4, 5, 'Meaningful Labor')";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (7, 'reciprocal-affection', 'article', 'root', 6, 7, 'Reciprocal Affection')";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (8, 'textpattern', 'link', 'root', 2, 3, 'Textpattern')";
- $create_sql[] = "INSERT INTO `".PFX."txp_category` VALUES (9, 'site-design', 'image', 'root', 2, 3, 'Site Design')";
- $create_sql[] = "CREATE TABLE `".PFX."blurb` (
- `id` INT NOT NULL AUTO_INCREMENT ,
- `name` VARCHAR( 64 ) NOT NULL ,
- `type` VARCHAR( 32 ) NOT NULL ,
- `theme` VARCHAR( 32 ) NOT NULL DEFAULT 'default',
- `content` TEXT NOT NULL ,
- `mime_type` VARCHAR( 64 ) NOT NULL DEFAULT '',
- PRIMARY KEY ( `id` ) ,
- UNIQUE `hash` ( `name` , `type` , `theme` )
- ) $tabletype PACK_KEYS=1";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `mime_type`, `content`) VALUES ('default', 'css', 'text/css', '".doSlash(base64_decode('LyogYmFzZQ0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8NCg0KYm9keSB7DQoJbWFyZ2luOiAwOw0KCXBhZGRpbmc6IDA7DQoJZm9udC1mYW1pbHk6IFZlcmRhbmEsICJMdWNpZGEgR3JhbmRlIiwgVGFob21hLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWY7DQoJY29sb3I6ICMwMDA7DQoJYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsNCn0NCg0KYmxvY2txdW90ZSwgaDMsIHAsIGxpIHsNCglwYWRkaW5nLXJpZ2h0OiAxMHB4Ow0KCXBhZGRpbmctbGVmd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hdXRob3Igew0KCWZvbnQtc3R5bGU6IG5vcm1hbDsNCglmb250LXNpemU6IDAuOGVtOw0KfQ0KDQoucHVibGlzaGVkIHsNCglmb250LXNpemU6IDAuOGVtOw0KfQ0KDQovKiBjb21tZW50cw0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8NCg0KLmNvbW1lbnRzX2Vycm9yIHsNCgljb2xvcjogIzAwMDsNCgliYWNrZ3JvdW5kLWNvbG9yOiAjZmZmNGY0Ow0KfQ0KDQp1bC5jb21tZW50c19lcnJvciB7DQoJcGFkZGluZyA6IDAuM2VtOw0KCWxpc3Qtc3R5bGUtdHlwZTogY2lyY2xlOw0KCWxpc3Qtc3R5bGUtcG9zaXRpb246IGluc2lkZTsNCglib3JkZXI6IDJweCBzb2xpZCAjZmRkOw0KfQ0KDQpkaXYjY3ByZXZpZXcgew0KCWNvbG9yOiAjMDAwOw0KCWJhY2tncm91bmQtY29sb3I6ICNmMWYxZjE7DQoJYm9yZGVyOiAycHggc29saWQgI2RkZDsNCn0NCg0KZm9ybSN0eHBDb21tZW50SW5wdXRGb3JtIHRkIHsNCgl2ZXJ0aWNhbC1hbGlnbjogdG9wOw0KfQ0KDQojY29tbWVudHMtaGVscCB7DQoJbWFyZ2luOiAycHggMCAxNXB4IDA7DQoJZm9udC1zaXplOiAwLjdlbTsNCn0NCg0KLyogZXJyb3IgcGFnZQ0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8NCg0KLmVycm9yLXN0YXR1cyB7DQoJZm9udDogMS4zZW0gR2VvcmdpYSwgVGltZXMsIHNlcmlmOw0KfQ=='))."')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('links', 'form', '<p><txp:link /><br />\n<txp:link_description /></p>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('lofi', 'form', '<h3 class=\"entry-title\"><txp:title /> <txp:permlink>#</txp:permlink></h3>\n\n<p class=\"published\"><txp:posted /></p>\n\n<div class=\"entry-content\">\n<txp:body />\n</div>\n\n<hr />\n\n')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('single', 'form', '<h3 class=\"entry-title\"><txp:permlink><txp:title /></txp:permlink></h3>\n\t<p class=\"published\"><txp:posted /></p>\n\n<div class=\"entry-content\">\n<txp:body />\n</div>\n\n')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('plainlinks', 'form', '<txp:linkdesctitle /><br />')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('comments', 'form', '<txp:comment_message />\n\n<p class=\"small\">— <txp:comment_name /> · <txp:comment_time /> · <txp:comment_permlink>#</txp:comment_permlink></p>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('default', 'form', '<txp:if_individual_article>\n<h1 class=\"entry-title\"><txp:permlink><txp:title /></txp:permlink></h1>\n<txp:else />\n<h3 class=\"entry-title\"><txp:permlink><txp:title /></txp:permlink></h3>\n</txp:if_individual_article>\n\n<p class=\"published\"><txp:posted /></p>\n\n<div class=\"entry-content\">\n<txp:body />\n</div>\n\n<address class=\"vcard author\">— <span class=\"fn\"><txp:author /></span></address>\n\n<p class=\"tags\"><p class=\"tags\"><txp:list_article_cats link=\"1\" sep=\"; \" /></p></p>\n\n<txp:comments_invite wraptag=\"p\" />\n\n<div class=\"divider\"><img src=\"<txp:site_url />images/1.gif\" width=\"400\" height=\"1\" alt=\"---\" title=\"\" /></div>\n\n')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('comment_form', 'form', '<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\">\n<tr>\n\t<td align=\"right\">\n\t\t<label for=\"name\"><txp:text item=\"comment_name\" /></label>\n\t</td>\n\n\t<td>\n\t\t<txp:comment_name_input />\n\t\t<txp:comment_remember />\n\t</td>\n</tr>\n\n<tr>\n\t<td align=\"right\">\n\t\t<label for=\"email\"><txp:text item=\"comment_email\" /></label>\n\t</td>\n\n\t<td>\n\t\t<txp:comment_email_input />\n\t</td>\n</tr>\n\n<tr>\n\t<td align=\"right\">\n\t\t<label for=\"web\"><txp:text item=\"comment_web\" /></label>\n\t</td>\n\n\t<td>\n\t\t<txp:comment_web_input />\n\t</td>\n</tr>\n\n<tr>\n\t<td align=\"right\">\n\t\t<label for=\"message\"><txp:text item=\"comment_message\" /></label>\n\t</td>\n\n\t<td>\n\t\t<txp:comment_message_input />\n\t\t<div id=\"comments-help\"><txp:comments_help /></div>\n\t</td>\n\n</tr>\n\n<tr>\n\t<td> </td>\n\n\t<td>\n\t\t<txp:comment_preview />\n\t\t<txp:comment_submit />\n\t</td>\n</tr>\n\n</table>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('noted', 'form', '<p><txp:link />. <txp:link_description /></p>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('popup_comments', 'form', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t<title><txp:page_title /></title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<txp:css />\" />\n</head>\n<body>\n\n<div style=\"padding: 1em; width:300px;\">\n<txp:popup_comments />\n</div>\n\n</body>\n</html>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('files', 'form', '<txp:text item=\"file\" />: \n<txp:file_download_link>\n<txp:file_download_name /> [<txp:file_download_size format=\"auto\" decimals=\"2\" />]\n</txp:file_download_link>\n<br />\n<txp:text item=\"category\" />: <txp:file_download_category /><br />\n<txp:text item=\"download\" />: <txp:file_download_downloads />')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('search_results', 'form', '<h3 class=\"entry-title\"><txp:permlink><txp:title /></txp:permlink></h3>\n\n<p class=\"published\"><txp:posted /></p>\n\n<p class=\"entry-summary\"><txp:search_result_excerpt /></p>\n\n<p class=\"small\"><txp:permlink><txp:permlink /></txp:permlink></p>\n\n<div class=\"divider\"><img src=\"<txp:site_url />images/1.gif\" width=\"400\" height=\"1\" alt=\"---\" title=\"\" /></div>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('comments_display', 'form', '<h2 id=\"<txp:text item=\"comment\" />\"><txp:comments_invite textonly=\"1\" showalways=\"1\" showcount=\"0\" /></h2>\n\n<txp:comments />\n\n<txp:if_comments_preview>\n<div id=\"cpreview\">\n<txp:comments_preview />\n</div>\n</txp:if_comments_preview>\n\n<txp:if_comments_allowed>\n<txp:comments_form isize=\"25\" msgcols=\"45\" msgrows=\"15\" />\n<txp:else />\n<p><txp:text item=\"comments_closed\" /></p>\n</txp:if_comments_allowed>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `content`) VALUES ('article_listing', 'form', '<txp:if_first_article><ul class=\"directory\"></txp:if_first_article>\n\n<li><span class=\"entry-title\"><txp:permlink><txp:title /></txp:permlink></span> · <span class=\"published\"><txp:posted format=\"%Y-%m-%d\" /></span></li>\n\n<txp:if_last_article></ul></txp:if_last_article>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `mime_type`, `content`) VALUES ('default', 'page', 'text/html', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\n\t<title><txp:page_title /></title>\n\n\t<link rel=\"home\" href=\"<txp:site_url />\" />\n\n\t<txp:feed_link flavor=\"atom\" format=\"link\" label=\"Atom\" />\n\t<txp:feed_link flavor=\"rss\" format=\"link\" label=\"RSS\" />\n\n\t<txp:css format=\"link\" />\n\n\t<txp:rsd />\n</head>\n<body id=\"<txp:if_section name=\"default\">front<txp:else /><txp:section /></txp:if_section>\">\n\n<!-- accessibility -->\n<div id=\"accessibility\">\n\t<ul>\n\t\t<li><a href=\"#content\"><txp:text item=\"go_content\" /></a></li>\n\t\t<li><a href=\"#sidebar-1\"><txp:text item=\"go_nav\" /></a></li>\n\t\t<li><a href=\"#sidebar-2\"><txp:text item=\"go_search\" /></a></li>\n\t</ul>\n</div>\n\n<div id=\"container\">\n\n<!-- head -->\n\t<div id=\"head\">\n\t\t<h1 id=\"site-name\"><txp:link_to_home><txp:site_name /></txp:link_to_home></h1>\n\t\t<p id=\"site-slogan\"><txp:site_slogan /></p>\n\t</div>\n\n<!-- left -->\n\t<div id=\"sidebar-1\">\n\t\t<txp:section_list default_title=\'<txp:text item=\"home\" />\' include_default=\"1\" wraptag=\"ul\" break=\"li\">\n\t\t\t<txp:if_section name=\'<txp:section />\'>»</txp:if_section>\n\t\t\t<txp:section link=\"1\" title=\"1\" />\n\t\t\t<txp:if_section name=\'<txp:section />\'>\n\t\t\t\t<txp:article_custom section=\'<txp:section />\' wraptag=\"ul\" break=\"li\">\n\t\t\t\t\t<txp:if_article_id>›</txp:if_article_id>\n\t\t\t\t\t<txp:permlink><txp:title /></txp:permlink>\n\t\t\t\t</txp:article_custom>\n\t\t\t</txp:if_section>\n\t\t</txp:section_list>\n\t\t<txp:search_input wraptag=\"p\" />\n\n\t\t<p><txp:feed_link label=\"RSS\" /> / <txp:feed_link flavor=\"atom\" label=\"Atom\" /></p>\n\t</div>\n\n<!-- right -->\n\t<div id=\"sidebar-2\">\n\t\t<txp:linklist wraptag=\"p\" />\n\n\t\t<p><a href=\"http://textpattern.com/\"><img src=\"<txp:site_url />textpattern/txp_img/txp_slug105x45.gif\" width=\"105\" height=\"45\" alt=\"Textpattern\" title=\"\" /></a></p>\n\t</div>\n\n<!-- center -->\n\t<div id=\"content\">\n<txp:if_category>\n\t\t<h2><txp:category title=\"1\" /></h2>\n\n\t\t<div class=\"hfeed\">\n\t\t<txp:article form=\"article_listing\" limit=\"5\" />\n\t\t</div>\n<txp:else />\n\t<txp:if_search>\n\t\t<h2><txp:text item=\"search_results\" />: <txp:page_url type=\"q\" /></h2>\n\n\t\t<div class=\"divider\"><img src=\"<txp:site_url />images/1.gif\" width=\"400\" height=\"1\" alt=\"---\" title=\"\" /></div>\n\t</txp:if_search>\n\n\t\t<div class=\"hfeed\">\n\t\t<txp:article limit=\"5\" />\n\t\t</div>\n</txp:if_category>\n\n\t\n<txp:if_individual_article>\n\t\t<div class=\"divider\"><img src=\"<txp:site_url />images/1.gif\" width=\"400\" height=\"1\" alt=\"---\" title=\"\" /></div>\n\n\t\t<p><txp:link_to_prev>« <txp:prev_title /></txp:link_to_prev> \n\t\t\t<txp:link_to_next><txp:next_title /> »</txp:link_to_next></p>\n<txp:else />\n\t\t<p><txp:older>« <txp:text item=\"older\" /></txp:older> \n\t\t\t<txp:newer><txp:text item=\"newer\" /> »</txp:newer></p>\n</txp:if_individual_article>\n\t</div>\n\n<!-- footer -->\n\t<div id=\"foot\"> </div>\n\n</div>\n\n</body>\n</html>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `mime_type`, `content`) VALUES ('archive', 'page', 'text/html', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\n\t<title><txp:page_title /></title>\n\n\t<link rel=\"home\" href=\"<txp:site_url />\" />\n\n\t<txp:feed_link flavor=\"atom\" format=\"link\" label=\"Atom\" />\n\t<txp:feed_link flavor=\"rss\" format=\"link\" label=\"RSS\" />\n\n\t<txp:css format=\"link\" />\n\n\t<txp:rsd />\n</head>\n<body id=\"<txp:section />\">\n\n<!-- accessibility -->\n<div id=\"accessibility\">\n\t<ul>\n\t\t<li><a href=\"#content\"><txp:text item=\"go_content\" /></a></li>\n\t\t<li><a href=\"#sidebar-1\"><txp:text item=\"go_nav\" /></a></li>\n\t\t<li><a href=\"#sidebar-2\"><txp:text item=\"go_search\" /></a></li>\n\t</ul>\n</div>\n\n<div id=\"container\">\n\n<!-- head -->\n\t<div id=\"head\">\n\t\t<p id=\"site-name\"><txp:link_to_home><txp:site_name /></txp:link_to_home></p>\n\t\t<p id=\"site-slogan\"><txp:site_slogan /></p>\n\t</div>\n\n<!-- left -->\n\t<div id=\"sidebar-1\">\n\t\t<txp:section_list default_title=\'<txp:text item=\"home\" />\' include_default=\"1\" wraptag=\"ul\" break=\"li\">\n\t\t\t<txp:if_section name=\'<txp:section />\'>»</txp:if_section>\n\t\t\t<txp:section link=\"1\" title=\"1\" />\n\t\t\t<txp:if_section name=\'<txp:section />\'>\n\t\t\t\t<txp:article_custom section=\'<txp:section />\' wraptag=\"ul\" break=\"li\">\n\t\t\t\t\t<txp:if_article_id>›</txp:if_article_id>\n\t\t\t\t\t<txp:permlink><txp:title /></txp:permlink>\n\t\t\t\t</txp:article_custom>\n\t\t\t</txp:if_section>\n\t\t</txp:section_list>\n\n\t\t<txp:search_input wraptag=\"p\" />\n\n\t\t<p><txp:feed_link label=\"RSS\" /> / <txp:feed_link flavor=\"atom\" label=\"Atom\" /></p>\n\t</div>\n\n<!-- right -->\n\t<div id=\"sidebar-2\">\n\t\t<txp:linklist wraptag=\"p\" />\n\n\t\t<p><a href=\"http://textpattern.com/\"><img src=\"<txp:site_url />textpattern/txp_img/txp_slug105x45.gif\" width=\"105\" height=\"45\" alt=\"Textpattern\" title=\"\" /></a></p>\n\t</div>\n\n<!-- center -->\n\t<div id=\"content\">\n\t\t<txp:if_article_list><h1><txp:section title=\"1\" /></h1></txp:if_article_list>\n\n\t\t<div class=\"hfeed\">\n\t\t<txp:article listform=\"article_listing\" limit=\"5\" />\n\t\t</div>\n\t\n<txp:if_individual_article>\n\t\t<div class=\"divider\"><img src=\"<txp:site_url />images/1.gif\" width=\"400\" height=\"1\" alt=\"---\" title=\"\" /></div>\n\n\t\t<p><txp:link_to_prev>« <txp:prev_title /></txp:link_to_prev> \n\t\t\t<txp:link_to_next><txp:next_title /> »</txp:link_to_next></p>\n<txp:else />\n\t\t<p><txp:older>« <txp:text item=\"older\" /></txp:older> \n\t\t\t<txp:newer><txp:text item=\"newer\" /> »</txp:newer></p>\n</txp:if_individual_article>\n\t</div>\n\n<!-- footer -->\n\t<div id=\"foot\"> </div>\n\n</div>\n\n</body>\n</html>')";
- $create_sql[] = "INSERT INTO `".PFX."blurb` (`name`, `type`, `mime_type`, `content`) VALUES ('error_default', 'page', 'text/html', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\r\n <link href=\"/lite/css/warning.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n <title>Warning!</title>\r\n</head>\r\n<body>\r\n\r\n<!-- warning -->\r\n<div id=\"warning\">\r\n <h1>Warning!</h1>\r\n <p>\r\n <txp:error_message />\r\n </p>\r\n</div>\r\n\r\n</body>\r\n</html>')";
- $create_sql[] = "CREATE TABLE `".PFX."txp_discuss` (
- `discussid` int(6) unsigned zerofill NOT NULL auto_increment,
- `parentid` int(8) NOT NULL default '0',
- `name` varchar(255) NOT NULL default '',
- `email` varchar(50) NOT NULL default '',
- `web` varchar(255) NOT NULL default '',
- `ip` varchar(100) NOT NULL default '',
- `posted` datetime NOT NULL default '0000-00-00 00:00:00',
- `message` text NOT NULL,
- `visible` tinyint(4) NOT NULL default '1',
- PRIMARY KEY (`discussid`),
- KEY `parentid` (`parentid`)
- ) $tabletype PACK_KEYS=1 AUTO_INCREMENT=2 ";
- $create_sql[] = "INSERT INTO `".PFX."txp_discuss` VALUES (000001, 1, 'Donald Swain', 'me@here.com', 'example.com', '127.0.0.1', '2005-07-22 14:11:32', '<p>I enjoy your site very much.</p>', 1)";
- $create_sql[] = "CREATE TABLE `".PFX."txp_discuss_ipban` (
- `ip` varchar(255) NOT NULL default '',
- `name_used` varchar(255) NOT NULL default '',
- `date_banned` datetime NOT NULL default '0000-00-00 00:00:00',
- `banned_on_message` int(8) NOT NULL default '0',
- PRIMARY KEY (`ip`)
- ) $tabletype ";
- $create_sql[] = "CREATE TABLE `".PFX."txp_discuss_nonce` (
- `issue_time` datetime NOT NULL default '0000-00-00 00:00:00',
- `nonce` varchar(255) NOT NULL default '',
- `used` tinyint(4) NOT NULL default '0',
- `secret` varchar(255) NOT NULL default '',
- PRIMARY KEY (`nonce`)
- ) $tabletype ";
- $create_sql[] = "CREATE TABLE `".PFX."txp_file` (
- `id` int(11) NOT NULL auto_increment,
- `filename` varchar(255) NOT NULL default '',
- `category` varchar(255) NOT NULL default '',
- `permissions` varchar(32) NOT NULL default '0',
- `description` text NOT NULL,
- `downloads` int(4) unsigned NOT NULL default '0',
- PRIMARY KEY (`id`),
- UNIQUE KEY `filename` (`filename`)
- ) $tabletype PACK_KEYS=0 AUTO_INCREMENT=1 ";
- $create_sql[] = "CREATE TABLE `".PFX."txp_image` (
- `id` int(11) NOT NULL auto_increment,
- `name` varchar(255) NOT NULL default '',
- `category` varchar(255) NOT NULL default '',
- `ext` varchar(20) NOT NULL default '',
- `w` int(8) NOT NULL default '0',
- `h` int(8) NOT NULL default '0',
- `alt` varchar(255) NOT NULL default '',
- `caption` text NOT NULL,
- `date` datetime NOT NULL default '0000-00-00 00:00:00',
- `author` varchar(255) NOT NULL default '',
- `thumbnail` int(2) NOT NULL default '0',
- PRIMARY KEY (`id`)
- ) $tabletype PACK_KEYS=0 AUTO_INCREMENT=2 ";
- $create_sql[] = "INSERT INTO `".PFX."txp_image` VALUES (1, 'divider.gif', 'site-design', '.gif', 400, 1, '', '', '2005-07-22 16:37:11', '".doSlash($name)."', 0)";
- $create_sql[] = "CREATE TABLE `".PFX."txp_lang` (
- `id` int(9) NOT NULL auto_increment,
- `lang` varchar(16) NOT NULL,
- `name` varchar(64) NOT NULL,
- `event` varchar(64) NOT NULL,
- `data` text,
- `lastmod` timestamp,
- PRIMARY KEY (`id`),
- UNIQUE KEY `lang` (`lang`,`name`),
- KEY `lang_2` (`lang`,`event`)
- ) $tabletype AUTO_INCREMENT=1 ";
- $create_sql[] = "CREATE TABLE `".PFX."txp_link` (
- `id` int(6) NOT NULL auto_increment,
- `date` datetime NOT NULL default '0000-00-00 00:00:00',
- `category` varchar(64) NOT NULL default '',
- `url` text NOT NULL,
- `linkname` varchar(255) NOT NULL default '',
- `linksort` varchar(128) NOT NULL default '',
- `description` text NOT NULL,
- PRIMARY KEY (`id`)
- ) $tabletype PACK_KEYS=1 AUTO_INCREMENT=4 ";
- $create_sql[] = "INSERT INTO `".PFX."txp_link` VALUES (1, '2005-07-20 12:54:26', 'textpattern', 'http://textpattern.com/', 'Textpattern', 'Textpattern', '')";
- $create_sql[] = "INSERT INTO `".PFX."txp_link` VALUES (2, '2005-07-20 12:54:41', 'textpattern', 'http://textpattern.net/', 'TextBook', 'TextBook', '')";
- $create_sql[] = "INSERT INTO `".PFX."txp_link` VALUES (3, '2005-07-20 12:55:04', 'textpattern', 'http://textpattern.org/', 'Txp Resources', 'Txp Resources', '')";
- $create_sql[] = "CREATE TABLE `".PFX."txp_log` (
- `id` int(12) NOT NULL auto_increment,
- `time` datetime NOT NULL default '0000-00-00 00:00:00',
- `host` varchar(255) NOT NULL default '',
- `page` varchar(255) NOT NULL default '',
- `refer` mediumtext NOT NULL,
- `status` int(11) NOT NULL default '200',
- `method` varchar(16) NOT NULL default 'GET',
- `ip` varchar(16) NOT NULL default '',
- PRIMARY KEY (`id`),
- KEY `time` (`time`)
- ) $tabletype AUTO_INCREMENT=77 ";
- $create_sql[] = "CREATE TABLE `".PFX."txp_plugin` (
- `name` varchar(64) NOT NULL default '',
- `status` int(2) NOT NULL default '1',
- `author` varchar(128) NOT NULL default '',
- `author_uri` varchar(128) NOT NULL default '',
- `version` varchar(10) NOT NULL default '1.0',
- `description` text NOT NULL,
- `help` text NOT NULL,
- `code` text NOT NULL,
- `code_restore` text NOT NULL,
- `code_md5` varchar(32) NOT NULL default '',
- `type` int(2) NOT NULL default '0',
- load_order TINYINT UNSIGNED NOT NULL DEFAULT 5,
- UNIQUE KEY `name` (`name`)
- ) $tabletype ";
- $create_sql[] = "CREATE TABLE `".PFX."txp_prefs` (
- `prefs_id` int(11) NOT NULL,
- `name` varchar(255) NOT NULL,
- `val` varchar(255) NOT NULL default '',
- `type` smallint(5) unsigned NOT NULL default '2',
- `event` varchar(12) NOT NULL default 'publish',
- `html` varchar(64) NOT NULL default 'text_input',
- `position` smallint(5) unsigned NOT NULL default '0',
- UNIQUE KEY `prefs_idx` (`prefs_id`,`name`),
- KEY `name` (`name`)
- ) $tabletype ";
- $prefs['blog_uid'] = md5(uniqid(rand(),true));
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'prefs_id', '1', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'sitename', '".doSlash(gTxt('my_site'))."', 0, 'publish', 'text_input', 10)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'siteurl', 'comment.local', 0, 'publish', 'text_input', 20)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'site_slogan', '".doSlash(gTxt('my_slogan'))."', 0, 'publish', 'text_input', 30)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'language', 'en-gb', 2, 'publish', 'languages', 40)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'url_mode', '1', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'timeoffset', '0', 2, 'publish', 'text_input', 0)";
- $gmtoffset = sprintf("%+d", gmmktime(0,0,0) - mktime(0,0,0));
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'gmtoffset', '".$gmtoffset."', 1, 'admin', 'text_input', 100)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'publish_expired_articles', '0', 1, 'publish', 'yesnoradio', 130)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_on_default', '0', 0, 'comments', 'yesnoradio', 140)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_are_ol', '1', 0, 'comments', 'yesnoradio', 160)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_default_invite', '".$setup_comment_invite."', 0, 'comments', 'text_input', 180)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_mode', '0', 0, 'comments', 'commentmode', 200)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_disabled_after', '42', 0, 'comments', 'weeks', 210)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'use_textile', '2', 0, 'publish', 'pref_text', 110)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'use_textilebar', '2', 0, 'publish', 'yesnradio', 115)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'ping_weblogsdotcom', '0', 1, 'publish', 'yesnoradio', 160)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'rss_how_many', '5', 1, 'feeds', 'text_input', 40)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'logging', 'all', 0, 'publish', 'logging', 100)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'use_comments', '1', 0, 'publish', 'yesnoradio', 120)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'use_categories', '1', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'use_sections', '1', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'send_lastmod', '0', 1, 'admin', 'yesnoradio', 120)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'path_from_root', '/', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'lastmod', '2005-07-23 16:24:10', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_dateformat', '%b %d, %I:%M %p', 0, 'comments', 'dateformats', 190)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'dateformat', 'since', 0, 'publish', 'dateformats', 70)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'archive_dateformat', '%b %d, %I:%M %p', 0, 'publish', 'dateformats', 80)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_moderate', '1', 0, 'comments', 'yesnoradio', 130)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'img_dir', 'images', 1, 'admin', 'text_input', 20)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_disallow_images', '0', 0, 'comments', 'yesnoradio', 170)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_sendmail', '0', 0, 'comments', 'yesnoradio', 160)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_sendmail_spam', '0', 0, 'comments', 'yesnoradio', 161)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'file_max_upload_size', '2000000', 1, 'admin', 'text_input', 60)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'file_list_pageby', '25', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'path_to_site', '', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'article_list_pageby', '25', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'link_list_pageby', '25', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'image_list_pageby', '25', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'log_list_pageby', '25', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comment_list_pageby', '25', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'permlink_mode', '".doSlash($permlink_mode)."', 0, 'publish', 'permlinkmodes', 90)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'is_dst', '0', 0, 'publish', 'yesnoradio', 60)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'locale', 'en_GB.UTF-8', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'tempdir', '".doSlash(find_temp_dir())."', 1, 'admin', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'plugin_cache_dir', '', 1, 'admin', 'text_input', 100)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'file_base_path', '".doSlash(dirname(txpath).DS.'files')."', 1, 'admin', 'text_input', 40)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'blog_uid', '". $prefs['blog_uid'] ."', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'blog_mail_uid', '".doSlash(ps('email'))."', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'blog_time_uid', '".date("Y")."', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'allow_page_php_scripting', '1', 1, 'publish', 'yesnoradio', 300)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'allow_article_php_scripting', '1', 1, 'publish', 'yesnoradio', 320)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'allow_raw_php_scripting', '0', 1, 'publish', 'yesnoradio', 340)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'show_article_category_count', '1', 2, 'category', 'yesnoradio', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'show_comment_count_in_feed', '1', 1, 'feeds', 'yesnoradio', 60)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'syndicate_body_or_excerpt', '1', 1, 'feeds', 'yesnoradio', 20)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'include_email_atom', '1', 1, 'feeds', 'yesnoradio', 80)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comment_means_site_updated', '1', 1, 'comments', 'yesnoradio', 160)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'never_display_email', '0', 1, 'comments', 'yesnoradio', 60)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_require_name', '1', 1, 'comments', 'yesnoradio', 20)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comments_require_email', '1', 1, 'comments', 'yesnoradio', 40)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'articles_use_excerpts', '1', 1, 'publish', 'yesnoradio', 40)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'allow_form_override', '1', 1, 'publish', 'yesnoradio', 60)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'attach_titles_to_permalinks', '1', 1, 'publish', 'yesnoradio', 80)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'permalink_title_format', '1', 1, 'publish', 'yesnoradio', 100)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'expire_logs_after', '7', 1, 'publish', 'text_input', 200)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'use_plugins', '1', 1, 'publish', 'yesnoradio', 260)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_1_set', 'custom1', 1, 'custom', 'text_input', 1)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_2_set', 'custom2', 1, 'custom', 'text_input', 2)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_3_set', '', 1, 'custom', 'text_input', 3)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_4_set', '', 1, 'custom', 'text_input', 4)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_5_set', '', 1, 'custom', 'text_input', 5)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_6_set', '', 1, 'custom', 'text_input', 6)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_7_set', '', 1, 'custom', 'text_input', 7)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_8_set', '', 1, 'custom', 'text_input', 8)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_9_set', '', 1, 'custom', 'text_input', 9)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'custom_10_set', '', 1, 'custom', 'text_input', 10)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'ping_textpattern_com', '1', 1, 'publish', 'yesnoradio', 180)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'use_dns', '1', 1, 'publish', 'yesnoradio', 220)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'admin_side_plugins', '1', 1, 'publish', 'yesnoradio', 280)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'comment_nofollow', '1', 1, 'comments', 'yesnoradio', 80)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'use_mail_on_feeds_id', '0', 1, 'feeds', 'yesnoradio', 100)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'max_url_len', '200', 1, 'publish', 'text_input', 240)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'spam_blacklists', '', 1, 'comments', 'text_input', 140)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'override_emailcharset', '0', 1, 'admin', 'yesnoradio', 120)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'production_status', 'testing', 0, 'publish', 'prod_levels', 210)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'dbupdatetime', '1122194504', 2, 'publish', 'text_input', 0)";
- // @todo: Change version
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'version', '0.9b', 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'enable_xmlrpc_server', 0, 1, 'admin', 'yesnoradio', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'author_list_pageby', 25, 2, 'publish', 'text_input', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'hide_login_in_email', '0', 1, 'admin', 'yesnoradio', 160)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'hash_alg', 'sha256', 1, 'admin', 'hash_picker', 160)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'admin_email', '', 1, 'admin', 'text_input', 160)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'plugin_dir_name', 'plugin', 2, 'admin', 'text_input', 160)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'adminstyle', 'reno.css', 1, 'admin', 'get_admin_styles', 161)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'is_xpat', '1', 2, 'publish', 'yesnoradio', 0)";
- $create_sql[] = "INSERT INTO `".PFX."txp_prefs` VALUES (1, 'lang_server', '', 1, 'admin', 'text_input', 0)";
- $create_sql[] = "CREATE TABLE `".PFX."txp_section` (
- `name` varchar(128) NOT NULL,
- `page` varchar(128) NOT NULL default '',
- `css` varchar(128) NOT NULL default '',
- `is_default` int(2) NOT NULL default '0',
- `in_rss` int(2) NOT NULL default '1',
- `on_frontpage` int(2) NOT NULL default '1',
- `searchable` int(2) NOT NULL default '1',
- `title` varchar(255) NOT NULL default '',
- PRIMARY KEY (`name`)
- ) $tabletype PACK_KEYS=1";
- $create_sql[] = "INSERT INTO `".PFX."txp_section` VALUES ('articles', 'archive', 'default', 1, 1, 1, 1, 'Articles')";
- $create_sql[] = "INSERT INTO `".PFX."txp_section` VALUES ('default', 'default', 'default', 0, 1, 1, 1, 'default')";
- $create_sql[] = "INSERT INTO `".PFX."txp_section` VALUES ('about', 'default', 'default', 0, 0, 0, 1, 'About')";
- $create_sql[] = "CREATE TABLE `".PFX."txp_users` (
- `user_id` int(4) NOT NULL auto_increment,
- `name` varchar(64) NOT NULL default '',
- `hashtype` varchar(32) NOT NULL default 'password',
- `pass` varchar(128) NOT NULL default '',
- `RealName` varchar(64) NOT NULL default '',
- `email` varchar(100) NOT NULL default '',
- `privs` tinyint(2) NOT NULL default '1',
- `last_access` datetime NOT NULL default '0000-00-00 00:00:00',
- `nonce` varchar(64) NOT NULL default '',
- PRIMARY KEY (`user_id`),
- UNIQUE KEY `name` (`name`)
- ) $tabletype PACK_KEYS=1 AUTO_INCREMENT=2 ";
- $create_sql[] = "CREATE TABLE `".PFX."admin_log` (
- `log_id` int(12) NOT NULL auto_increment,
- `time` datetime NOT NULL default '0000-00-00 00:00:00',
- `event` varchar(32) NOT NULL default '',
- `step` varchar(32) NOT NULL default '',
- `ip` int(12) NOT NULL default '0',
- `user` varchar(64) NOT NULL default '',
- `message` varchar(128) NOT NULL default '',
- PRIMARY KEY (`log_id`),
- KEY `time` (`time`)
- ) $tabletype AUTO_INCREMENT=1 ";
- $create_sql[] = "CREATE TABLE `".PFX."perm` (
- `id` int(10) NOT NULL auto_increment,
- `name` varchar(64) NOT NULL default '',
- `desc` varchar(64) NOT NULL default '',
- PRIMARY KEY (`id`),
- KEY `name` (`name`)
- ) $tabletype AUTO_INCREMENT=1 ";
- $create_sql[] = "CREATE TABLE `".PFX."group_perm` (
- `group_id` int(10) NOT NULL,
- `perm_id` int(10) NOT NULL,
- PRIMARY KEY (`group_id`, `perm_id`),
- KEY `perm` (`perm_id`)
- ) $tabletype ";
- $create_sql[] = "CREATE TABLE `".PFX."category_map` (
- `id` int(11) NOT NULL auto_increment,
- `category_id` int(11) NOT NULL,
- `type` varchar(25) NOT NULL,
- `type_id` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `category_id` (`category_id`,`type`,`type_id`)
- ) $tabletype ";
- $create_sql[] = "INSERT INTO `".PFX."category_map` VALUES ('1', '5', 'article', 1)";
- $create_sql[] = "INSERT INTO `".PFX."category_map` VALUES ('2', '6', 'article', 1)";
- $create_sql[] = "INSERT INTO `".PFX."category_map` VALUES ('3', '7', 'article', 1)";
- $perm = array(
- 'admin' => array('perm_admin','1,2,3,4,5,6'),
- 'admin.edit' => array('perm_admin_edit', '1'),
- 'admin.list' => array('perm_admin_list', '1,2,3'),
- 'article.delete.own' => array('perm_article_delete_own', '1,2,3,4'),
- 'article.delete' => array('perm_article_delete', '1,2'),
- 'article.edit' => array('perm_article_edit', '1,2,3'),
- 'article.edit.published' => array('perm_article_edit_published', '1,2,3'),
- 'article.edit.own' => array('perm_article_edit_own', '1,2,3,4,5,6'),
- 'article.edit.own.published' => array('perm_article_edit_own_published', '1,2,3,4'),
- 'article.publish' => array('perm_article_publish', '1,2,3,4'),
- 'article.php' => array('perm_article_php', '1,2'),
- 'article' => array('perm_article', '1,2,3,4,5,6'),
- 'list' => array('perm_list', '1,2,3,4,5,6'), //likely the same as for article.
- 'category' => array('perm_category', '1,2,3'),
- 'css' => array('perm_css', '…
Large files files are truncated, but you can click here to view the full file