function smiley_import_packs_plist in Smiley 6
2 calls to smiley_import_packs_plist()
- smiley_import_packs in ./
smiley_import.module - Custom callback; Scan for available packs.
- smiley_import_parse_plist in ./
smiley_import.module - Custom callback; Parse the plist information for a smiley package.
File
- ./
smiley_import.module, line 144
Code
function smiley_import_packs_plist(&$packs) {
$plists = file_scan_directory(drupal_get_path('module', 'smiley') . '/packs', '\\.plist$');
$files_directory = file_directory_path() . '/smiley';
file_check_directory($file_directory, TRUE);
$plists_from_files = file_scan_directory($files_directory, '\\.plist$');
$plists = array_merge($plists, $plists_from_files);
foreach ($plists as $key => $plist) {
$plists[$key]->name = str_ireplace(array(
drupal_get_path('module', 'smiley') . '/packs/',
'.AdiumEmoticonset',
'/Emoticons.plist',
), '', $plist->filename);
}
if (!empty($packs)) {
$packs = array_merge($packs, $plists);
}
else {
$packs = $plists;
}
}