You are here

function smileys_import_add in Smileys 6

Same name and namespace in other branches
  1. 5 smileys_import.module \smileys_import_add()

Menu callback; Add a Smiley pack.

1 string reference to 'smileys_import_add'
smileys_import_menu in ./smileys_import.module
Implementation of hook_menu().

File

./smileys_import.module, line 249

Code

function smileys_import_add($packname) {
  $pack = $packname ? $packname : arg(5);
  $type = smileys_import_check_type($pack);
  if ($type == 'plist') {
    smileys_import_add_plist($pack, '.AdiumEmoticonset');
  }
  else {
    if ($type == 'plist2') {
      smileys_import_add_plist($pack);
    }
    else {
      smileys_import_add_pak($pack);
    }
  }
  drupal_set_message(t('Smiley package %pack installed.', array(
    '%pack' => $pack,
  )));
  drupal_goto('admin/settings/smileys/import');
}