You are here

function smiley_import_add in Smiley 6

Menu callback; Add a Smiley pack.

1 string reference to 'smiley_import_add'
smiley_import_menu in ./smiley_import.module
Implementation of hook_menu().

File

./smiley_import.module, line 249

Code

function smiley_import_add($packname) {
  $pack = $packname ? $packname : arg(5);
  $type = smiley_import_check_type($pack);
  if ($type == 'plist') {
    smiley_import_add_plist($pack, '.AdiumEmoticonset');
  }
  else {
    if ($type == 'plist2') {
      smiley_import_add_plist($pack);
    }
    else {
      smiley_import_add_pak($pack);
    }
  }
  drupal_set_message(t('Smiley package %pack installed.', array(
    '%pack' => $pack,
  )));
  drupal_goto('admin/settings/smiley/import');
}