| 1 |
<?php |
<?php |
| 2 |
// $Id: comment_info.module,v 1.1.2.1.2.1 2007/01/14 23:20:23 mfer Exp $ |
// $Id: comment_info.module,v 1.1.2.1.2.2 2007/02/23 20:20:50 mfer Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 42 |
*/ |
*/ |
| 43 |
function comment_info_admin_settings() { |
function comment_info_admin_settings() { |
| 44 |
$form['comment_info_description'] = array( |
$form['comment_info_description'] = array( |
| 45 |
'#value' => 'The Comment Info module allows anonymous users to save their comment information. There are two methods for storing the anonymous users information. The classic way via the users session and the new method using jQuery. Using the jQuery method will only work in javascript enabled browsers but is the prefered method to use with caching.' |
'#value' => 'The Comment Info module allows anonymous users to save their comment information. There are two methods for storing the anonymous users information. The classic way via the users session and using jQuery with cookies. Using the jQuery method will only work in javascript enabled browsers. The jQuery method is the only method that works with caching and is therefore the default/only option when caching is enabled.' |
| 46 |
); |
); |
| 47 |
|
|
| 48 |
$form['comment_info_setting'] = array( |
$form['comment_info_setting'] = array( |
| 51 |
'#default_value' => variable_get('comment_info_setting', 0), |
'#default_value' => variable_get('comment_info_setting', 0), |
| 52 |
); |
); |
| 53 |
|
|
| 54 |
|
if (variable_get('cache', CACHE_DISABLED) != CACHE_DISABLED) { |
| 55 |
|
$form['comment_info_setting']['#default_value'] = 1; |
| 56 |
|
$form['comment_info_setting']['#disabled'] = true; |
| 57 |
|
} |
| 58 |
|
|
| 59 |
return system_settings_form($form); |
return system_settings_form($form); |
| 60 |
} |
} |
| 61 |
|
|
| 70 |
return; |
return; |
| 71 |
} |
} |
| 72 |
|
|
| 73 |
if (variable_get('comment_info_setting', 0) == 1) { |
if (variable_get('comment_info_setting', 0) == 1 || variable_get('cache', CACHE_DISABLED) != CACHE_DISABLED) { |
| 74 |
drupal_add_js(drupal_get_path('module', 'comment_info').'/comment_info.js'); |
drupal_add_js(drupal_get_path('module', 'comment_info').'/comment_info.js'); |
| 75 |
$form['comment_info']['optin'] = array( |
$form['comment_info']['optin'] = array( |
| 76 |
'#value' => "<span id=\"comment_info\"></span>", |
'#value' => "<span id=\"comment_info\"></span>", |