/[drupal]/contributions/modules/geshifilter/geshifilter.admin.inc
ViewVC logotype

Diff of /contributions/modules/geshifilter/geshifilter.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.22, Sat Jul 4 11:05:56 2009 UTC revision 1.23, Sun Jul 12 23:24:48 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: geshifilter.admin.inc,v 1.21 2009/07/04 09:48:59 soxofaan Exp $  // $Id: geshifilter.admin.inc,v 1.22 2009/07/04 11:05:56 soxofaan Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 157  function geshifilter_admin_general_setti Line 157  function geshifilter_admin_general_setti
157          GESHIFILTER_LINE_NUMBERS_DEFAULT_FANCY10 => t('fancy line numbers (every @n lines)', array('@n' => GESHIFILTER_LINE_NUMBERS_DEFAULT_FANCY10)),          GESHIFILTER_LINE_NUMBERS_DEFAULT_FANCY10 => t('fancy line numbers (every @n lines)', array('@n' => GESHIFILTER_LINE_NUMBERS_DEFAULT_FANCY10)),
158          GESHIFILTER_LINE_NUMBERS_DEFAULT_FANCY20 => t('fancy line numbers (every @n lines)', array('@n' => GESHIFILTER_LINE_NUMBERS_DEFAULT_FANCY20)),          GESHIFILTER_LINE_NUMBERS_DEFAULT_FANCY20 => t('fancy line numbers (every @n lines)', array('@n' => GESHIFILTER_LINE_NUMBERS_DEFAULT_FANCY20)),
159        ),        ),
160        '#description' => t('Select the default line numbering scheme: no line numbers, normal line numbers or fancy line numbers. With fancy line numbers every n<sup>th</sup> line number is highlighted. (GeSHi documentation: !link).',        '#description' => t('Select the default line numbering scheme: no line numbers, normal line numbers or fancy line numbers. With fancy line numbers every n<sup>th</sup> line number is highlighted. (GeSHi documentation: <a href="!link">Line numbers</a>).',
161          array('!link' => l('Line numbers', 'http://qbnz.com/highlighter/geshi-doc.html#line-numbers'))),          array('!link' => 'http://qbnz.com/highlighter/geshi-doc.html#line-numbers')),
162      );      );
163      // highlight_string usage option      // highlight_string usage option
164      $form['geshifilter_highlighting_options']['geshifilter_use_highlight_string_for_php'] = array(      $form['geshifilter_highlighting_options']['geshifilter_use_highlight_string_for_php'] = array(
165        '#type' => 'checkbox',        '#type' => 'checkbox',
166        '#title' => t('Use built-in PHP function <code>highlight_string()</code> for PHP source code.'),        '#title' => t('Use built-in PHP function <code>highlight_string()</code> for PHP source code.'),
167        '#description' => t('When enabled, PHP source code will be syntax highlighted with the built-in PHP function <code>!highlight_string</code> instead of with the GeSHi library. GeSHi features like for example line numbering and usage of an external CSS stylesheet are not available.', array('!highlight_string' => l('highlight_string()', 'http://php.net/manual/en/function.highlight-string.php'))),        '#description' => t('When enabled, PHP source code will be syntax highlighted with the built-in PHP function <code><a href="!highlight_string">highlight_string()</a></code> instead of with the GeSHi library. GeSHi features, like line numbering and usage of an external CSS stylesheet for example, are not available.',
168            array('!highlight_string' => 'http://php.net/manual/en/function.highlight-string.php')),
169        '#default_value' => variable_get('geshifilter_use_highlight_string_for_php', FALSE),        '#default_value' => variable_get('geshifilter_use_highlight_string_for_php', FALSE),
170      );      );
171      // Option to disable Keyword URL's      // Option to disable Keyword URL's
172      $form['geshifilter_highlighting_options']['geshifilter_enable_keyword_urls'] = array(      $form['geshifilter_highlighting_options']['geshifilter_enable_keyword_urls'] = array(
173        '#type' => 'checkbox',        '#type' => 'checkbox',
174        '#title' => t('Enable GeSHi keyword URLs'),        '#title' => t('Enable GeSHi keyword URLs'),
175        '#description' => t('For some languages GeSHi can link language keywords (e.g. standard library functions) to their online documentation. (GeSHi documentation: !link)',        '#description' => t('For some languages GeSHi can link language keywords (e.g. standard library functions) to their online documentation. (GeSHi documentation: <a href="!link">Keyword URLs</a>).',
176          array('!link' => l('Keyword URLs', 'http://qbnz.com/highlighter/geshi-doc.html#keyword-urls'))),          array('!link' => 'http://qbnz.com/highlighter/geshi-doc.html#keyword-urls')),
177        '#default_value' => variable_get('geshifilter_enable_keyword_urls', TRUE),        '#default_value' => variable_get('geshifilter_enable_keyword_urls', TRUE),
178      );      );
179    
# Line 193  function geshifilter_admin_general_setti Line 194  function geshifilter_admin_general_setti
194          GESHIFILTER_CSS_CLASSES_ONLY => t('Only add CSS classes to the markup.'),          GESHIFILTER_CSS_CLASSES_ONLY => t('Only add CSS classes to the markup.'),
195        ),        ),
196        '#default_value' => variable_get('geshifilter_css_mode', GESHIFILTER_CSS_INLINE),        '#default_value' => variable_get('geshifilter_css_mode', GESHIFILTER_CSS_INLINE),
197        '#description' => t('Inline CSS is easier to set up, does not depend on an external style sheets and is consequently more robust to copy/paste operations like content aggregation. However, usage of CSS classes and an external stylesheet requires much less markup code and bandwidth. The external style sheet can be managed automatically by the GeSHi filter module, but this feature requires the public <a href="!filesystem">download method</a>. If the GeSHi filter is configured to only add the CSS classes to the markup, the administrator or themer is responsible for adding the appropriate CSS rules to the pages (e.g. based on <a href="!cssdefaults">these defaults</a>). (GeSHi documentation: !geshidoc).',        '#description' => t('Inline CSS is easier to set up, does not depend on an external style sheets and is consequently more robust to copy/paste operations like content aggregation. However, usage of CSS classes and an external stylesheet requires much less markup code and bandwidth. The external style sheet can be managed automatically by the GeSHi filter module, but this feature requires the public <a href="!filesystem">download method</a>. If the GeSHi filter is configured to only add the CSS classes to the markup, the administrator or themer is responsible for adding the appropriate CSS rules to the pages (e.g. based on <a href="!cssdefaults">these defaults</a>). (GeSHi documentation: <a href="!geshidoc">Using CSS Classes</a>).',
198          array(          array(
199            '!geshidoc' => l('Using CSS Classes', 'http://qbnz.com/highlighter/geshi-doc.html#using-css-classes'),            '!geshidoc' => 'http://qbnz.com/highlighter/geshi-doc.html#using-css-classes',
200            '!filesystem' => url('admin/settings/file-system'),            '!filesystem' => url('admin/settings/file-system'),
201            '!cssdefaults' => url('admin/settings/geshifilter/generate_css'),            '!cssdefaults' => url('admin/settings/geshifilter/generate_css'),
202          )),          )),
# Line 205  function geshifilter_admin_general_setti Line 206  function geshifilter_admin_general_setti
206      $form['geshifilter_styling']['geshifilter_code_container'] = array(      $form['geshifilter_styling']['geshifilter_code_container'] = array(
207        '#type' => 'radios',        '#type' => 'radios',
208        '#title' => t('Code container'),        '#title' => t('Code container'),
209        '#description' => t('Define the container element to use for code blocks. (GeSHi documentation: !link).',        '#description' => t('Define the container element to use for code blocks. (GeSHi documentation: <a href="!link">The Code Container</a>).',
210          array('!link' => l('The Code Container', 'http://qbnz.com/highlighter/geshi-doc.html#the-code-container'))          array('!link' => 'http://qbnz.com/highlighter/geshi-doc.html#the-code-container')
211        ),        ),
212        '#options' => array(        '#options' => array(
213          GESHI_HEADER_PRE => t('Use @cnt container (efficient whitespace coding, no automatic line wrapping)', array('@cnt' => '<pre>')),          GESHI_HEADER_PRE => t('Use @cnt container (efficient whitespace coding, no automatic line wrapping)', array('@cnt' => '<pre>')),
# Line 566  function _geshifilter_generate_languages Line 567  function _geshifilter_generate_languages
567        drupal_set_message(t('(Re)generated external CSS style sheet %file.', array('%file' => $ret)));        drupal_set_message(t('(Re)generated external CSS style sheet %file.', array('%file' => $ret)));
568      }      }
569      else {      else {
570        drupal_set_message(t('Could not generate external CSS file. Check the settings of your !filesystem.',        drupal_set_message(t('Could not generate external CSS file. Check the settings of your <a href="!filesystem">file system</a>.',
571          array('!filesystem' => l(t('file system'), 'admin/settings/file-system'))), 'error');          array('!filesystem' => url('admin/settings/file-system'))), 'error');
572      }      }
573      // Remember for which list of languages the CSS file was generated      // Remember for which list of languages the CSS file was generated
574      variable_set('geshifilter_cssfile_languages', $languages_hash);      variable_set('geshifilter_cssfile_languages', $languages_hash);

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.2