| 1 |
<?php |
<?php |
| 2 |
// $Id: geshifilter.admin.inc,v 1.22 2009/07/04 11:05:56 soxofaan Exp $ |
// $Id: geshifilter.admin.inc,v 1.23 2009/07/12 23:24:48 soxofaan Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 203 |
); |
); |
| 204 |
|
|
| 205 |
// Code container |
// Code container |
| 206 |
|
$container_options = array( |
| 207 |
|
GESHI_HEADER_PRE => t('%val: uses a @cnt wrapper, efficient whitespace coding, no automatic line wrapping, generates invalid HTML with line numbering.', |
| 208 |
|
array('%val' => 'GESHI_HEADER_PRE', '@cnt' => '<pre>')), |
| 209 |
|
GESHI_HEADER_DIV => t('%val: uses a @cnt wrapper, enables automatic line wrapping.', |
| 210 |
|
array('%val' => 'GESHI_HEADER_DIV', '@cnt' => '<div>')), |
| 211 |
|
); |
| 212 |
|
if (version_compare(GESHI_VERSION, '1.0.8', '>=')) { |
| 213 |
|
$container_options[GESHI_HEADER_PRE_VALID] = t('%val: uses @pre wrappers, ensures valid HTML with line numbering, but generates more markup.', |
| 214 |
|
array('%val' => 'GESHI_HEADER_PRE_VALID', '@pre' => '<pre>', '@li' => '<li>')); |
| 215 |
|
$container_options[GESHI_HEADER_PRE_TABLE] = t('%val: uses a @table construction for adding line numbers which avoids selection/copy/paste problems.', |
| 216 |
|
array('%val' => 'GESHI_HEADER_PRE_TABLE', '@table' => '<table>')); |
| 217 |
|
} |
| 218 |
|
if (version_compare(GESHI_VERSION, '1.0.7.2', '>=')) { |
| 219 |
|
$container_options[GESHI_HEADER_NONE] = t('%val: uses no wrapper.', |
| 220 |
|
array('%val' => 'GESHI_HEADER_NONE')); |
| 221 |
|
} |
| 222 |
|
|
| 223 |
$form['geshifilter_styling']['geshifilter_code_container'] = array( |
$form['geshifilter_styling']['geshifilter_code_container'] = array( |
| 224 |
'#type' => 'radios', |
'#type' => 'radios', |
| 225 |
'#title' => t('Code container'), |
'#title' => t('Code container, wrapping technique'), |
| 226 |
'#description' => t('Define the container element to use for code blocks. (GeSHi documentation: <a href="!link">The Code Container</a>).', |
'#description' => t('Define the wrapping technique to use for code blocks. (GeSHi documentation: <a href="!link">The Code Container</a>).', |
| 227 |
array('!link' => 'http://qbnz.com/highlighter/geshi-doc.html#the-code-container') |
array('!link' => 'http://qbnz.com/highlighter/geshi-doc.html#the-code-container') |
| 228 |
), |
), |
| 229 |
'#options' => array( |
'#options' => $container_options, |
|
GESHI_HEADER_PRE => t('Use @cnt container (efficient whitespace coding, no automatic line wrapping)', array('@cnt' => '<pre>')), |
|
|
GESHI_HEADER_DIV => t('Use @cnt container (enables automatic line wrapping)', array('@cnt' => '<div>')), |
|
|
GESHI_HEADER_NONE => t('Use no container'), |
|
|
), |
|
| 230 |
'#default_value' => variable_get('geshifilter_code_container', GESHI_HEADER_PRE), |
'#default_value' => variable_get('geshifilter_code_container', GESHI_HEADER_PRE), |
| 231 |
); |
); |
| 232 |
} |
} |