function geshifilter_install in GeSHi Filter for syntax highlighting 6
Same name and namespace in other branches
- 8.2 geshifilter.install \geshifilter_install()
- 8 geshifilter.install \geshifilter_install()
- 5.2 geshifilter.install \geshifilter_install()
- 7 geshifilter.install \geshifilter_install()
Implementation of 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">input formats</a>.', array(
'!geshi_admin' => url('admin/settings/geshifilter'),
'!input_formats' => url('admin/settings/filters'),
)));
}