You are here

SEOChecklist.info in SEO Checklist 5

Lets users xyz line one.

Big desc line 1 Big desc line 2.

File

SEOChecklist.info
View source
  1. ./._SEOChecklist.install0000644000076500000000000000261410706016023016512 0ustar benfinkleawheel00000000000000Mac OS X  2 R:2/Applications/TextWrangler.appFoEFFoEFFoHIIl:;;Z ,,,
  2. RTTZ\[
  3. ...H
  4. $$$,--aedfihehhcfe344vxwdc:;;$%$cgfgih,--111}%%%eTUUPRQ%&%e%%%e%&&e~mponqp&&&e\^][]\&'&e&''e'''e())d~~(((I
  5. c*+*~jkj898Zpnmwzlnp^(2`[2usro
  6. SEOChecklist.install0000644000076500007650000002045510706016023017157 0ustar benfinkleabenfinklea00000000000000
  7. /**
  8. * Implementation of hook_install().
  9. */
  10. function SEOChecklist_install()
  11. {
  12. switch ($GLOBALS['db_type']) {
  13. case 'mysql':
  14. case 'mysqli':
  15. case 'pgsql':
  16. db_query("DROP TABLE IF EXISTS {seo_group}");
  17. db_query("CREATE TABLE {seo_group} (
  18. `id` tinyint(4) NOT NULL auto_increment,
  19. `name` varchar(255) NOT NULL default '',
  20. `description` varchar(255) NOT NULL default '',
  21. `subgroup` tinyint(1) NOT NULL default '0',
  22. PRIMARY KEY (`id`)
  23. )");
  24. db_query("INSERT INTO {seo_group} VALUES (1, 'Page Titles', 'The single most important thing you can do for on-site SEO', 0),
  25. (2, 'URL paths', 'The second most important thing you can do', 1),
  26. (3, 'Create Search Engine Accounts', 'Set yourself up with the search engines.', 0),
  27. (4, 'Track your visitors', 'Know where your visitors are coming from and what they do while visiting your site.', 0),
  28. (5, 'Page content', 'Take control of your page content.', 0),
  29. (6, 'Clean code', 'Well written markup is very important to the search engine spiders.', 0),
  30. (7, 'Submit your Site to the search engines.', 'Now that you''ve got your site ready for the search engines, tell them about it!', 0),
  31. (8, 'Social Tracking', 'Using Social news sites, blogs, etc? Consider these:', 0),
  32. (9, 'Protect your site from Spam', 'Search engines hate spam. If your site will get heavy use from visitors creating accounts, commenting and/or creating their own content then you should consider these.', 0),
  33. (10, 'Beta Modules (Use with Caution!)', 'These are probably good modules but need some work. Test them first.', 0)");
  34. db_query("DROP TABLE IF EXISTS {seo_subgroup}");
  35. db_query("CREATE TABLE `seo_subgroup` (
  36. `id` tinyint(4) NOT NULL auto_increment,
  37. `group_id` tinyint(4) NOT NULL default '0',
  38. `name` varchar(255) NOT NULL default '',
  39. PRIMARY KEY (`id`)
  40. )");
  41. db_query("INSERT INTO {seo_subgroup} VALUES (1, 2, 'The second most important thing you can do'),
  42. (2, 2, 'Choose one:')");
  43. db_query("DROP TABLE IF EXISTS {seo_checklist}");
  44. db_query("CREATE TABLE {seo_checklist} (
  45. `id` tinyint(2) NOT NULL auto_increment,
  46. `group_id` tinyint(4) NOT NULL default '0',
  47. `subgroup_id` tinyint(4) NOT NULL default '0',
  48. `name` varchar(255) NOT NULL default '',
  49. `module` varchar(255) NOT NULL default '',
  50. `option_checked` tinyint(1) NOT NULL default '0',
  51. `date_changed` datetime NOT NULL default '0000-00-00 00:00:00',
  52. `linked_seo` tinyint(1) NOT NULL default '0',
  53. `checked_module` tinyint(1) NOT NULL default '0',
  54. `extra2` tinyint(1) NOT NULL default '0',
  55. `extra3` tinyint(1) NOT NULL default '0',
  56. `download` varchar(255) NOT NULL default '',
  57. `enable` varchar(255) NOT NULL default '',
  58. `configure` varchar(255) NOT NULL default '',
  59. `order_id` tinyint(2) NOT NULL default '0',
  60. PRIMARY KEY (`id`)
  61. )");
  62. db_query("INSERT INTO `seo_checklist` (`id`, `group_id`, `subgroup_id`, `name`, `module`, `download`, `enable`, `configure`, `order_id`) VALUES (1, 1, 0, 'Page Title Module', 'page_title', 'http://drupal.org/project/page_title', '?q=admin/build/modules', '?q=admin/settings/page_title', 1),
  63. (2, 2, 1, 'Clean URLs - Activate (Usually automatic but double check!)', '', '', '', '?q=admin/settings/clean-urls', 1),
  64. (3, 2, 1, 'Find URL Alias Module', 'find_path', 'http://drupal.org/project/find_path', '?q=admin/build/modules', '', 2),
  65. (4, 2, 2, 'Simple: URLify Module', 'urlify', 'http://drupal.org/project/urlify', '?q=admin/build/modules', '?q=admin/settings/urlify', 1),
  66. (5, 2, 2, 'Powerful: Pathauto Module', 'pathauto', 'http://drupal.org/project/pathauto', '?q=admin/build/modules', '?q=admin/settings/pathauto', 2),
  67. (6, 2, 1, 'Global Redirect Module', 'globalredirect', 'http://drupal.org/project/globalredirect', '?q=admin/build/modules', '', 3),
  68. (7, 3, 0, 'Get a Google Account - You''ll need this for several of the steps that follow - https://www.google.com/accounts/NewAccount', '', '', '', '', 1),
  69. (8, 3, 0, 'Get a Yahoo Account - You''ll need this for steps that follow - http://www.yahoo.com/r/m7', '', '', '', '', 2),
  70. (9, 4, 0, 'Google Analytics Module', 'google_analytics', 'http://drupal.org/project/google_analytics', '?q=admin/build/modules', '?q=admin/settings/googleanalytics', 1),
  71. (10, 4, 0, 'Sign in to your Google Analytics Account - http://www.google.com/analytics', '', '', '', '', 2),
  72. (11, 4, 0, 'Create an Analytics for your website', '', '', '', '', 3),
  73. (12, 4, 0, 'Paste Google Analytics code into Google Analytics Module', '', '', '', '', 4),
  74. (13, 4, 0, 'Authenticate your site with Google Analytics', '', '', '', '', 5),
  75. (14, 5, 0, 'Excerpt Module', 'excerpt', 'http://drupal.org/project/excerpt', '?q=admin/build/modules', '', 1),
  76. (15, 5, 0, 'Meta Tags Module (AKA Nodewords)', 'nodewords', 'http://drupal.org/project/nodewords', '?q=admin/build/modules', '?q=admin/content/nodewords', 2),
  77. (16, 5, 0, 'Scheduler Module', 'scheduler', 'http://drupal.org/project/scheduler', '?q=admin/build/modules', '', 3),
  78. (17, 5, 0, 'Safe HTML Module', 'safehtml', 'http://drupal.org/project/safehtml', '?q=admin/build/modules', '?q=admin/settings/filters/1', 4),
  79. (18, 5, 0, 'Search 404 Module', 'search404', 'http://drupal.org/project/search404', '?q=admin/build/modules', '?q=admin/settings/search404', 5),
  80. (19, 6, 0, 'Validate your site - http://validator.w3.org/', '', '', '', '', 1),
  81. (20, 6, 0, 'Check your links - http://validator.w3.org/checklink', '', '', '', '', 2),
  82. (21, 7, 0, 'XML Sitemap Module', 'gsitemap', 'http://drupal.org/project/gsitemap', '?q=admin/build/modules', '?q=admin/settings/gsitemap', 1),
  83. (22, 7, 0, 'Login to Google Webmaster Tools - http://www.google.com/webmasters/tools', '', '', '', '', 2),
  84. (23, 7, 0, 'Authenticate your site with Google', '', '', '', '', 3),
  85. (24, 7, 0, 'Submit your XML Sitemap to Google - www.google.com/webmasters/sitemaps/', '', '', '', '', 4),
  86. (25, 7, 0, 'Login to Yahoo Site Explorer Account - https://siteexplorer.search.yahoo.com/', '', '', '', '', 5),
  87. (26, 7, 0, 'Authenticate your site with Yahoo', '', '', '', '', 6),
  88. (27, 7, 0, 'Submit your XML Sitemap to Yahoo - https://siteexplorer.search.yahoo.com/submit', '', '', '', '', 7),
  89. (28, 7, 0, 'Submit your XML Sitemap to MSN - http://search.msn.com/docs/submit.aspx', '', '', '', '', 8),
  90. (29, 7, 0, 'If appropriate, submit your company to Google Local - https://www.google.com/local/add/login', '', '', '', '', 9),
  91. (30, 8, 0, 'Digg This Module', 'diggthis', 'http://drupal.org/project/diggthis', '?q=admin/build/modules', '?q=admin/settings/diggthis', 1),
  92. (31, 8, 0, 'Service Links Module', 'service_links', 'http://drupal.org/project/service_links', '?q=admin/build/modules', '?q=admin/settings/service_links', 2),
  93. (32, 8, 0, 'Trackback Module', 'trackback', 'http://drupal.org/project/trackback', '?q=admin/build/modules', '?q=admin/settings/trackback', 3),
  94. (33, 9, 0, 'Captcha Module', 'captcha', 'http://drupal.org/project/captcha', '?q=admin/build/modules', '?q=admin/user/captcha', 1),
  95. (34, 9, 0, 'Akismet Module', 'akismet', 'http://drupal.org/project/akismet', '?q=admin/build/modules', '?q=admin/settings/akismet', 2),
  96. (35, 9, 0, 'http:BL Module', 'httpbl', 'http://drupal.org/project/httpbl', '?q=admin/build/modules', '?q=admin/settings/httpbl', 3),
  97. (36, 9, 0, 'Spam Module', 'spam', 'http://drupal.org/project/spam', '?q=admin/build/modules', '?q=admin/settings/spam', 4),
  98. (37, 10, 0, 'Google Proxy Hacking Protector Module', 'antiproxyhack', 'http://drupal.org/project/antiproxyhack', '?q=admin/build/modules', '', 1),
  99. (38, 10, 0, 'Path Redirect Module', 'path_redirect', 'http://drupal.org/project/path_redirect', '?q=admin/build/modules', '', 2)");
  100. break;
  101. }
  102. }
  103. /**
  104. * Implementation of hook_uninstall().
  105. */
  106. function SEOChecklist_uninstall() {
  107. db_query("DROP TABLE IF EXISTS {seo_group}");
  108. db_query("DROP TABLE IF EXISTS {seo_subgroup}");
  109. db_query("DROP TABLE IF EXISTS {seo_checklist}");
  110. }./._SEOChecklist.module0000644000076500000000000000261410706016163016336 0ustar benfinkleawheel00000000000000Mac OS X  2 R:2/Applications/TextWrangler.app\\\\\\\\\\\\\^^^T555 hEEEħ.llkG+++hhgݶD)))gggD)))hfeD)))
  111. }z䞨E%%%^^^䝦F$$$eeeD)))eddD)))iiiG***O000˥̨̨̨޸̚׫sss"yKKKި%PPP JJJ5  ,}FFFLLLMMMNNNMMMOOOL&&&! $%#
  112. 
  113. (2`[2usro
  114. LSEOChecklist.module0000644000076500007650000003060110706016163016775 0ustar benfinkleabenfinklea00000000000000
  115. /**
  116. * @file
  117. * Lets users xyz line one.
  118. *
  119. * Big desc line 1
  120. * Big desc line 2.
  121. */
  122. /**
  123. * Implementation of hook_menu().
  124. */
  125. function SEOChecklist_menu($may_cache) {
  126. $items = array();
  127. if ($may_cache) {
  128. $items[] = array(
  129. 'path' => 'admin/settings/SEOChecklist',
  130. 'title' => t('"SEO" Checklist'),
  131. 'description' => t('Keep track of your Drupal Search Engine Optimization tasks.'),
  132. 'callback' => 'drupal_get_form',
  133. 'callback arguments' => array('SEOChecklist_admin_settings'),
  134. 'access' => user_access('administer site configuration')
  135. );
  136. }
  137. return $items;
  138. }
  139. /**
  140. * Define the settings form.
  141. */
  142. function SEOChecklist_admin_settings() {
  143. // Array values
  144. $bot_arr=array();
  145. $bot_val=array();
  146. $bot_arr1=array();
  147. $bot_val1=array();
  148. //Bottom code more
  149. $bot_arr1[1]='Send us feedback on this module or just say "Thanks!" and we will link to you from our website. Send your feedback and link information to seochecklist@sprydev.com. (If you don\'t know why you should link with other websites, read this: Why Links Help SEO';
  150. $bot_arr1[2]='Listen to the SpryDev Drupal SEO Podcast for more tips and tricks about Drupal SEO: http://www.sprydev.com/podcast';
  151. $sql = "SELECT extra2,extra3 FROM {seo_checklist} where id=1";
  152. $result = db_query(db_rewrite_sql($sql));
  153. while ($data = db_fetch_object($result))
  154. {
  155. $bot_val1[1]=$data->extra2;
  156. $bot_val1[2]=$data->extra3;
  157. }
  158. //Bottom code more end
  159. $check_val=array();
  160. $bot_arr[1]="Link to SpryDev to thank them for this awesome module.";
  161. $sql="select linked_seo from {seo_checklist} where id=1";
  162. $result = db_query(db_rewrite_sql($sql));
  163. $bot_val[] = db_result(db_query($sql));
  164. //Array values end
  165. //Upper save button
  166. $form['save'] = array(
  167. '#type' => 'submit',
  168. '#value' => t('Save')
  169. );
  170. $sql="select checked_module from {seo_checklist} where id=1";
  171. $result = db_query(db_rewrite_sql($sql));
  172. $temp= db_result(db_query($sql));
  173. $checked='';
  174. if($temp==1)
  175. $checked='checked';
  176. $form['space'] = array(
  177. '#value' => t('
    ')
  178. );
  179. $form['frm_Check_title'] = array(
  180. '#value' => t('Check off each SEO-related task as you complete it. Don\'t forget to click "Save":')
  181. );
  182. $form['space1'] = array(
  183. '#value' => t('
    ')
  184. );
  185. $form['frm_Check_existing'] = array(
  186. '#value' => t('
    Check for already Installed Modules

    ')
  187. );
  188. //$test_code='
    ';
  189. //Fech modules and groups from database
  190. $page_contents='';
  191. $query="select * from {seo_group} order by id";
  192. $result = db_query(db_rewrite_sql($query));
  193. $group_id=0;
  194. while ($data = db_fetch_object($result))
  195. {
  196. $group_id=$data->id;
  197. $page_contents.='
    '.$data->name.'';
  198. if($data->subgroup==0)
  199. {
  200. $page_contents.='
    '.$data->description.'
    ';
  201. $page_contents.='
    ';
  202. $q="select * from {seo_checklist} where group_id=".$group_id." order by order_id";
  203. $res = db_query(db_rewrite_sql($q));
  204. while ($row = db_fetch_object($res))
  205. {
  206. $id = $row->id;
  207. $option_download_link=$row->download;
  208. $option_enable_link=$row->enable;
  209. $option_conf_link=$row->configure;
  210. $option_val=$row->option_checked;
  211. $option_checked='';
  212. if($option_val==$id)
  213. $option_checked='checked="checked"';
  214. if($row->option_checked==0)
  215. $option_attr='';
  216. else
  217. $option_attr=$row->date_changed;
  218. //Check for module already existance
  219. $module_name=$row->module;
  220. $exist_f=0;
  221. if(module_exists($module_name))
  222. $exist_f=1;
  223. $page_contents.='
  224. //Configure link enables only when module is installed
  225. $conf_link='';
  226. if($option_conf_link=='')
  227. $conf_link='';
  228. else if($exist_f==0)
  229. $conf_link="|  Configure";
  230. else
  231. $conf_link="|  Configure ";
  232. $page_contents.= "  ".(($option_download_link=='')?'':"Download |").(($option_enable_link=='')?'':" Enable ").$conf_link.(($option_attr=='')?'':' Date Completed: ('.$option_attr.')');
  233. }
  234. }
  235. else // If group has subtitle, fetch modules under each subtitle
  236. {
  237. $q="select * from {seo_subgroup} where group_id=".$group_id." order by id";
  238. $res1 = db_query(db_rewrite_sql($q));
  239. while ($row1 = db_fetch_object($res1))
  240. {
  241. $page_contents.='
    '.$row1->name.'
    ';
  242. $page_contents.='
    ';
  243. $q="select * from {seo_checklist} where group_id=".$group_id." and subgroup_id=".$row1->id." order by order_id";
  244. $res = db_query(db_rewrite_sql($q));
  245. while ($row = db_fetch_object($res))
  246. {
  247. $id = $row->id;
  248. $option_download_link=$row->download;
  249. $option_enable_link=$row->enable;
  250. $option_conf_link=$row->configure;
  251. $option_val=$row->option_checked;
  252. $option_checked='';
  253. if($option_val==$id)
  254. $option_checked='checked="checked"';
  255. if($row->option_checked==0)
  256. $option_attr='';
  257. else
  258. $option_attr=$row->date_changed;
  259. //Check for module already existance
  260. $module_name=$row->module;
  261. $exist_f=0;
  262. if(module_exists($module_name))
  263. $exist_f=1;
  264. $page_contents.='
  265. //Configure link enables only when module is installed
  266. $conf_link='';
  267. if($option_conf_link=='')
  268. $conf_link='';
  269. else if($exist_f==0 && $id!=2)
  270. $conf_link="|  Configure";
  271. else
  272. $conf_link="|  Configure ";
  273. $page_contents.= "  ".(($option_download_link=='')?'':"Download |").(($option_enable_link=='')?'':" Enable ").$conf_link.(($option_attr=='')?'':' Date Completed: ('.$option_attr.')');
  274. }
  275. }
  276. }
  277. $page_contents.='
';
  • }
  • $form['SEOChecklist_nodetypes'] = array(
  • '#value' => t($page_contents)
  • );
  • $form['Bottom_code'] = array(
  • '#type' => 'checkboxes',
  • '#title' => t('Extras'),
  • '#options' => $bot_arr,
  • '#default_value' => $bot_val,
  • '#description' => t('Link will appear at the very bottom of your website. You can disable it at any time by un-checking this box. We really appreciate it!!!'),
  • );
  • $form['Bottom_code_more'] = array(
  • '#type' => 'checkboxes',
  • '#options' => $bot_arr1,
  • '#default_value' => $bot_val1,
  • );
  • $form['save1'] = array(
  • '#type' => 'submit',
  • '#value' => t('Save')
  • );
  • $form['array_filter'] = array('#type' => 'hidden');
  • //return system_settings_form($form);
  • return $form;
  • }
  • function SEOChecklist_admin_settings_submit($form_id, $form_values) {
  • if($_POST['op']=='Save' )
  • {
  • if(isset($_POST['SEOChecklist_nodetypes']))
  • {
  • $today=date("Y-m-d H:i:s");
  • $chk_list=implode(",",$_POST['SEOChecklist_nodetypes']);
  • foreach($_POST['SEOChecklist_nodetypes'] as $k=>$value)
  • {
  • // Update option checked and date added
  • $q="select option_checked from {seo_checklist} where id=".$k;
  • $temp= db_result(db_query($q));
  • db_query("update {seo_checklist} set option_checked=".$value." where id=".$k);
  • if($temp==0)
  • {
  • db_query("update {seo_checklist} set date_changed='".$today."' where id=".$k);
  • }
  • }
  • //store zero for all unchecked items
  • db_query("update {seo_checklist} set option_checked=0 where id not in(".$chk_list.")");
  • }
  • else
  • db_query("update {seo_checklist} set option_checked=0");
  • if(isset($_POST['Bottom_code']))
  • db_query("update {seo_checklist} set linked_seo=".$_POST['Bottom_code'][1]);
  • else
  • db_query("update {seo_checklist} set linked_seo=0");
  • $extra1=0;
  • $extra2=0;
  • if(isset($_POST['Bottom_code_more']))
  • {
  • if(isset($_POST['Bottom_code_more'][1]))
  • $extra1=$_POST['Bottom_code_more'][1];
  • else
  • $extra1=0;
  • if(isset($_POST['Bottom_code_more'][2]))
  • $extra2=$_POST['Bottom_code_more'][2];
  • else
  • $extra2=0;
  • }
  • db_query("update {seo_checklist} set extra2=".$extra1.",extra3=".$extra2);
  • }
  • if($_POST['op']=='Check')
  • {
  • $today=date("Y-m-d H:i:s");
  • $sql="select * from {seo_checklist} where module!=''";
  • $result=db_query(db_rewrite_sql($sql));
  • while($data=db_fetch_object($result))
  • {
  • $module_name=$data->module;
  • $id=$data->id;
  • if(module_exists($module_name))
  • {
  • db_query("update {seo_checklist} set option_checked=".$id.",date_changed='".$today."' where id=".$id);
  • }
  • }
  • db_query("update {seo_checklist} set checked_module=1");
  • }
  • }
  • function SEOChecklist_footer($main = 0) {
  • $sql="select linked_seo from {seo_checklist} where id=1";
  • $result = db_query(db_rewrite_sql($sql));
  • $linked = db_result(db_query($sql));
  • if($linked == 1)
  • {
  • $ch = curl_init();
  • $timeout = 2; // set to zero for no timeout
  • curl_setopt ($ch, CURLOPT_URL, 'http://www.sprydev.com/linkcodes/seomodule_link.js');
  • curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  • curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  • $file_contents = curl_exec($ch);
  • curl_close($ch);
  • return $file_contents;
  • }
  • }