/[drupal]/contributions/modules/seo_checklist/seochecklist.install
ViewVC logotype

Diff of /contributions/modules/seo_checklist/seochecklist.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.8, Wed Oct 28 16:06:55 2009 UTC revision 1.1.2.9, Wed Oct 28 23:42:13 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: seochecklist.install,v 1.1.2.7 2009/10/22 23:58:31 davereid Exp $  // $Id: seochecklist.install,v 1.1.2.8 2009/10/28 16:06:55 davereid Exp $
3    
4  /**  /**
5   * @file   * @file
6   * Install, update and uninstall functions for the seochecklist module.   * Install, update and uninstall functions for the seochecklist module.
7   */   */
8    
9  /**  /**
10   * Implementation of hook_install().   * Implementation of hook_install().
11   */   */
12  function seochecklist_install() {  function seochecklist_install() {
13    switch ($GLOBALS['db_type']) {    switch ($GLOBALS['db_type']) {
14      case 'mysql':      case 'mysql':
15      case 'mysqli':      case 'mysqli':
16        db_query("CREATE TABLE {seo_group} (        db_query("CREATE TABLE {seo_group} (
17          id tinyint NOT NULL auto_increment,          id tinyint NOT NULL auto_increment,
18          name varchar(255) NOT NULL default '',          name varchar(255) NOT NULL default '',
19          description varchar(255) NOT NULL default '',          description varchar(255) NOT NULL default '',
20          PRIMARY KEY (id)          PRIMARY KEY (id)
21        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
22        db_query("CREATE TABLE {seo_checklist} (        db_query("CREATE TABLE {seo_checklist} (
23          id tinyint NOT NULL auto_increment,          id tinyint NOT NULL auto_increment,
24          group_id tinyint NOT NULL default '0',          group_id tinyint NOT NULL default '0',
25          name varchar(255) NOT NULL default '',          name varchar(255) NOT NULL default '',
26          module varchar(255) NOT NULL default '',          module varchar(255) NOT NULL default '',
27          download varchar(255) NOT NULL default '',          download varchar(255) NOT NULL default '',
28          enable varchar(255) NOT NULL default '',          enable varchar(255) NOT NULL default '',
29          configure varchar(255) NOT NULL default '',          configure varchar(255) NOT NULL default '',
30          order_id tinyint NOT NULL default '0',          order_id tinyint NOT NULL default '0',
31          completed int unsigned NOT NULL default '0',          completed int unsigned NOT NULL default '0',
32          uid int unsigned NOT NULL default '0',          uid int unsigned NOT NULL default '0',
33          PRIMARY KEY (id)          PRIMARY KEY (id)
34        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
35        break;        break;
36      case 'pgsql':      case 'pgsql':
37        db_query("CREATE TABLE {seo_group} (        db_query("CREATE TABLE {seo_group} (
38          id serial CHECK (id >= 0),          id serial CHECK (id >= 0),
39          name varchar(255) NOT NULL default '',          name varchar(255) NOT NULL default '',
40          description varchar(255) NOT NULL default '',          description varchar(255) NOT NULL default '',
41          PRIMARY KEY (id)          PRIMARY KEY (id)
42        )");        )");
43        db_query("CREATE TABLE {seo_checklist} (        db_query("CREATE TABLE {seo_checklist} (
44          id serial CHECK (id >= 0),          id serial CHECK (id >= 0),
45          group_id smallint NOT NULL default '0',          group_id smallint NOT NULL default '0',
46          name varchar(255) NOT NULL default '',          name varchar(255) NOT NULL default '',
47          module varchar(255) NOT NULL default '',          module varchar(255) NOT NULL default '',
48          download varchar(255) NOT NULL default '',          download varchar(255) NOT NULL default '',
49          enable varchar(255) NOT NULL default '',          enable varchar(255) NOT NULL default '',
50          configure varchar(255) NOT NULL default '',          configure varchar(255) NOT NULL default '',
51          order_id smallint NOT NULL default '0',          order_id smallint NOT NULL default '0',
52          completed int_unsigned NOT NULL default '0',          completed int_unsigned NOT NULL default '0',
53          uid int_unsigned NOT NULL default '0',          uid int_unsigned NOT NULL default '0',
54          PRIMARY KEY (id)          PRIMARY KEY (id)
55        )");        )");
56        break;        break;
57    }    }
58    
59    $task_fields = "(id, group_id, name, module, download, enable, configure, order_id)";    $task_fields = "(id, group_id, name, module, download, enable, configure, order_id)";
60    
61    // Page title tasks    // Page title tasks
62    db_query("INSERT INTO {seo_group} VALUES (1, 'Page Titles', 'The single most important thing you can do for on-site SEO.')");    db_query("INSERT INTO {seo_group} VALUES (1, 'Page Titles', 'The single most important thing you can do for on-site SEO.')");
63    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (39, 1, 'Token (required for other modules to function)', 'token', 'http://drupal.org/project/token', 'admin/build/modules', '', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (39, 1, 'Token (required for other modules to function)', 'token', 'http://drupal.org/project/token', 'admin/build/modules', '', 1)");
64    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (1, 1, 'Page Title Module', 'page_title', 'http://drupal.org/project/page_title', 'admin/build/modules', 'admin/content/page_title', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (1, 1, 'Page Title Module', 'page_title', 'http://drupal.org/project/page_title', 'admin/build/modules', 'admin/content/page_title', 2)");
65    
66    // URL tasks    // URL tasks
67    db_query("INSERT INTO {seo_group} VALUES (2, 'URL paths', 'The second most important thing you can do.')");    db_query("INSERT INTO {seo_group} VALUES (2, 'URL paths', 'The second most important thing you can do.')");
68    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (2, 2, 'Clean URLs - Activate (Usually automatic. Please double-check!)', '', '', '', 'admin/settings/clean-urls', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (2, 2, 'Clean URLs - Activate (Usually automatic. Please double-check!)', '', '', '', 'admin/settings/clean-urls', 1)");
69    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (3, 2, 'Find URL Alias Module', 'find_path', 'http://drupal.org/project/find_path', 'admin/build/modules', '', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (3, 2, 'Find URL Alias Module', 'find_path', 'http://drupal.org/project/find_path', 'admin/build/modules', '', 2)");
70    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (6, 2, 'Global Redirect Module', 'globalredirect', 'http://drupal.org/project/globalredirect', 'admin/build/modules', '', 3)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (6, 2, 'Global Redirect Module', 'globalredirect', 'http://drupal.org/project/globalredirect', 'admin/build/modules', '', 3)");
71    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (4, 2, 'Simple: URLify Module', 'urlify', 'http://drupal.org/project/urlify', 'admin/build/modules', 'settings', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (4, 2, 'Simple: URLify Module', 'urlify', 'http://drupal.org/project/urlify', 'admin/build/modules', 'settings', 1)");
72    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (5, 2, 'Powerful: Pathauto Module', 'pathauto', 'http://drupal.org/project/pathauto', 'admin/build/modules', 'admin/settings/pathauto', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (5, 2, 'Powerful: Pathauto Module', 'pathauto', 'http://drupal.org/project/pathauto', 'admin/build/modules', 'admin/settings/pathauto', 2)");
73    
74    // Search engine account tasks    // Search engine account tasks
75    db_query("INSERT INTO {seo_group} VALUES (3, 'Create Search Engine Accounts', 'Set yourself up with the search engines.')");    db_query("INSERT INTO {seo_group} VALUES (3, 'Create Search Engine Accounts', 'Set yourself up with the search engines.')");
76    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (7, 3, 'Get a Google Account - You will need this for several of the steps that follow - <a href=\"https://www.google.com/accounts/NewAccount\">https://www.google.com/accounts/NewAccount</a>', '', '', '', '', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (7, 3, 'Get a Google Account - You will need this for several of the steps that follow - <a href=\"https://www.google.com/accounts/NewAccount\">https://www.google.com/accounts/NewAccount</a>', '', '', '', '', 1)");
77    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (8, 3, 'Get a Yahoo Account - You will need this for steps that follow - <a href=\"http://www.yahoo.com/r/m7\">http://www.yahoo.com/r/m7</a>', '', '', '', '', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (8, 3, 'Get a Yahoo Account - You will need this for steps that follow - <a href=\"http://www.yahoo.com/r/m7\">http://www.yahoo.com/r/m7</a>', '', '', '', '', 2)");
78    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (44, 3, 'Get a Windows Live ID - You will need this for steps that follow - <a href=\"https://signup.live.com/\">https://signup.live.com/</a>', '', '', '', '', 3)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (44, 3, 'Get a Windows Live ID - You will need this for steps that follow - <a href=\"https://signup.live.com/\">https://signup.live.com/</a>', '', '', '', '', 3)");
79    
80    // Visitor tracking tasks    // Visitor tracking tasks
81    db_query("INSERT INTO {seo_group} VALUES (4, 'Track your visitors', 'Know where your visitors are coming from and what they do while visiting your site.')");    db_query("INSERT INTO {seo_group} VALUES (4, 'Track your visitors', 'Know where your visitors are coming from and what they do while visiting your site.')");
82    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (9, 4, 'Google Analytics Module', 'googleanalytics', 'http://drupal.org/project/google_analytics', 'admin/build/modules', 'admin/settings/googleanalytics', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (9, 4, 'Google Analytics Module', 'googleanalytics', 'http://drupal.org/project/google_analytics', 'admin/build/modules', 'admin/settings/googleanalytics', 1)");
83    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (10, 4, 'Sign in to your Google Analytics Account - <a href=\"http://www.google.com/analytics\">http://www.google.com/analytics</a>', '', '', '', '', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (10, 4, 'Sign in to your Google Analytics Account - <a href=\"http://www.google.com/analytics\">http://www.google.com/analytics</a>', '', '', '', '', 2)");
84    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (11, 4, 'Create an Analytics for your website', '', '', '', '', 3)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (11, 4, 'Create an Analytics for your website', '', '', '', '', 3)");
85    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (12, 4, 'Paste Google Analytics code into Google Analytics Module', '', '', '', '', 4)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (12, 4, 'Paste Google Analytics code into Google Analytics Module', '', '', '', '', 4)");
86    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (13, 4, 'Authenticate your site with Google Analytics', '', '', '', '', 5)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (13, 4, 'Authenticate your site with Google Analytics', '', '', '', '', 5)");
87    
88    // Page content tasks    // Page content tasks
89    db_query("INSERT INTO {seo_group} VALUES (5, 'Page content', 'Take control of your page content.')");    db_query("INSERT INTO {seo_group} VALUES (5, 'Page content', 'Take control of your page content.')");
90    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (14, 5, 'Excerpt Module', 'excerpt', 'http://drupal.org/project/excerpt', 'admin/build/modules', '', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (14, 5, 'Excerpt Module', 'excerpt', 'http://drupal.org/project/excerpt', 'admin/build/modules', '', 1)");
91    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (15, 5, 'Meta Tags Module (AKA Nodewords)', 'nodewords', 'http://drupal.org/project/nodewords', 'admin/build/modules', 'admin/content/nodewords', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (15, 5, 'Meta Tags Module (AKA Nodewords)', 'nodewords', 'http://drupal.org/project/nodewords', 'admin/build/modules', 'admin/content/nodewords', 2)");
92    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (16, 5, 'Scheduler Module', 'scheduler', 'http://drupal.org/project/scheduler', 'admin/build/modules', '', 3)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (16, 5, 'Scheduler Module', 'scheduler', 'http://drupal.org/project/scheduler', 'admin/build/modules', '', 3)");
93    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (17, 5, 'Safe HTML Module', 'safehtml', 'http://drupal.org/project/safehtml', 'admin/build/modules', 'admin/settings/filters/1', 4)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (17, 5, 'Safe HTML Module', 'safehtml', 'http://drupal.org/project/safehtml', 'admin/build/modules', 'admin/settings/filters/1', 4)");
94    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (18, 5, 'Search 404 Module', 'search404', 'http://drupal.org/project/search404', 'admin/build/modules', 'admin/settings/search404', 5)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (18, 5, 'Search 404 Module', 'search404', 'http://drupal.org/project/search404', 'admin/build/modules', 'admin/settings/search404', 5)");
95    
96    // Source code tasks    // Source code tasks
97    db_query("INSERT INTO {seo_group} VALUES (6, 'Clean code', 'Well written markup is very important to the search engine spiders.')");    db_query("INSERT INTO {seo_group} VALUES (6, 'Clean code', 'Well written markup is very important to the search engine spiders.')");
98    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (19, 6, 'Validate your site - <a href=\"http://validator.w3.org/\">http://validator.w3.org/</a>', '', '', '', '', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (19, 6, 'Validate your site - <a href=\"http://validator.w3.org/\">http://validator.w3.org/</a>', '', '', '', '', 1)");
99    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (20, 6, 'Check your links - <a href=\"http://validator.w3.org/checklink\">http://validator.w3.org/checklink</a>', '', '', '', '', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (20, 6, 'Check your links - <a href=\"http://validator.w3.org/checklink\">http://validator.w3.org/checklink</a>', '', '', '', '', 2)");
100    
101    // XML sitemap tasks    // XML sitemap tasks
102    db_query("INSERT INTO {seo_group} VALUES (7, 'Submit your Site to the search engines.', 'Now that you\'ve got your site ready for the search engines, tell them about it!')");    db_query("INSERT INTO {seo_group} VALUES (7, 'Submit your Site to the search engines.', 'Now that you\'ve got your site ready for the search engines, tell them about it!')");
103    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (21, 7, 'XML Sitemap Module', 'xmlsitemap', 'http://drupal.org/project/xmlsitemap', 'admin/build/modules', 'admin/settings/xmlsitemap', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (21, 7, 'XML Sitemap Module', 'xmlsitemap', 'http://drupal.org/project/xmlsitemap', 'admin/build/modules', 'admin/settings/xmlsitemap', 1)");
104    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (22, 7, 'Login to Google Webmaster Tools - <a href=\"http://www.google.com/webmasters/tools\">http://www.google.com/webmasters/tools</a>', '', '', '', '', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (22, 7, 'Login to Google Webmaster Tools - <a href=\"http://www.google.com/webmasters/tools\">http://www.google.com/webmasters/tools</a>', '', '', '', '', 2)");
105    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (23, 7, 'Authenticate your site with Google', '', '', '', '', 3)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (23, 7, 'Authenticate your site with Google', '', '', '', '', 3)");
106    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (24, 7, 'Submit your XML Sitemap to Google - <a href=\"http://www.google.com/webmasters/sitemaps/\">http://www.google.com/webmasters/sitemaps/</a>', '', '', '', '', 4)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (24, 7, 'Submit your XML Sitemap to Google - <a href=\"http://www.google.com/webmasters/sitemaps/\">http://www.google.com/webmasters/sitemaps/</a>', '', '', '', '', 4)");
107    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (25, 7, 'Login to Yahoo Site Explorer Account - <a href=\"https://siteexplorer.search.yahoo.com/\">https://siteexplorer.search.yahoo.com/</a>', '', '', '', '', 5)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (25, 7, 'Login to Yahoo Site Explorer Account - <a href=\"https://siteexplorer.search.yahoo.com/\">https://siteexplorer.search.yahoo.com/</a>', '', '', '', '', 5)");
108    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (26, 7, 'Authenticate your site with Yahoo', '', '', '', '', 6)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (26, 7, 'Authenticate your site with Yahoo', '', '', '', '', 6)");
109    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (27, 7, 'Submit your XML Sitemap to Yahoo - <a href=\"https://siteexplorer.search.yahoo.com/submit\">https://siteexplorer.search.yahoo.com/submit</a>', '', '', '', '', 7)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (27, 7, 'Submit your XML Sitemap to Yahoo - <a href=\"https://siteexplorer.search.yahoo.com/submit\">https://siteexplorer.search.yahoo.com/submit</a>', '', '', '', '', 7)");
110    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (42, 7, 'Login to Bing - <a href=\"http://www.bing.com/webmaster/\">http://www.bing.com/webmaster/</a>', '', '', '', '', 8)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (42, 7, 'Login to Bing - <a href=\"http://www.bing.com/webmaster/\">http://www.bing.com/webmaster/</a>', '', '', '', '', 8)");
111    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (43, 7, 'Authenticate your site with Bing', '', '', '', '', 9)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (43, 7, 'Authenticate your site with Bing', '', '', '', '', 9)");
112    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (28, 7, 'Submit your XML Sitemap to Bing - <a href=\"http://www.bing.com/webmaster/WebmasterAddSitesPage.aspx\">http://webmaster.live.com/webmaster/WebmasterAddSitesPage.aspx</a>', '', '', '', '', 10)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (28, 7, 'Submit your XML Sitemap to Bing - <a href=\"http://www.bing.com/webmaster/WebmasterAddSitesPage.aspx\">http://webmaster.live.com/webmaster/WebmasterAddSitesPage.aspx</a>', '', '', '', '', 10)");
113    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (29, 7, 'If appropriate, submit your company to Google Local - <a href=\"https://www.google.com/webmasters/sitemaps/\">https://www.google.com/local/add/login</a>', '', '', '', '', 11)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (29, 7, 'If appropriate, submit your company to Google Local - <a href=\"https://www.google.com/webmasters/sitemaps/\">https://www.google.com/local/add/login</a>', '', '', '', '', 11)");
114    
115    // Social links tasks    // Social links tasks
116    db_query("INSERT INTO {seo_group} VALUES (8, 'Social Tracking', 'Using Social news sites, blogs, etc? Consider these:')");    db_query("INSERT INTO {seo_group} VALUES (8, 'Social Tracking', 'Using Social news sites, blogs, etc? Consider these:')");
117    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (30, 8, 'Digg This Module', 'diggthis', 'http://drupal.org/project/diggthis', 'admin/build/modules', 'admin/settings/diggthis', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (30, 8, 'Digg This Module', 'diggthis', 'http://drupal.org/project/diggthis', 'admin/build/modules', 'admin/settings/diggthis', 1)");
118    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (31, 8, 'Service Links Module', 'service_links', 'http://drupal.org/project/service_links', 'admin/build/modules', 'admin/settings/service_links', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (31, 8, 'Service Links Module', 'service_links', 'http://drupal.org/project/service_links', 'admin/build/modules', 'admin/settings/service_links', 2)");
119    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (32, 8, 'Trackback Module', 'trackback', 'http://drupal.org/project/trackback', 'admin/build/modules', 'admin/settings/trackback', 3)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (32, 8, 'Trackback Module', 'trackback', 'http://drupal.org/project/trackback', 'admin/build/modules', 'admin/settings/trackback', 3)");
120    
121    // Spam tasks    // Spam tasks
122    db_query("INSERT INTO {seo_group} VALUES (9, 'Protect your site from Spam', 'If your site will get heavy use from visitors creating accounts, commenting and/or creating content then consider these. NOTE: Most sites just need Mollom. The other modules are here in case Mollom does not work for you for some reason.')");    db_query("INSERT INTO {seo_group} VALUES (9, 'Protect your site from Spam', 'If your site will get heavy use from visitors creating accounts, commenting and/or creating content then consider these. NOTE: Most sites just need Mollom. The other modules are here in case Mollom does not work for you for some reason.')");
123    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (40, 9, 'Mollom Module', 'mollom', 'http://drupal.org/project/mollom', 'admin/build/modules', 'admin/settings/mollom', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (40, 9, 'Mollom Module', 'mollom', 'http://drupal.org/project/mollom', 'admin/build/modules', 'admin/settings/mollom', 1)");
124    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (33, 9, 'Captcha Module', 'captcha', 'http://drupal.org/project/captcha', 'admin/build/modules', 'admin/user/captcha', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (33, 9, 'Captcha Module', 'captcha', 'http://drupal.org/project/captcha', 'admin/build/modules', 'admin/user/captcha', 2)");
125    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (34, 9, 'Akismet Module', 'akismet', 'http://drupal.org/project/akismet', 'admin/build/modules', 'admin/settings/akismet', 3)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (34, 9, 'Akismet Module', 'akismet', 'http://drupal.org/project/akismet', 'admin/build/modules', 'admin/settings/akismet', 3)");
126    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (35, 9, 'http:BL Module', 'httpbl', 'http://drupal.org/project/httpbl', 'admin/build/modules', 'admin/settings/httpbl', 4)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (35, 9, 'http:BL Module', 'httpbl', 'http://drupal.org/project/httpbl', 'admin/build/modules', 'admin/settings/httpbl', 4)");
127    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (36, 9, 'Spam Module', 'spam', 'http://drupal.org/project/spam', 'admin/build/modules', 'admin/settings/spam', 5)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (36, 9, 'Spam Module', 'spam', 'http://drupal.org/project/spam', 'admin/build/modules', 'admin/settings/spam', 5)");
128    
129    // Beta modules    // Beta modules
130    db_query("INSERT INTO {seo_group} VALUES (10, 'Beta Modules (Use with Caution!)', 'These are probably good modules but need some work. Test them first.')");    db_query("INSERT INTO {seo_group} VALUES (10, 'Beta Modules (Use with Caution!)', 'These are probably good modules but need some work. Test them first.')");
131    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (37, 10, 'Google Proxy Hacking Protector Module', 'antiproxyhack', 'http://drupal.org/project/antiproxyhack', 'admin/build/modules', '', 1)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (37, 10, 'Google Proxy Hacking Protector Module', 'antiproxyhack', 'http://drupal.org/project/antiproxyhack', 'admin/build/modules', '', 1)");
132    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (38, 10, 'Path Redirect Module', 'path_redirect', 'http://drupal.org/project/path_redirect', 'admin/build/modules', '', 2)");    db_query("INSERT INTO {seo_checklist} $task_fields VALUES (38, 10, 'Path Redirect Module', 'path_redirect', 'http://drupal.org/project/path_redirect', 'admin/build/modules', '', 2)");
133  }  }
134    
135  /**  /**
136   * Implementation of hook_uninstall().   * Implementation of hook_uninstall().
137   */   */
138  function seochecklist_uninstall() {  function seochecklist_uninstall() {
139    db_query("DROP TABLE {seo_group}");    db_query("DROP TABLE {seo_group}");
140    db_query("DROP TABLE {seo_checklist}");    db_query("DROP TABLE {seo_checklist}");
141    variable_del('seo_checklist_link');    variable_del('seo_checklist_link');
142    variable_del('seo_checklist_thanks');    variable_del('seo_checklist_thanks');
143    variable_del('seo_checklist_podcast');    variable_del('seo_checklist_podcast');
144  }  }
145    
146  /**  /**
# Line 158  function seochecklist_update_5001() { Line 158  function seochecklist_update_5001() {
158    variable_set('seo_checklist_thanks', intval($result->extra2));    variable_set('seo_checklist_thanks', intval($result->extra2));
159    variable_set('seo_checklist_podcast', intval($result->extra3));    variable_set('seo_checklist_podcast', intval($result->extra3));
160    
161    switch ($GLOBALS['db_type']) {    switch ($GLOBALS['db_type']) {
162      case 'mysql':      case 'mysql':
163      case 'mysqli':      case 'mysqli':
164        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP extra2");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP extra2");
165        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP extra3");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP extra3");
166        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP linked_seo");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP linked_seo");
167        $ret[] = update_sql("ALTER TABLE {seo_group} DROP subgroup");        $ret[] = update_sql("ALTER TABLE {seo_group} DROP subgroup");
168        break;        break;
169      case 'pgsql':      case 'pgsql':
170        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN extra2");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN extra2");
171        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN extra3");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN extra3");
172        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN linked_seo");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN linked_seo");
173        $ret[] = update_sql("ALTER TABLE {seo_group} DROP COLUMN subgroup");        $ret[] = update_sql("ALTER TABLE {seo_group} DROP COLUMN subgroup");
174        break;        break;
175    }    }
176    
177    $ret[] = update_sql("DROP TABLE {seo_subgroup}");    $ret[] = update_sql("DROP TABLE {seo_subgroup}");
178    
179    return $ret;    return $ret;
180  }  }
181    
182  /**  /**
183   * Update from MSN to Bing and fix links.   * Update from MSN to Bing and fix links.
184   */   */
185  function seochecklist_update_5200() {  function seochecklist_update_5200() {
186    $ret = array();    $ret = array();
187    $ret[] = update_sql("INSERT INTO {seo_checklist} (id, group_id, name, order_id) VALUES (44, 3, 'Get a Windows Live ID - You will need this for steps that follow - <a href=\"https://signup.live.com/\">https://signup.live.com/</a>', 3)");    $ret[] = update_sql("INSERT INTO {seo_checklist} (id, group_id, name, order_id) VALUES (44, 3, 'Get a Windows Live ID - You will need this for steps that follow - <a href=\"https://signup.live.com/\">https://signup.live.com/</a>', 3)");
188    $ret[] = update_sql("INSERT INTO {seo_checklist} (id, group_id, name, order_id) VALUES (42, 7, 'Login to Bing - <a href=\"http://www.bing.com/webmaster/\">http://www.bing.com/webmaster/</a>', 8)");    $ret[] = update_sql("INSERT INTO {seo_checklist} (id, group_id, name, order_id) VALUES (42, 7, 'Login to Bing - <a href=\"http://www.bing.com/webmaster/\">http://www.bing.com/webmaster/</a>', 8)");
189    $ret[] = update_sql("INSERT INTO {seo_checklist} (id, group_id, name, order_id) VALUES (43, 7, 'Authenticate your site with Bing', 9)");    $ret[] = update_sql("INSERT INTO {seo_checklist} (id, group_id, name, order_id) VALUES (43, 7, 'Authenticate your site with Bing', 9)");
190    $ret[] = update_sql("UPDATE {seo_checklist} SET name = 'Submit your XML Sitemap to Bing - <a href=\"http://www.bing.com/webmaster/WebmasterAddSitesPage.aspx\">http://www.bing.com/webmaster/WebmasterAddSitesPage.aspx</a>', order_id = 10 WHERE id = 28");    $ret[] = update_sql("UPDATE {seo_checklist} SET name = 'Submit your XML Sitemap to Bing - <a href=\"http://www.bing.com/webmaster/WebmasterAddSitesPage.aspx\">http://www.bing.com/webmaster/WebmasterAddSitesPage.aspx</a>', order_id = 10 WHERE id = 28");
191    $ret[] = update_sql("UPDATE {seo_checklist} SET order_id = 11 WHERE id = 29");    $ret[] = update_sql("UPDATE {seo_checklist} SET order_id = 11 WHERE id = 29");
192    $ret[] = update_sql("UPDATE {seo_checklist} SET module = 'xmlsitemap', download = 'http://drupal.org/project/xmlsitemap', configure = 'admin/settings/xmlsitemap' WHERE id = 21");    $ret[] = update_sql("UPDATE {seo_checklist} SET module = 'xmlsitemap', download = 'http://drupal.org/project/xmlsitemap', configure = 'admin/settings/xmlsitemap' WHERE id = 21");
193    return $ret;    return $ret;
194  }  }
195    
196  /**  /**
197   * Convert the date_changed and option_checked fields into one UNIX completed   * Convert the date_changed and option_checked fields into one UNIX completed
198   * field.   * field.
199   */   */
200  function seochecklist_update_5201() {  function seochecklist_update_5201() {
201    $ret = array();    $ret = array();
202    
203    switch ($GLOBALS['db_type']) {    switch ($GLOBALS['db_type']) {
204      case 'mysql':      case 'mysql':
205      case 'mysqli':      case 'mysqli':
206        $ret[] = update_sql("ALTER TABLE {seo_checklist} ADD completed int unsigned NOT NULL default '0'");        $ret[] = update_sql("ALTER TABLE {seo_checklist} ADD completed int unsigned NOT NULL default '0'");
207        break;        break;
208      case 'pgsql':      case 'pgsql':
209        db_add_column($ret, 'seo_checklist', 'completed', 'int', array('unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));        db_add_column($ret, 'seo_checklist', 'completed', 'int', array('unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
210        break;        break;
211    }    }
212    
213    $query = db_query("SELECT id, date_changed FROM {seo_checklist} WHERE option_checked <> 0");    $query = db_query("SELECT id, date_changed FROM {seo_checklist} WHERE option_checked <> 0");
214    while ($record = db_fetch_object($query)) {    while ($record = db_fetch_object($query)) {
215      $record->changed = strtotime($record->date_changed);      $record->changed = strtotime($record->date_changed);
216      if (!$record->changed) {      if (!$record->changed) {
217        $record->changed = time();        $record->changed = time();
218      }      }
219      $ret[] = update_sql("UPDATE {seo_checklist} SET completed = {$record->changed} WHERE id = {$record->id}");      $ret[] = update_sql("UPDATE {seo_checklist} SET completed = {$record->changed} WHERE id = {$record->id}");
220    }    }
221    
222    switch ($GLOBALS['db_type']) {    switch ($GLOBALS['db_type']) {
223      case 'mysql':      case 'mysql':
224      case 'mysqli':      case 'mysqli':
225        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP date_changed");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP date_changed");
226        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP option_checked");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP option_checked");
227        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP checked_module");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP checked_module");
228        break;        break;
229      case 'pgsql':      case 'pgsql':
230        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN date_changed");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN date_changed");
231        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN option_checked");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN option_checked");
232        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN checked_module");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN checked_module");
233        break;        break;
234    }    }
235    
236    return $ret;    return $ret;
237  }  }
238    
239  /**  /**
240   * Remove the {seo_checklist}.subgroup_id field and add {seo_checklist}.uid.   * Remove the {seo_checklist}.subgroup_id field and add {seo_checklist}.uid.
241   */   */
242  function seochecklist_update_5202() {  function seochecklist_update_5202() {
243    $ret = array();    $ret = array();
244    
245    switch ($GLOBALS['db_type']) {    switch ($GLOBALS['db_type']) {
246      case 'mysql':      case 'mysql':
247      case 'mysqli':      case 'mysqli':
248        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP subgroup_id");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP subgroup_id");
249        $ret[] = update_sql("ALTER TABLE {seo_checklist} ADD uid int unsigned NOT NULL default '0'");        $ret[] = update_sql("ALTER TABLE {seo_checklist} ADD uid int unsigned NOT NULL default '0'");
250        break;        break;
251      case 'pgsql':      case 'pgsql':
252        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN subgroup_id");        $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN subgroup_id");
253        db_add_column($ret, 'seo_checklist', 'uid', 'int', array('unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));        db_add_column($ret, 'seo_checklist', 'uid', 'int', array('unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
254        break;        break;
255    }    }
256    
257    $ret[] = update_sql("UPDATE {seo_checklist} SET module = LOWER(module)");    $ret[] = update_sql("UPDATE {seo_checklist} SET module = LOWER(module)");
258    
259    return $ret;    return $ret;
260  }  }

Legend:
Removed from v.1.1.2.8  
changed lines
  Added in v.1.1.2.9

  ViewVC Help
Powered by ViewVC 1.1.2