| 1 |
<?php |
<?php |
| 2 |
/* $Id$ */ |
/* $Id: tables.module,v 1.7 2006/04/07 05:27:36 webgeer Exp $ */ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 180 |
|
|
| 181 |
function tables_menu($may_cache) { |
function tables_menu($may_cache) { |
| 182 |
if (!$may_cache) { |
if (!$may_cache) { |
| 183 |
if ($css = variable_get('tables_css', 'modules/tables/tables.css')) { |
if ($css = variable_get('tables_css', drupal_get_path('modules').'/tables/tables.css')) { |
| 184 |
theme('add_style', $css); |
theme('add_style', $css); |
| 185 |
} |
} |
| 186 |
} |
} |
| 188 |
} |
} |
| 189 |
|
|
| 190 |
function tables_settings() { |
function tables_settings() { |
| 191 |
if (!file_check_location(variable_get('tables_css', 'modules/tables/tables.css'))) { |
if (!file_check_location(variable_get('tables_css', drupal_get_path('modules').'/tables/tables.css'))) { |
| 192 |
$error['tables_css'] = theme('error', t('File does not exist, or is not readable.')); |
$error['tables_css'] = theme('error', t('File does not exist, or is not readable.')); |
| 193 |
} |
} |
| 194 |
$form["tables_css"] = array('#type' => 'textfield', |
$form["tables_css"] = array('#type' => 'textfield', |
| 195 |
'#title' => t('Style Sheet'), |
'#title' => t('Style Sheet'), |
| 196 |
'#default_value' => variable_get('tables_css', 'modules/tables/tables.css'), |
'#default_value' => variable_get('tables_css', drupal_get_path('modules').'/tables/tables.css'), |
| 197 |
'#size' => 70, |
'#size' => 70, |
| 198 |
'#maxlength' => 255, |
'#maxlength' => 255, |
| 199 |
'#description' => t("Specify the relative path to your tables style sheet. The style sheet specified here will be used to style tables you insert. If you prefer to style your tables in your theme, you can leave this field blank. ". $error['tables_css']), |
'#description' => t("Specify the relative path to your tables style sheet. The style sheet specified here will be used to style tables you insert. If you prefer to style your tables in your theme, you can leave this field blank. ". $error['tables_css']), |