#!/usr/bin/php Wikipedia | wp | http://en.wikipedia.org/wiki/$1 Issue | issue | issues/$1 '); $queries[] = create_set_variable('mediawiki_filter_namespace_template_node_type', 'wiki'); $array = array ('blog' => 'blog', 'wiki' => 'wiki', 'forum' => 0, 'image' => 0, 'issue' => 0); $queries[] = create_set_variable('mediawiki_filter_namespace_main_node_types', $array); // allow owner, member and admins to purge trash $queries[] = 'UPDATE permission SET perm = CONCAT(perm, ", purge trash") WHERE rid = 3 OR rid = 4 OR rid = 5'; // enable file extension svg $queries[] = create_set_variable('upload_extensions_default', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz svg'); $queries[] = create_set_variable('upload_extensions_2', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz svg'); $queries[] = create_set_variable('upload_extensions_3', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz svg'); $queries[] = create_set_variable('upload_extensions_4', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz svg'); $queries[] = create_set_variable('upload_extensions_5', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz svg'); // change weight of developer pages $queries[] = "UPDATE `system` SET `weight` = '1' WHERE `system`.`filename` = 'sites/all/modules/developer_pages/developer_pages.module' LIMIT 1"; $queries[] = 'REPLACE INTO `system` (`filename`, `name`, `type`, `description`, `status`, `throttle`, `bootstrap`, `schema_version`, `weight`) VALUES ' . ' (\'sites/all/modules/customerror/customerror.module\', \'customerror\', \'module\', \'Enables the creation of custom error pages for 404 and 403 errors.\', 1, 0, 0, 0, 0);'; $queries[] = create_set_variable('customerror_404_php',1); $queries[] = create_set_variable('customerror_403_php',1); $queries[] = create_set_variable('customerror_404_title',"404 Not Found Error: No content found at the requested URL"); $queries[] = create_set_variable('customerror_403_title',"403 Forbidden Error: Access to this page is denied"); $queries[] = create_set_variable('customerror_403', 'uid): ?>

Sorry name; ?>, you don\'t have permission to view the page you\'ve just tried to access.

If you feel that you have received this message in error, please contact us with specific details so that we may review your access to this web site.

This page may be available to clients and registered users only. Please select from one of the other options available to you below.

' ); $queries[] = create_set_variable('customerror_404', '

Sorry, no content was found at the requested path - it\'s possible that you\'ve requested this page in error.

Use the search form in the top right, or go to the home page.

