| 1 |
<?php |
<?php |
| 2 |
// $Id: wordcount.module,v 1.3 2009/09/21 20:41:57 crookednumber Exp $ |
// $Id: wordcount.module,v 1.4 2009/09/21 20:44:44 crookednumber Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 28 |
} |
} |
| 29 |
|
|
| 30 |
function wordcount_show_count() { |
function wordcount_show_count() { |
| 31 |
|
drupal_add_js(drupal_get_path('module', 'wordcount') . '/js/jquery.tablesorter.min.js', 'module'); |
| 32 |
|
drupal_add_js(drupal_get_path('module', 'wordcount') . '/js/wordcount.js', 'module'); |
| 33 |
|
drupal_add_css(drupal_get_path('module', 'wordcount') . '/themes/blue/wordcount-blue-style.css', 'module'); |
| 34 |
// Count words. |
// Count words. |
| 35 |
$row = array(); |
$row = array(); |
| 36 |
|
|
| 88 |
array('data' => 'words per comment'), |
array('data' => 'words per comment'), |
| 89 |
array('data' => 'total words'), |
array('data' => 'total words'), |
| 90 |
); |
); |
| 91 |
$output = theme_table($header, $row); |
$output = theme('table', $header, $row, array('id' => 'wordcount', 'class' => 'tablesorter')); |
| 92 |
|
|
| 93 |
return $output; |
return $output; |
| 94 |
} |
} |