You are here

function geshifilter_install in GeSHi Filter for syntax highlighting 7

Same name and namespace in other branches
  1. 8.2 geshifilter.install \geshifilter_install()
  2. 8 geshifilter.install \geshifilter_install()
  3. 5.2 geshifilter.install \geshifilter_install()
  4. 6 geshifilter.install \geshifilter_install()

Implements hook_install().

File

./geshifilter.install, line 11
Installation and uninstallation functions for the GeSHi filter.

Code

function geshifilter_install() {

  // Enable some popular languages and set their language tags by default
  $languages = array(
    'php',
    'drupal5',
    'drupal6',
    'javascript',
    'java',
    'c',
    'cpp',
    'python',
    'ruby',
  );
  foreach ($languages as $language) {
    variable_set('geshifilter_language_enabled_' . $language, TRUE);
    variable_set('geshifilter_language_tags_' . $language, '<' . $language . '>');
  }

  // what to do next?
  drupal_set_message(t('GeSHi filter is installed. You should now <a href="!geshi_admin">configure the GeSHi filter</a> and enable it in the desired <a href="!input_formats">text formats</a>.', array(
    '!geshi_admin' => url('admin/config/content/formats/geshifilter'),
    '!input_formats' => url('admin/config/content/formats'),
  )));
}