' ); $queries[] = create_set_variable('site_404',"customerror/404"); $queries[] = create_set_variable('site_403',"customerror/403"); // installation and activation of mediawiki_filter module $queries[] = "REPLACE INTO `system` (`filename`, `name`, `type`, `description`, `status`, `throttle`, `bootstrap`, `schema_version`, `weight`) VALUES ('sites/all/modules/mediawiki_filter/mediawiki_filter.module', 'mediawiki_filter', 'module', 'Filter which uses Mediawiki parser for formatting', 1, 0, 0, 0, 0)"; // add the new mediawiki_filter as default for old projects // Current filter: 4 / New filter: 5 // Add new filter $queries[] = "REPLACE INTO `filter_formats` (`format`, `name`, `roles`, `cache`) VALUES (5, 'Mediawiki format', ',1,2,', 1)"; $queries[] = "REPLACE INTO `filters` (`format`, `module`, `delta`, `weight`) VALUES (5, 'mediawiki_filter', 0, 0), (5, 'geshifilter', 0, 5), (5, 'img_assist', 0, 10)"; // Rename old filter, allow for default users $queries[] = "UPDATE `filter_formats` SET `name`='Mediawiki (obsolete)', roles=',1,2,' WHERE `format`=4"; // Set new filter as default $queries[] = "UPDATE `variable` SET `value`='s:1:\"5\";' WHERE `name`='filter_default_format'"; // Activate section edit for new filter format $queries[] = "REPLACE INTO `variable` (`name`, `value`) VALUES ('section_edit_header_style_5', 's:9:\"mediawiki\";')"; // activation origo_xml_rpc_table $queries[] = "REPLACE INTO `system` (`filename`, `name`, `type`, `description`, `status`, `throttle`, `bootstrap`, `schema_version`, `weight`) VALUES ('sites/all/modules/origo_xmlrpc_table/origo_xmlrpc_table.module', 'origo_xmlrpc_table', 'module', 'Origo module to simplify tabulation of XML-RPC Calls.', 1, 0, 0, 0, 0)"; // publish new theme $queries[] = "REPLACE INTO `system` (`filename`, `name`, `type`, `description`, `status`, `throttle`, `bootstrap`, `schema_version`, `weight`) VALUES ('sites/all/themes/bluefish/page.tpl.php', 'bluefish', 'theme', 'themes/engines/phptemplate/phptemplate.engine', 1, 0, 0, -1, 0)"; $queries[] = "DELETE FROM `blocks` WHERE `theme`='bluefish'"; $queries[] = "REPLACE INTO `blocks` (`module`, `delta`, `theme`, `status`, `weight`, `region`, `custom`, `throttle`, `visibility`, `pages`, `title`) VALUES ('views', 'comments_recent', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('origo_home', '3', 'bluefish', 1, 2, 'left', 0, 0, 0, '', ''), ('origo_home', '2', 'bluefish', 1, 3, 'left', 0, 0, 0, '', ''), ('origo_home', '1', 'bluefish', 1, 1, 'left', 0, 0, 0, '', ''), ('origo_home', '0', 'bluefish', 1, 0, 'left', 0, 0, 0, '', ''), ('img_assist', '0', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('image', '1', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('image', '0', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('google_cse', '0', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('user', '3', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('user', '2', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('user', '1', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('user', '0', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('search', '0', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('node', '0', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('menu', '2', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('forum', '1', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('forum', '0', 'bluefish', 0, 4, '', 0, 0, 0, '', ''), ('comment', '0', 'bluefish', 0, 0, '', 0, 0, 0, '', ''), ('blog', '0', 'bluefish', 0, 0, '', 0, 0, 0, '', '')"; $queries[] = create_set_variable('theme_default', 'bluefish'); // fix drupal error about views module $queries[] = "UPDATE system SET schema_version = 16 WHERE name = 'views'"; // update drupal date format to iso date $queries[] = create_set_variable('date_default_timezone', '0'); $queries[] = create_set_variable('date_format_short', 'Y-m-d H:i'); $queries[] = create_set_variable('date_format_medium', 'D, Y-m-d H:i'); $queries[] = create_set_variable('date_format_long', 'l, j. F Y - G:i'); $queries[] = create_set_variable('date_first_day', '1'); */ // install openid module $queries[] = "CREATE TABLE IF NOT EXISTS openid_association ( idp_endpoint_uri VARCHAR(255) NOT NULL DEFAULT '', assoc_handle VARCHAR(255) NOT NULL DEFAULT '', assoc_type VARCHAR(20) NOT NULL DEFAULT '', session_type VARCHAR(20) NOT NULL DEFAULT '', mac_key VARCHAR(255) NOT NULL DEFAULT '', created INT(11) NOT NULL DEFAULT '0', expires_in INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (assoc_handle) ) /*!40100 DEFAULT CHARACTER SET utf8 */;"; /* // enable multiple modules $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/openid/openid.module', `name` = 'openid', `type` = 'module', `description` = 'Allows Drupal to act as an OpenID relying party.', `status` = 1"; $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/sioc/sioc.module', `name` = 'sioc', `type` = 'module', `description` = 'Allows export of SIOC meta-data from your site.', `status` = 1"; $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/foaf/foaf.module', `name` = 'foaf', `type` = 'module', `description` = 'Friends of a Friend export capability', `status` = 1"; $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/origo_openid/origo_openid.module', `name` = 'origo_openid', `type` = 'module', `description` = 'OpenID integration for Origo', `status` = 1"; // allow edit of wiki page titles $queries[] = create_set_variable('wikitools_options', array( "node creation" => "node creation", "node search" => "node search", "auto redirect" => "auto redirect", "unique titles" => "unique titles", "delete protection" => "delete protection", "underscore as space" => "underscore as space") ); // update wiki tools $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'wikitools_node_type'"; $queries[] = create_set_variable('wikitools_subpages_handling', 'url'); $queries[] = create_set_variable('wikitools_url_subpages', 'edit, delete, revisions, trash'); $queries[] = create_set_variable('wikitools_node_types', array("blog" => "blog", "wiki" => "wiki")); // views setup $queries[] = "UPDATE system SET status = 1 WHERE name = 'views' OR name = 'views_ui'"; $queries[] = "DROP TABLE IF EXISTS `view_argument` , `view_exposed_filter` , `view_filter` , `view_sort` , `view_tablefield` , `view_view`"; $queries[] = "CREATE TABLE IF NOT EXISTS `cache_views` ( `cid` varchar(255) NOT NULL default '', `data` longblob, `expire` int(11) NOT NULL default '0', `created` int(11) NOT NULL default '0', `headers` text, PRIMARY KEY (`cid`), KEY `expire` (`expire`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; $queries[] = "CREATE TABLE `view_argument` ( `vid` int(10) unsigned NOT NULL default '0', `type` varchar(255) default NULL, `argdefault` varchar(255) default NULL, `title` varchar(255) default NULL, `options` varchar(255) default NULL, `position` int(2) default NULL, `wildcard` varchar(32) default NULL, `wildcard_substitution` varchar(32) default NULL, KEY `vid` (`vid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8"; $queries[] = "INSERT INTO `view_argument` (`vid`, `type`, `argdefault`, `title`, `options`, `position`, `wildcard`, `wildcard_substitution`) VALUES (2, 'nodetype', '2', 'List of content (%1)', '', 0, '', ''), (3, 'node_feed', '2', '', '', 1, '', ''), (3, 'taxid', '1', 'Tag %1', '0', 0, '', '')"; $queries[] = "CREATE TABLE `view_exposed_filter` ( `vid` int(10) unsigned NOT NULL default '0', `field` varchar(255) default NULL, `label` varchar(255) default NULL, `optional` int(1) default NULL, `is_default` int(1) default NULL, `operator` int(1) default NULL, `single` int(1) default NULL, `position` int(2) default NULL, KEY `vid` (`vid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8"; $queries[] = "INSERT INTO `view_exposed_filter` (`vid`, `field`, `label`, `optional`, `is_default`, `operator`, `single`, `position`) VALUES (3, 'node.type', 'Type', 1, 0, 1, 1, 0), (2, 'node.type', 'Type', 1, 0, 1, 1, 0)"; $queries[] = "CREATE TABLE `view_filter` ( `vid` int(10) unsigned NOT NULL default '0', `tablename` varchar(255) default NULL, `field` varchar(255) default NULL, `value` longtext, `operator` varchar(20) default NULL, `options` varchar(255) default NULL, `position` int(2) default NULL, KEY `vid` (`vid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8"; $queries[] = "INSERT INTO `view_filter` (`vid`, `tablename`, `field`, `value`, `operator`, `options`, `position`) VALUES (3, '', 'node.type', 'blog,forum,image,issue,template,wiki', 'OR', '', 1), (2, '', 'node.status', '1', '=', '', 1), (3, '', 'node.status', '1', '=', '', 0), (2, '', 'node.type', 'blog,forum,image,issue,template,wiki', 'OR', '', 0)"; $queries[] = "CREATE TABLE `view_sort` ( `vid` int(10) unsigned NOT NULL default '0', `position` int(2) default NULL, `field` varchar(255) default NULL, `sortorder` varchar(5) default NULL, `options` varchar(255) default NULL, `tablename` varchar(255) default NULL, KEY `vid` (`vid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8"; $queries[] = "INSERT INTO `view_sort` (`vid`, `position`, `field`, `sortorder`, `options`, `tablename`) VALUES (3, 1, 'node.created', 'DESC', 'normal', NULL), (3, 0, 'node.sticky', 'DESC', '', NULL);"; $queries[] = "CREATE TABLE `view_tablefield` ( `vid` int(10) unsigned NOT NULL default '0', `tablename` varchar(255) default NULL, `field` varchar(255) default NULL, `label` varchar(255) default NULL, `handler` varchar(255) default NULL, `sortable` int(1) default NULL, `defaultsort` varchar(5) default NULL, `options` varchar(255) default NULL, `position` int(2) default NULL, KEY `vid` (`vid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8"; $queries[] = "INSERT INTO `view_tablefield` (`vid`, `tablename`, `field`, `label`, `handler`, `sortable`, `defaultsort`, `options`, `position`) VALUES (2, 'term_node', 'name', 'Tags', '', 0, '', 'link', 3), (2, 'node', 'changed', 'Updated', 'views_handler_field_since', 1, '0', '', 2), (3, 'term_node', 'name', 'Tags', '', 0, '', 'link', 3), (2, 'node', 'title', 'Title', 'views_handler_field_nodelink', 1, 'ASC', 'link', 0), (3, 'node', 'changed', 'Updated', 'views_handler_field_since', 1, '0', '', 2), (3, 'node', 'type', 'Type', '', 1, '0', '', 1), (2, 'node', 'type', 'Type', '', 1, '0', '', 1), (3, 'node', 'title', 'Title', 'views_handler_field_nodelink', 1, 'ASC', 'link', 0)"; $queries[] = "CREATE TABLE `view_view` ( `vid` int(10) unsigned NOT NULL default '0', `name` varchar(32) NOT NULL, `description` varchar(255) default NULL, `access` varchar(255) default NULL, `page` int(1) default NULL, `page_title` varchar(255) default NULL, `page_header` longtext, `page_header_format` int(4) NOT NULL, `page_empty` longtext, `page_empty_format` int(4) NOT NULL, `page_footer` longtext, `page_footer_format` int(4) NOT NULL, `page_type` varchar(20) default NULL, `use_pager` int(1) default NULL, `nodes_per_page` int(5) default NULL, `url` varchar(255) default NULL, `menu` int(1) default NULL, `menu_tab` int(1) default NULL, `menu_tab_default` int(1) default NULL, `menu_tab_weight` int(4) default NULL, `menu_title` varchar(255) default NULL, `block` int(1) default NULL, `block_title` varchar(255) default NULL, `block_use_page_header` int(1) default NULL, `block_header` longtext, `block_header_format` int(4) NOT NULL, `block_use_page_footer` int(1) default NULL, `block_footer` longtext, `block_footer_format` int(4) NOT NULL, `block_use_page_empty` int(1) default NULL, `block_empty` longtext, `block_empty_format` int(4) NOT NULL, `block_type` varchar(20) default NULL, `nodes_per_block` int(5) default NULL, `block_more` int(1) default NULL, `breadcrumb_no_home` int(1) default NULL, `changed` int(11) default NULL, `view_args_php` longtext, `is_cacheable` int(1) default NULL, `menu_tab_default_parent_type` varchar(10) default NULL, `menu_parent_title` varchar(255) default NULL, `menu_parent_tab_weight` int(4) default NULL, PRIMARY KEY (`vid`), UNIQUE KEY `name` (`name`), KEY `name_2` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8"; $queries[] = "INSERT INTO `view_view` (`vid`, `name`, `description`, `access`, `page`, `page_title`, `page_header`, `page_header_format`, `page_empty`, `page_empty_format`, `page_footer`, `page_footer_format`, `page_type`, `use_pager`, `nodes_per_page`, `url`, `menu`, `menu_tab`, `menu_tab_default`, `menu_tab_weight`, `menu_title`, `block`, `block_title`, `block_use_page_header`, `block_header`, `block_header_format`, `block_use_page_footer`, `block_footer`, `block_footer_format`, `block_use_page_empty`, `block_empty`, `block_empty_format`, `block_type`, `nodes_per_block`, `block_more`, `breadcrumb_no_home`, `changed`, `view_args_php`, `is_cacheable`, `menu_tab_default_parent_type`, `menu_parent_title`, `menu_parent_tab_weight`) VALUES (2, 'content', 'List of content', '1, 2', 1, 'List of content', '', 5, '', 5, '', 5, 'table', 1, 50, 'content', 0, 0, 0, 0, '', 0, '', 0, '', 5, 0, '', 5, 0, '', 5, 'node', 0, 0, 0, 1205927843, '', 0, 'tab', '', 0), (3, 'taxonomy_term', 'The taxonomy view with a depth of 0.', '1, 2', 1, 'Taxonomy', '', 1, '', 5, '', 5, 'table', 1, 50, 'taxonomy/term', 0, 0, 0, 0, '', 0, '', 0, '', 5, 0, '', 5, 0, '', 5, 'node', 0, 0, 0, 1204729736, '', 0, 'tab', '', 0)"; // setup trash for wiki and blog $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/trash/trash.module', `name` = 'trash', `type` = 'module', `description` = 'This is a module, which acts like a Trash', `status` = 1"; // Owner $queries[] = "UPDATE `permission` SET `perm` = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create wiki content, edit own wiki content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo project settings, origo create project, origo request application key, search Google CSE, origo create release, create forum topics, edit own forum topics, administer forums, origo delete release, view trash, restore trash' WHERE `rid` = 3"; // Member $queries[] = "UPDATE `permission` SET `perm` = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create wiki content, edit own wiki content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo create project, origo request application key, search Google CSE, create forum topics, edit own forum topics, view trash, restore trash' WHERE `rid` = 4"; // Origo Admin $queries[] = "UPDATE `permission` SET `perm` = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create wiki content, edit own wiki content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo project settings, origo admin access, origo create project, origo request application key, search Google CSE, origo create release, create forum topics, edit own forum topics, administer forums, origo delete release, view trash, restore trash' WHERE `rid` = 5"; $queries[] = create_set_variable('trash_settings_blog', array('enabled', 'move_to_trash_tab', 'remove_delete_button')); $queries[] = create_set_variable('trash_settings_wiki', array('enabled', 'move_to_trash_tab', 'remove_delete_button')); $queries[] = create_set_variable('password_strength_min_level', '2'); // enable file extension tar.gz (by simply allowing ending .tgz and .tbz) $queries[] = create_set_variable('upload_extensions_default', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz'); $queries[] = create_set_variable('upload_extensions_2', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz'); $queries[] = create_set_variable('upload_extensions_3', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz'); $queries[] = create_set_variable('upload_extensions_4', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz'); $queries[] = create_set_variable('upload_extensions_5', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz tgz tbz'); // enable formatting_service module $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/formatting_service/formatting_service.module', `name` = 'formatting_service', `type` = 'module', `description` = 'Provides an XML-RPC service to apply input formats to supplied text', `status` = 1, `throttle` = 0, `bootstrap` = 0, `schema_version` = 0, `weight` = 0"; // publish all nodes $queries[] = "UPDATE `node` SET `status`=1, `moderate`=0, `sticky`=0"; // disable teaser $queries[] = create_set_variable('teaser_length', "0"); // remove node administer permission from everyone $queries[] = "UPDATE `permission` SET `perm` = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create wiki content, edit own wiki content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo project settings, origo create project, origo request application key, search Google CSE, origo create release, create forum topics, edit own forum topics, administer forums, origo delete release' WHERE `rid` = 3"; $queries[] = "UPDATE `permission` SET `perm` = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create wiki content, edit own wiki content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo project settings, origo create project, origo request application key, search Google CSE, origo create release, create forum topics, edit own forum topics, administer forums, origo delete release, origo admin access' WHERE `rid` = 5"; // password-strength MODULE UPGRADE // set new variables $queries[] = create_set_variable('password_strength_verify_on_server', 1); $queries[] = create_set_variable('password_strength_min_level', "3"); $queries[] = create_set_variable('password_strength_min_length', "6"); $queries[] = create_set_variable('password_strength_not_username', 1); // enable module $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/password_strength/password_strength.module', `name` = 'password_strength', `type` = 'module', `description` = 'Provides password strength checking', `status` = 1, `throttle` = 0, `bootstrap` = 0, `schema_version` = 0, `weight` = 0"; $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/captcha/image_captcha/image_captcha.module', `name` = 'image_captcha', `type` = 'module', `description` = 'Provides an image based CAPTCHA.', `status` = 1, `throttle` = 0, `bootstrap` = 0, `schema_version` = 0, `weight` = 0"; // CAPTCHA MODULE UPGRADE // activate modules $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/captcha/image_captcha/image_captcha.module', `name` = 'image_captcha', `type` = 'module', `description` = 'Provides an image based CAPTCHA.', `status` = 1, `throttle` = 0, `bootstrap` = 0, `schema_version` = 0, `weight` = 0"; $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/captcha/text_captcha/text_captcha.module', `name` = 'text_captcha', `type` = 'module', `description` = 'Provides a simple text based CAPTCHA.', `status` = 0, `throttle` = 0, `bootstrap` = 0, `schema_version` = 0, `weight` = 0"; $queries[] = "REPLACE `system` SET `filename` = 'sites/all/modules/captcha/captcha.module', `name` = 'captcha', `type` = 'module', `description` = 'Base CAPTCHA module for adding challenges to arbitrary forms.', `status` = 1, `throttle` = 0, `bootstrap` = 0, `schema_version` = 2, `weight` = 0"; // create new captcha module table $queries[] = "CREATE TABLE IF NOT EXISTS captcha_points ( form_id varchar(128) NOT NULL, module varchar(64) default NULL, type varchar(64) default NULL, PRIMARY KEY (form_id) )"; // fill it $queries[] = "REPLACE INTO captcha_points (form_id, module, type) VALUES ('comment_form', NULL, NULL)"; $queries[] = "REPLACE INTO captcha_points (form_id, module, type) VALUES ('contact_mail_user', NULL, NULL)"; $queries[] = "REPLACE INTO captcha_points (form_id, module, type) VALUES ('contact_mail_page', NULL, NULL)"; $queries[] = "REPLACE INTO captcha_points (form_id, module, type) VALUES ('user_register', 'image_captcha', 'Image')"; $queries[] = "REPLACE INTO captcha_points (form_id, module, type) VALUES ('user_pass', 'image_captcha', 'Image')"; $queries[] = "REPLACE INTO captcha_points (form_id, module, type) VALUES ('user_login', NULL, NULL)"; $queries[] = "REPLACE INTO captcha_points (form_id, module, type) VALUES ('user_login_block', NULL, NULL)"; // set new variables $queries[] = create_set_variable('captcha_administration_mode', 0); $queries[] = create_set_variable('captcha_description', "This question is for testing whether you are a human visitor and to prevent automated spam submissions."); $queries[] = create_set_variable('captcha_persistence', "1"); $queries[] = create_set_variable('captcha_log_wrong_responses', 0); $queries[] = create_set_variable('captcha_wrong_response_counter', 0); $queries[] = create_set_variable('image_captcha_image_allowed_chars', "aAbBCdEeFfGHhijKLMmNPQRrSTtWXYZ23456789%$#!@?*"); $queries[] = create_set_variable('image_captcha_code_length', "5"); $queries[] = create_set_variable('image_captcha_character_spacing', "1.2"); $queries[] = create_set_variable('image_captcha_distortion_amplitude', "6"); $queries[] = create_set_variable('image_captcha_bilinair_interpolation', 0); $queries[] = create_set_variable('image_captcha_double_vision', 0); $queries[] = create_set_variable('image_captcha_dot_noise', 0); $queries[] = create_set_variable('image_captcha_line_noise', 1); $queries[] = create_set_variable('image_captcha_noise_level', "2"); $queries[] = create_set_variable('image_captcha_font_size', "30"); $queries[] = create_set_variable('image_captcha_font', "sites/all/modules/captcha/image_captcha/fonts/DejaVuSerif-Bold.ttf"); // remove old variables $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'captcha_points'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_register_anonymous_user_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_pass_anonymous_user_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_register_authenticated_user_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_pass_authenticated_user_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_register_developer_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_pass_developer_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_register_owner_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_pass_owner_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_register_origo_admin_captcha'"; $queries[] = "DELETE FROM `variable` WHERE `variable`.`name` = 'user_pass_origo_admin_captcha'"; */ /* // enable img_assist (activates filter for the generated img_assist tag) $queries[] = "INSERT INTO filters (format, module, delta, weight) VALUES (4, 'img_assist', 0, 10)"; $queries[] = "DELETE FROM cache_filter WHERE cid LIKE '4:%'"; // enable file extension tar.gz (by simply allowing ending .gz) $queries[] = create_set_variable('upload_extensions_default', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz'); $queries[] = create_set_variable('upload_extensions_2', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz'); $queries[] = create_set_variable('upload_extensions_3', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz'); $queries[] = create_set_variable('upload_extensions_4', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz'); $queries[] = create_set_variable('upload_extensions_5', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip gz'); */ /* // Configure wiki pages to use section edit $queries[] = "DELETE FROM `system` WHERE name='section_edit'"; $queries[] = "INSERT INTO `system` (filename, name, type, description, status, throttle, bootstrap, schema_version, weight) VALUES ('sites/all/modules/section_edit/section_edit.module', 'section_edit', 'module', 'Allow sections (identified by Mediawiki headers) to be edited', 1, 0, 0, 0, 0)"; $queries[] = create_set_variable('upload_wiki', 1); $queries[] = create_set_variable('section_edit_wiki', 1); $queries[] = create_set_variable('section_edit_header_style_4', 'mediawiki'); */ // Fix for issue 191 // $sql = "UPDATE `permission` SET perm = CONCAT(perm, ', upload files') WHERE rid = 2"; // Fix for issue 222 // set_variable("upload_extensions_default", "jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip tar.gz"); // set_variable("upload_extensions_2", "jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip tar.gz"); // set_variable("upload_extensions_3", "jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip tar.gz"); // set_variable("upload_extensions_4", "jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip tar.gz"); // set_variable("upload_extensions_5", "jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp jnlp zip tar.gz"); //set_variable("upload_uploadsize_default", "10"); //set_variable("upload_uploadsize_2", "10"); //set_variable("upload_uploadsize_3", "10"); //set_variable("upload_uploadsize_4", "10"); //set_variable("upload_uploadsize_5", "10"); //set_variable("upload_usersize_default", "500"); //set_variable("upload_usersize_2", "500"); //set_variable("upload_usersize_3", "500"); //set_variable("upload_usersize_4", "500"); //set_variable("upload_usersize_5", "500"); //set_variable("roles", array(2 => "authenticated user", 3 => "owner", 4 => "developer", 5 => "origo admin")); // $sql = "UPDATE `node` SET `status`=1, `moderate`=0, `sticky`=0"; // $sql = "INSERT INTO `system` VALUES ('sites/all/modules/section_edit/section_edit.module', 'section_edit', 'module', 'Allow sections (identified by Mediawiki headers) to be edited', 1, 0, 0, 0, 0)"; /**********************************************/ /* queries from old script */ /**********************************************/ // //set_variable('upload_extensions_default', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp'); // //set_variable('upload_uploadsize_default', '500'); // //set_variable('upload_usersize_default', '5000'); // // //mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, access private developer pages' WHERE rid = 3"); // //mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, access private developer pages' WHERE rid = 4"); // // //mysql_query(" // // CREATE TABLE developer_pages ( // // nid int(10) unsigned NOT NULL default '0' PRIMARY KEY, // // private int // // ) /*!40100 DEFAULT CHARACTER SET utf8 */; // // "); // // //mysql_query("INSERT INTO system VALUES ('sites/all/modules/developer_pages/developer_pages.module', 'developer_pages', 'module', 'Private pages only for Project Members', 1, 0, 0, 0, 0)"); // // //mysql_query("DELETE FROM blocks WHERE module='search';"); // //mysql_query("INSERT INTO `blocks` (`module`, `delta`, `theme`, `status`, `weight`, `region`, `custom`, `throttle`, `visibility`, `pages`, `title`) VALUES ('search', '0', 'simple', 1, -5, 'left', 0, 0, 0, '', '');"); // // // // /*mysql_query("INSERT INTO `system` VALUES ('sites/all/modules/captcha/captcha.module', 'captcha', 'module', 'Implements a captcha to registration, comment, contact and node entry forms.', 1, 0, 0, 0, 0);"); // mysql_query("INSERT INTO `system` VALUES ('sites/all/modules/form_store/form_collect.module', 'form_collect', 'module', 'Collects form information while browsing the site.', 0, 0, 0, -1, 0);"); // mysql_query("INSERT INTO `system` VALUES ('sites/all/modules/form_store/form_store.module', 'form_store', 'module', 'Provides form information to other modules.', 1, 0, 0, 2, 0);"); // // // mysql_query("INSERT INTO `variable` VALUES ('captcha_points', 's:104:\"a:2:{s:13:\"user_register\";s:23:\"register a user account\";s:9:\"user_pass\";s:22:\"request a new password\";}\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_register_anonymous_user_captcha', 's:12:\"captcha/Math\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_pass_anonymous_user_captcha', 's:12:\"captcha/Math\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_register_authenticated_user_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_pass_authenticated_user_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_register_developer_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_pass_developer_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_register_owner_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_pass_owner_captcha', 's:4:\"none\";');"); // // // mysql_query("CREATE TABLE {form_store_forms} ( // fid int(10) auto_increment, // form_id varchar(255) NOT NULL default '', // description varchar(255), // preview TEXT, // PRIMARY KEY (fid), // KEY (form_id)*/ // // ) /*!40100 DEFAULT CHARACTER SET utf8 */;"); // // /* // //mysql_query("INSERT INTO `form_store_forms` VALUES (1, 'comment_form', 'post a comment', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (1, 'user_register', 'register a user account', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (2, 'user_pass', 'request a new password', '');"); // //mysql_query("INSERT INTO `form_store_forms` VALUES (4, 'page_node_form', 'create a page', '');"); // //mysql_query("INSERT INTO `form_store_forms` VALUES (5, 'story_node_form', 'create a story', '');"); // */ // // /* mysql_query("CREATE TABLE `form_store_forms` ( // `fid` int(10) NOT NULL auto_increment, // `form_id` varchar(255) NOT NULL default '', // `description` varchar(255) default NULL, // `preview` text, // PRIMARY KEY (`fid`), // KEY `form_id` (`form_id`) //) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;");*/ // // /* // // mysql_query("TRUNCATE `form_store_forms`;"); // mysql_query("INSERT INTO `form_store_forms` VALUES (1, 'comment_form', 'post a comment', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (2, 'user_register', 'register a user account', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (3, 'user_pass', 'request a new password', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (4, 'page_node_form', 'create a page', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (5, 'story_node_form', 'create a story', '');"); // // mysql_query("TRUNCATE `cache`;"); // mysql_query("TRUNCATE `cache_filter`;"); // mysql_query("TRUNCATE `cache_menu`;"); // mysql_query("TRUNCATE `cache_page`;"); */ // // // //set_variable('origo_project_name', $project['name']); // //set_variable('comment_preview', '0'); // // // // /*mysql_query("INSERT INTO `node_type` VALUES ('issue', 'Issue', 'issue_tracker', 'An issue or bug report.', '', 1, 'Title', 1, 'Description', 0, 0, 0, 1, 'issue');"); // // mysql_query("UPDATE permission SET perm = 'access comments, post comments, post comments without approval, access site-wide contact form, view original images, create issue, access content, search content, use advanced search, view uploaded files, access user profiles' WHERE rid = 2"); // mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles' WHERE rid = 3"); // mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles' WHERE rid = 4"); // mysql_query("INSERT INTO `sequences` VALUES ('vocabulary_vid', 2);"); // mysql_query("UPDATE sequences SET id = 2 WHERE name = 'vocabulary_vid'"); // mysql_query("INSERT INTO `system` VALUES ('sites/all/modules/issue_tracker/issue_tracker.module', 'issue_tracker', 'module', 'Manage issues, bugs, Todos.', 1, 0, 0, 0, 0);"); // mysql_query("INSERT INTO `vocabulary` VALUES (2, 'Issue Tags', '', '', 0, 0, 0, 0, 1, 'taxonomy', 0);"); // mysql_query("INSERT INTO `vocabulary_node_types` VALUES (2, 'issue');");*/ // // // //symlink('/usr/local/lib/origo/origo-commit.py', '/data/svn/' . $project['name'] . '/hooks/post-commit'); // //symlink($project['name'], '/data/www/origo/drupal/sites/' . $project['name'] . '.origo.ethz.ch'); // // //set_variable('comment_preview', '0'); // //mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo project settings' WHERE rid = 3"); // //mysql_query("INSERT INTO `permission` VALUES (5, 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo project settings, origo admin access', 0);"); // //mysql_query("INSERT INTO `role` VALUES (5, 'origo admin');"); // // // // Update theme // /*set_variable('theme_default', 'origo_simple'); // // $res = mysql_query("SELECT * FROM `blocks` WHERE `theme`='origo_simple'"); // if (mysql_num_rows($res) == 0) { // mysql_query("UPDATE `blocks` SET `theme`='origo_simple' WHERE `theme`='simple'"); // } // // $res = mysql_query("SELECT * FROM `system` WHERE `filename`='sites/all/themes/origo_simple/page.tpl.php'"); // if (mysql_num_rows($res) == 0) { // mysql_query("UPDATE `system` SET `filename`='sites/all/themes/origo_simple/page.tpl.php' WHERE `filename`='sites/all/themes/simple/page.tpl.php'"); // }*/ // // //mysql_query("UPDATE `system` SET `name`='origo_simple' WHERE `filename`='sites/all/themes/origo_simple/page.tpl.php'"); // // //mysql_query("DELETE FROM `blocks` WHERE `module`='search' AND `theme`='origo_simple'"); // // mysql_query("TRUNCATE `cache`;"); // mysql_query("TRUNCATE `cache_filter`;"); // mysql_query("TRUNCATE `cache_menu`;"); // mysql_query("TRUNCATE `cache_page`;"); // ?>