function fckeditor_load_skin_options in FCKeditor - WYSIWYG HTML editor 6
Same name and namespace in other branches
- 5.2 fckeditor.module \fckeditor_load_skin_options()
- 6.2 fckeditor.lib.inc \fckeditor_load_skin_options()
2 calls to fckeditor_load_skin_options()
- fckeditor_profile_form_build in ./
fckeditor.module - Return an HTML form for profile configuration.
- fckeditor_user in ./
fckeditor.module - Implementation of hook_user().
File
- ./
fckeditor.module, line 1429 - FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben
Code
function fckeditor_load_skin_options() {
$arr = array();
$module_drupal_path = drupal_get_path('module', 'fckeditor');
$skin_dir = $module_drupal_path . '/fckeditor/editor/skins';
if (is_dir($skin_dir)) {
$dh = @opendir($skin_dir);
if (FALSE !== $dh) {
while (($file = readdir($dh)) !== FALSE) {
if (in_array($file, array(
".",
"..",
"CVS",
".svn",
))) {
continue;
}
if (is_dir($skin_dir . DIRECTORY_SEPARATOR . $file)) {
$arr[$file] = ucfirst($file);
}
}
closedir($dh);
}
}
//oops, we have no information about skins, let's use only default
if (empty($arr)) {
$arr = array(
'default' => 'Default',
);
}
asort($arr);
return $arr;
}