| 1 |
<?php
|
| 2 |
// $Id: texy_syntaxhighlighting.admin.inc,v 1.1.2.1 2008/01/06 12:08:39 havran Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Admin page callbacks for the Texy Syntaxhighlighting.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Form builder; Configure Syntaxhighlighting settings for Texy!.
|
| 11 |
*
|
| 12 |
* @ingroup forms
|
| 13 |
* @see system_settings_form().
|
| 14 |
*/
|
| 15 |
function texy_form_syntaxhighlighting_settings() {
|
| 16 |
$module_path = drupal_get_path('module', 'texy_syntaxhighlighting');
|
| 17 |
|
| 18 |
$form['highlighterset'] = array(
|
| 19 |
'#type' => 'fieldset',
|
| 20 |
'#title' => t('Syntax highlighting'),
|
| 21 |
'#collapsible' => TRUE,
|
| 22 |
'#weight' => -1,
|
| 23 |
);
|
| 24 |
$form['highlighterset']['texy_syntaxhighlighting_use'] = array(
|
| 25 |
'#type' => 'checkbox',
|
| 26 |
'#title' => t('Use source code syntax highlighting'),
|
| 27 |
'#description' => t('Check this option if you would like to highlight entered source code.'),
|
| 28 |
'#default_value' => variable_get('texy_syntaxhighlighting_use', FALSE),
|
| 29 |
);
|
| 30 |
$form['highlighterset']['texy_syntaxhighlighting_name'] = array(
|
| 31 |
'#type' => 'textfield',
|
| 32 |
'#size' => '20',
|
| 33 |
'#title' => t('Syntax highlighter\'s name'),
|
| 34 |
'#description' => t('Name of a tool which you wish to use for syntax highlighting. For example, if you plan to use <a href="http://hvge.sk/scripts/fshl/">FSHL</a> you should enter <code>fshl</code> and install the tool into the <code>!module_path/lib/fshl</code> directory, together with a corresponding <code>!module_path/lib/fshl.php</code> file which would be a PHP implementation of the highlighter.', array('!module_path' => $module_path)),
|
| 35 |
'#default_value' => variable_get('texy_syntaxhighlighting_name', 'fshl'),
|
| 36 |
);
|
| 37 |
$form['highlighterset']['texy_syntaxhighlighting_css_path'] = array(
|
| 38 |
'#type' => 'textfield',
|
| 39 |
'#title' => t("Syntax highlighter's stylesheet"),
|
| 40 |
'#description' => t('Path to a stylesheet wich will be used together with the syntax highlighter. For example, if you plan to use <a href="http://hvge.sk/scripts/fshl/">FSHL</a> you should enter <code>fshl/styles/COHEN_style.css</code>.'),
|
| 41 |
'#default_value' => variable_get('texy_syntaxhighlighting_css_path', 'fshl/styles/COHEN_style.css'),
|
| 42 |
);
|
| 43 |
|
| 44 |
return system_settings_form($form);
|
| 45 |
}
|