diff -urp smileys/smileys.info smileys_new/smileys.info
--- smileys/smileys.info	2008-01-26 12:07:17.000000000 +0000
+++ smileys_new/smileys.info	2008-02-26 21:45:28.763712100 +0000
@@ -1,19 +1,5 @@
-; $Id: smileys.info,v 1.1.2.6 2008/01/25 16:05:16 Gurpartap Exp $
+; $Id$
 name = Smileys
 description = Replaces smileys inside posts with images.
 package = Smileys
-; Information added by drupal.org packaging script on 2007-01-20
-project = "smileys"
-
-
-; Information added by drupal.org packaging script on 2007-07-16
-version = "5.x-1.x-dev"
-project = "smileys"
-datestamp = "1184544661"
-
-
-; Information added by drupal.org packaging script on 2008-01-26
-version = "5.x-1.x-dev"
-project = "smileys"
-datestamp = "1201349237"
-
+core = 6.x
\ No newline at end of file
diff -urp smileys/smileys.install smileys_new/smileys.install
--- smileys/smileys.install	2008-01-26 07:02:25.000000000 +0000
+++ smileys_new/smileys.install	2008-02-26 22:48:21.300312100 +0000
@@ -4,36 +4,61 @@
 /**
  * Implementation of hook_install().
  */
+function smileys_schema() {
+  $schema['smileys'] = array(
+    'description' => t('The base table for smileys.'),
+    'fields' => array(
+      'id' => array(
+        'description' => t('The primary identifier for a smiley.'),
+        'type' => 'serial',
+        'size' => 'normal'
+      ),
+      'acronyms' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => ''
+      ),
+      'image' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => ''
+      ),
+      'description' => array(
+        'type' => 'varchar',
+        'length' => 64,
+        'not null' => TRUE,
+        'default' => ''
+      ),
+      'standalone' => array(
+        'type' => 'int',
+        'size' => 'tiny',
+        'default' => 0,
+        'not null' => TRUE
+      ),
+      'promote_to_box' => array(
+        'type' => 'int',
+        'size' => 'tiny',
+        'default' => 1,
+        'not null' => TRUE
+      ),
+      'package' => array(
+        'type' => 'varchar',
+        'length' => 64,
+        'default' => 'Uncategorized',
+        'not null' => TRUE
+      ),
+    ),
+    'primary key' => array('id'),
+  );
+  return $schema;
+}
+ 
 function smileys_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      $result = db_query("CREATE TABLE IF NOT EXISTS {smileys} (
-        id int(11) auto_increment,
-        acronyms varchar(255) DEFAULT '' NOT NULL,
-        image varchar(255) DEFAULT '' NOT NULL,
-        description varchar(64) DEFAULT '' NOT NULL,
-        standalone tinyint(1) DEFAULT '0' NOT NULL,
-        promote_to_box tinyint(1) DEFAULT '1' NOT NULL,
-        package varchar(64) DEFAULT 'Uncategorized' NOT NULL,
-        PRIMARY KEY (id)
-      ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
-      break;
-    case 'pgsql':
-      $result = db_query("CREATE TABLE {smileys} (
-        id SERIAL,
-        acronyms varchar(255) DEFAULT '' NOT NULL,
-        image varchar(255) DEFAULT '' NOT NULL,
-        description varchar(64) DEFAULT '' NOT NULL,
-        standalone INT2 NOT NULL DEFAULT '0',
-        promote_to_box INT2 NOT NULL DEFAULT '1',
-        package varchar(64) DEFAULT 'Uncategorized' NOT NULL,
-        PRIMARY KEY (id)
-      )");
-      break;
-  }
+  $result = drupal_install_schema('smileys');
   if ($result) {
-    $dir = drupal_get_path('module', 'smileys'). '/packs/example/';
+    $dir = drupal_get_path('module', 'smileys') .'/packs/example/';
     $examples = array(
       array(':) :-) :smile:', 'smile.png', 'Smiling'),
       array(';) ;-) :wink:', 'wink.png', 'Eye-wink'),
@@ -57,7 +82,7 @@ function smileys_install() {
  * Implementation of hook_uninstall().
  */
 function smileys_uninstall() { 
-  db_query('DROP TABLE {smileys}');
+  drupal_uninstall_schema('smileys');
   variable_del('smileys_enable_for_comments');
   variable_del('smileys_enable_for_nodes');
 }
@@ -65,21 +90,3 @@ function smileys_uninstall() { 
 /**
  * Updates
  */
-function smileys_update_1() {
-  return _system_update_utf8(array('smileys'));
-}
-
-function smileys_update_2() {
-  $ret = array();
-  switch ($GLOBALS['db_type']) {
-    case 'pgsql':
-      db_add_column($ret, 'smileys', 'promote_to_box', 'INT2', array('default' => '1', 'not null' => TRUE, 'after' => 'standalone'));
-      break;
-
-    case 'mysql':
-    case 'mysqli':
-      $ret[] = update_sql("ALTER TABLE {smileys} ADD COLUMN promote_to_box tinyint(1) NOT NULL DEFAULT 1 AFTER standalone");
-  }
-
-  return $ret;
-}
diff -urp smileys/smileys.module smileys_new/smileys.module
--- smileys/smileys.module	2008-01-26 07:02:25.000000000 +0000
+++ smileys_new/smileys.module	2008-02-26 22:19:15.597912100 +0000
@@ -1,11 +1,11 @@
 <?php
-// $Id: smileys.module,v 1.47.2.13 2008/01/26 07:02:25 Gurpartap Exp $
+// $Id$
 
 /**
  * Implementation of hook_help().
  */
-function smileys_help($section) {
-  switch ($section) {
+function smileys_help($path, $arg) {
+  switch ($path) {
     case 'admin/settings/smileys':
     case 'admin/settings/smileys/list':
       return t('Here you can add/edit the Smileys that are recognised in your content. Select box shows only the promoted Smileys.');
@@ -24,11 +24,11 @@ function smileys_perm() {
  */
 function smileys_filter_tips($delta, $format, $long = false) {
   if ($long) {
-    return t('If you include a textual smiley in your post (see chart below), it will be replaced by a graphical smiley.') . '<br />' . smileys_table();
+    return t('If you include a textual smiley in your post (see chart below), it will be replaced by a graphical smiley.') .'<br />'. smileys_table();
   }
   else {
     $GLOBALS['display_smileys_block'] = true;
-    return t('<a href="!smileys_help">Textual smileys</a> will be replaced with graphical ones.', array('!smileys_help' => url('filter/tips/'.$format, NULL, 'filter-smileys-'.$delta)));
+    return t('<a href="!smileys_help">Textual smileys</a> will be replaced with graphical ones.', array('!smileys_help' => url('filter/tips/'. $format, NULL, 'filter-smileys-'. $delta)));
   }
 }
 
@@ -37,9 +37,9 @@ function _smileys_list($refresh = 0, $wh
   if (!$list || $refresh) {
     $list = array();
     if($whereclause != '') {
-     $whereclause = ' WHERE ' . $whereclause;
+     $whereclause = ' WHERE '. $whereclause;
     }
-    $result = db_query('SELECT * FROM {smileys} ' . $whereclause);
+    $result = db_query('SELECT * FROM {smileys} '. $whereclause);
     while ($object = db_fetch_object($result)) {
       $list[] = $object;
     }
@@ -68,7 +68,7 @@ function smileys_block($op = 'list', $de
 /**
  * Implementation of hook_form_alter().
  */
-function smileys_form_alter($form_id, &$form) {
+function smileys_form_alter(&$form, &$form_state, $form_id) {
   if ('comment_form' == $form_id) {
     $node_type = db_result(db_query('SELECT type FROM {node} WHERE nid=%d', $form['nid']['#value']));
   }
@@ -78,10 +78,10 @@ function smileys_form_alter($form_id, &$
 
   if (in_array($node_type, variable_get('smileys_node_types_content', array()), TRUE)) {
     if (user_access('use smiley select box')
-	&& ((isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) && variable_get('smileys_enable_for_nodes', 0) && isset($form['body_filter'])
-	|| ('comment_form' == $form_id && variable_get('smileys_enable_for_comments', 0))) ) {
+    && ((isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) && variable_get('smileys_enable_for_nodes', 0) && isset($form['body_filter'])
+    || ('comment_form' == $form_id && variable_get('smileys_enable_for_comments', 0))) ) {
       $output = '';
-	  if (array_key_exists('body_filter', $form)) {
+      if (array_key_exists('body_filter', $form)) {
         $key = 'body_filter';
       }
       elseif (array_key_exists('comment_filter', $form)) {
@@ -91,7 +91,7 @@ function smileys_form_alter($form_id, &$
         $key = 'smileys_wrapper';
       }
 
-	  $collapsed = variable_get('smileys_select_box_expanded', TRUE) ? FALSE : TRUE;
+      $collapsed = variable_get('smileys_select_box_expanded', TRUE) ? FALSE : TRUE;
       $form[$key]['smileys'] = array(
         '#type' => 'fieldset',
         '#title' => t('Smileys'),
@@ -113,7 +113,7 @@ function _smileys_select_table($promoted
   $content = '';
   if ($promoted == true) {
     $list = _smileys_list(1, " promote_to_box='1' ");
-	_smileys_list(1);
+    _smileys_list(1);
   }
   else {
     $list = _smileys_list();
@@ -201,7 +201,7 @@ function smileys_filter_process($text) {
 /**
  * Implementation of hook_menu().
  */
-function smileys_menu($may_cache) {
+function smileys_menu() {
   $items = array();
 
   // Add the JS and CSS
@@ -210,66 +210,64 @@ function smileys_menu($may_cache) {
   drupal_add_css($path .'/smileys.css');
   drupal_add_js(array('smileys' => array('basePath' => base_path() . (variable_get('clean_url', 0) ? '' : '?q='))), 'setting');
 
-  if ($may_cache) {
-    $access = user_access('administer smileys');
+    $access = 'administer smileys';
 
-    $items[] = array(
-      'path' => 'admin/settings/smileys',
-      'title' => t('Smileys'),
-      'description' => t('Manage Smileys and toggle select box behavior for nodes and comments.'),
-      'callback' => 'smileys_admin_list',
-      'access' => $access);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/list',
-      'title' => t('List'),
-      'callback' => 'smileys_admin_list',
-      'type' => MENU_DEFAULT_LOCAL_TASK,
-      'weight' => -10);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/add',
-      'title' => t('Add'),
-      'callback' => 'smileys_admin_add',
-      'access' => $access,
-      'type' => MENU_LOCAL_TASK);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/configure',
-      'title' => t('Settings'),
-      'description' => t('Smileys configuration.'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'smileys_admin_settings',
-      'access' => user_access('administer smileys'),
-      'weight' => 8,
-      'type' => MENU_LOCAL_TASK,);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/edit',
-      'title' => t('Edit smiley'),
-      'callback' => 'smileys_admin_add',
-      'access' => $access,
-      'type' => MENU_CALLBACK);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/delete',
-      'title' => t('Delete smiley'),
-      'callback' => 'smileys_admin_delete',
-      'access' => $access,
-      'type' => MENU_CALLBACK);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/promote',
-      'callback' => 'smileys_promote_handle',
-      'access' => $access,
-      'type' => MENU_CALLBACK);
-
-    $items[] = array(
-      'path' => 'smileys/fetch',
-      'callback' => 'smileys_list',
-      'access' => user_access('use smiley select box'),
-      'type' => MENU_CALLBACK);
-  }
+  $items['admin/settings/smileys'] = array(
+    'title' => 'Smileys',
+    'description' => 'Manage Smileys and toggle select box behavior for nodes and comments.',
+    'page callback' => 'smileys_admin_list',
+    'access callback' => 'user_access',
+    'access arguments' => $access);
+
+  $items['admin/settings/smileys/list'] = array(
+    'title' => 'List',
+    'page callback' => 'smileys_admin_list',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'weight' => -10);
+
+  $items['admin/settings/smileys/add'] = array(
+    'title' => 'Add',
+    'page callback' => 'smileys_admin_add',
+    'access callback' => 'user_access',
+    'access arguments' => $access,
+    'type' => MENU_LOCAL_TASK);
+
+  $items['admin/settings/smileys/configure'] = array(
+    'title' => 'Settings',
+    'description' => 'Smileys configuration.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => 'smileys_admin_settings',
+    'access callback' => 'user_access',
+    'access arguments' => 'administer smileys',
+    'weight' => 8,
+    'type' => MENU_LOCAL_TASK);
+
+  $items['admin/settings/smileys/edit'] = array(
+    'title' => 'Edit smiley',
+    'page callback' => 'smileys_admin_add',
+    'access callback' => 'user_access',
+    'access arguments' => $access,
+    'type' => MENU_CALLBACK);
+
+  $items['admin/settings/smileys/delete'] = array(
+    'title' => 'Delete smiley',
+    'page callback' => 'smileys_admin_delete',
+    'access callback' => 'user_access',
+    'access' => $access,
+    'type' => MENU_CALLBACK);
+
+  $items['admin/settings/smileys/promote'] = array(
+    'page callback' => 'smileys_promote_handle',
+    'access callback' => 'user_access',
+    'access arguments' => $access,
+    'type' => MENU_CALLBACK);
+
+  $items['smileys/fetch'] = array(
+    'page callback' => 'smileys_list',
+    'access callback' => 'user_access',
+    'access arguments' => 'use smiley select box',
+    'type' => MENU_CALLBACK);
+	  
   return $items;
 }
 
@@ -334,18 +332,18 @@ function smileys_admin_list() {
     $list = _smileys_list(1, " package = '$package' ");
     foreach ($list as $smiley) {
       $each_acronym = explode(' ', $smiley->acronyms);
-	  $promoted = ($smiley->promote_to_box ? '<span class="smiley-selected" id="'. $smiley->id .'"> </span>' : '<span class="smiley-deselected" id="'. $smiley->id .'"> </span>');
+      $promoted = ($smiley->promote_to_box ? '<span class="smiley-selected" id="'. $smiley->id .'"> </span>' : '<span class="smiley-deselected" id="'. $smiley->id .'"> </span>');
       foreach ($each_acronym as $key => $eac) {
         $eac = str_replace("&lt;", "<", $eac);
         $eac = str_replace("&gt;", ">", $eac);
         $acronyms .= '<span style="color:'. ($key % 2 == 0 ? "#000000" : "#53616e") .';">'. check_plain($eac) .'</span>&nbsp;';
       }
       $rows[] = array(
-	    $promoted,
+        $promoted,
         '<img src="'. check_url($GLOBALS['base_url'] .'/'. $smiley->image) .'" alt="'. check_plain($smiley->description) .'" />',
         $acronyms,
         check_plain($smiley->description),
-        l(t('Edit'), 'admin/settings/smileys/edit/'. $smiley->id) . ' · ' . l(t('Delete'), 'admin/settings/smileys/delete/'. $smiley->id),
+        l(t('Edit'), 'admin/settings/smileys/edit/'. $smiley->id) .' · '. l(t('Delete'), 'admin/settings/smileys/delete/'. $smiley->id),
       );
 $acronyms = '';
     }
@@ -379,11 +377,11 @@ $acronyms = '';
 function smileys_promote_handle($action, $id = NULL) {
   if (!empty($id) && ($action == 0 || $action == 1)) {
     db_query('UPDATE {smileys} SET promote_to_box=%d WHERE id=%d', $action, $id);
-	exit();
+    exit();
   }
   else {
     drupal_access_denied();
-	return;
+    return;
   }
 }
 
@@ -408,18 +406,18 @@ function smileys_admin_form($edit = arra
 /**
  * Implementation of hook_submit().
  */
-function smileys_admin_form_submit($form_id, $form_values) {
-  if (isset($form_values['id'])) {
-    if ($form_values['op'] == t('Delete Smiley')) {
-      smileys_admin_delete($form_values['id']);
+function smileys_admin_form_submit($form, &$form_state) {
+  if (isset($form_state['values']['id'])) {
+    if ($form_state['values']['op'] == t('Delete Smiley')) {
+      smileys_admin_delete($form_state['values']['id']);
       return 'admin/settings/smileys';
     }
-    db_query("UPDATE {smileys} SET acronyms='%s', image='%s', description='%s', standalone=%d, promote_to_box=%d WHERE id = %d", $form_values['acronyms'], $form_values['image'], $form_values['description'], $form_values['standalone'], $form_values['promote_to_box'], $form_values['id']);
-    $message = t('Updated smiley: %smiley', array('%smiley' => $form_values['acronyms']));
+    db_query("UPDATE {smileys} SET acronyms='%s', image='%s', description='%s', standalone=%d, promote_to_box=%d WHERE id = %d", $form_state['values']['acronyms'], $form_state['values']['image'], $form_state['values']['description'], $form_state['values']['standalone'], $form_state['values']['promote_to_box'], $form_state['values']['id']);
+    $message = t('Updated smiley: %smiley', array('%smiley' => $form_state['values']['acronyms']));
   }
   else {
-    db_query("INSERT INTO {smileys} (acronyms, image, description, standalone, promote_to_box) VALUES ('%s', '%s', '%s', %d, %d)", $form_values["acronyms"], $form_values["image"], $form_values["description"], $form_values["standalone"], $form_values['promote_to_box']);
-    $message = t('Added smiley: %smiley', array('%smiley' => $form_values['acronyms']));
+    db_query("INSERT INTO {smileys} (acronyms, image, description, standalone, promote_to_box) VALUES ('%s', '%s', '%s', %d, %d)", $form_state['values']["acronyms"], $form_state['values']["image"], $form_state['values']["description"], $form_state['values']["standalone"], $form_state['values']['promote_to_box']);
+    $message = t('Added smiley: %smiley', array('%smiley' => $form_state['values']['acronyms']));
   }
 
   drupal_set_message($message);
@@ -429,12 +427,12 @@ function smileys_admin_form_submit($form
 /**
  * Implementation of hook_validate().
  */
-function smileys_admin_form_validate($form_id, $form_values) {
-  if (trim($form_values['acronyms']) == t('Delete Smiley')) {
+function smileys_admin_form_validate($form, &$form_state) {
+  if (trim($form_state['values']['acronyms']) == t('Delete Smiley')) {
     form_set_error('acronyms', t('Please enter an acronym for your smiley.'));
   }
 
-  if ($form_values['image'] == '') {
+  if ($form_state['values']['image'] == '') {
     form_set_error('image', t('Please enter the URL of the smiley image.'));
   }
   return !form_get_errors();
diff -urp smileys/smileys_import.info smileys_new/smileys_import.info
--- smileys/smileys_import.info	2008-01-26 12:07:17.000000000 +0000
+++ smileys_new/smileys_import.info	2008-02-26 22:27:15.812712100 +0000
@@ -1,20 +1,7 @@
-; $Id: smileys_import.info,v 1.1.2.6 2008/01/25 16:05:16 Gurpartap Exp $
+; $Id$
 name = Smileys Import
 description = Enables import of Smiley sets.
-dependencies = smileys
+dependencies[] = smileys
 package = Smileys
-; Information added by drupal.org packaging script on 2007-01-20
-project = "smileys"
-
-
-; Information added by drupal.org packaging script on 2007-07-16
-version = "5.x-1.x-dev"
-project = "smileys"
-datestamp = "1184544661"
-
-
-; Information added by drupal.org packaging script on 2008-01-26
-version = "5.x-1.x-dev"
-project = "smileys"
-datestamp = "1201349237"
+core = 6.x
 
diff -urp smileys/smileys_import.module smileys_new/smileys_import.module
--- smileys/smileys_import.module	2008-01-25 16:05:16.000000000 +0000
+++ smileys_new/smileys_import.module	2008-02-26 22:34:46.824312100 +0000
@@ -1,11 +1,11 @@
 <?php
-// $Id: smileys_import.module,v 1.1.2.7 2008/01/25 16:05:16 Gurpartap Exp $
+// $Id$
 
 /**
  * Implementation of hook_help().
  */
-function smileys_import_help($section) {
-  switch ($section) {
+function smileys_import_help($path, $arg) {
+  switch ($path) {
     case 'admin/settings/smileys/import':
       return t('Here you can install/uninstall smiley import packs.');
   }
@@ -14,40 +14,39 @@ function smileys_import_help($section) {
 /**
  * Implementation of hook_menu().
  */
-function smileys_import_menu($may_cache) {
+function smileys_import_menu() {
   $items = array();
 
-  if ($may_cache) {
-    $access = user_access('administer smileys');
+  $access = 'administer smileys';
+
+  $items['admin/settings/smileys/import'] = array(
+    'title' => 'Import',
+    'page callback' => 'smileys_import_page',
+    'access callback' => 'user_access',
+    'access arguments' => $access,
+    'weight' => 2,
+    'type' => MENU_LOCAL_TASK);
+
+  $items['admin/settings/smileys/export'] = array(
+    'title' => 'Export',
+    'page callback' => 'smileys_export_page',
+    'access callback' => 'user_access',
+    'access arguments' => $access,
+    'weight' => 3,
+    'type' => MENU_LOCAL_TASK);
+
+  $items['admin/settings/smileys/import/add'] = array(
+    'page callback' => 'smileys_import_add',
+    'access callback' => 'user_access',
+    'access arguments' => $access,
+    'type' => MENU_CALLBACK);
+
+  $items['admin/settings/smileys/import/delete'] = array(
+    'page callback' => 'smileys_import_delete',
+    'access callback' => 'user_access',
+    'access arguments' => $access,
+    'type' => MENU_CALLBACK);
 
-    $items[] = array(
-      'path' => 'admin/settings/smileys/import',
-      'title' => t('Import'),
-      'callback' => 'smileys_import_page',
-      'access' => $access,
-      'weight' => 2,
-      'type' => MENU_LOCAL_TASK);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/export',
-      'title' => t('Export'),
-      'callback' => 'smileys_export_page',
-      'access' => $access,
-      'weight' => 3,
-      'type' => MENU_LOCAL_TASK);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/import/add',
-      'callback' => 'smileys_import_add',
-      'access' => $access,
-      'type' => MENU_CALLBACK);
-
-    $items[] = array(
-      'path' => 'admin/settings/smileys/import/delete',
-      'callback' => 'smileys_import_delete',
-      'access' => $access,
-      'type' => MENU_CALLBACK);
-  }
   return $items;
 }
 
@@ -62,7 +61,7 @@ function smileys_import_page() {
     $smileyp = db_fetch_array(db_query("SELECT * FROM {smileys} WHERE package = '%s'", $pack->name));
     $option_link = $smileyp ? l(t('Uninstall'), 'admin/settings/smileys/import/delete/'. $pack->name) : l(t('Install'), 'admin/settings/smileys/import/add/'. $pack->name);
     $rows[] = array(
-      '<strong>' . $pack->name . '</strong>',
+      '<strong>'. $pack->name .'</strong>',
        $option_link
     );
   }
@@ -88,12 +87,12 @@ function smileys_export_page() {
     $smile_pak = "";
     $delimeter  = '=+:';
     while ($smiley = db_fetch_object($smileys)) {
-      $smile_pak .= str_replace(dirname($packd->filename) . '/', '', $smiley->image) . $delimeter;
+      $smile_pak .= str_replace(dirname($packd->filename) .'/', '', $smiley->image) . $delimeter;
       $smile_pak .= $smiley->description . $delimeter;
-      $smile_pak .= $smiley->acronyms . "\n";
+      $smile_pak .= $smiley->acronyms ."\n";
     }
     $output  = "<div id=\"module-message\">\n";
-    $output .= t('Please copy and paste the following text into a file at:<br /><strong>%package</strong><br /><em>with each smiley image in the same folder.</em>', array('%package' => $path . '/packs/' . $package . '/' . $package . '.pak')) . "\n";
+    $output .= t('Please copy and paste the following text into a file at:<br /><strong>%package</strong><br /><em>with each smiley image in the same folder.</em>', array('%package' => $path .'/packs/'. $package .'/'. $package .'.pak')) ."\n";
     $output .= "</div>\n";
     $output .= "<div id=\"module-code\">\n";
     $output .= "<textarea cols=\"80\" rows=\"15\">\n";
@@ -109,7 +108,7 @@ function smileys_export_page() {
       if ($pack->package != 'Uncategorized') {
       $packs[] = $pack->package;
       $rows[] = array(
-        '<strong>' . $pack->package . '</strong>',
+        '<strong>'. $pack->package .'</strong>',
          l(t('Export'), 'admin/settings/smileys/export/'. $pack->package)
       );
       }
@@ -127,7 +126,7 @@ function smileys_export_page() {
  * Custom callback; Scan for available packs.
  */
 function smileys_import_packs($a = NULL) {
-  $packs = file_scan_directory(drupal_get_path('module', 'smileys') . '/packs', '\.pak$');
+  $packs = file_scan_directory(drupal_get_path('module', 'smileys') .'/packs', '\.pak$');
   ksort($packs);
   $pack_names = array();
   if ($a) {
@@ -165,7 +164,7 @@ function smileys_import_add($packname) {
     drupal_set_message(t('Cannot find smiley package %pack.', array('%pack' => $pack)));
     drupal_goto('admin/settings/smileys/import');
   }
-  $fcontents = @file(dirname($packd->filename) . '/' . $pack . '.pak');
+  $fcontents = @file(dirname($packd->filename) .'/'. $pack .'.pak');
 
   for ($i = 0; $i < count($fcontents); $i++) {
     $smile_data = explode($delimeter, trim(addslashes($fcontents[$i])));
@@ -173,7 +172,7 @@ function smileys_import_add($packname) {
       $smile_data[$j] = str_replace("<", "&lt;", $smile_data[$j]);
       $smile_data[$j] = str_replace(">", "&gt;", $smile_data[$j]);
       $k = $smile_data[$j];
-      db_query("INSERT INTO {smileys} (acronyms, image, description, standalone, package) VALUES('%s', '%s', '%s', %d, '%s')", str_replace("\'", "''", $smile_data[$j]), dirname($packd->filename) . '/' . str_replace("\'", "''", $smile_data[0]), str_replace("\'", "''", $smile_data[1]), 1, $pack);
+      db_query("INSERT INTO {smileys} (acronyms, image, description, standalone, package) VALUES('%s', '%s', '%s', %d, '%s')", str_replace("\'", "''", $smile_data[$j]), dirname($packd->filename) .'/'. str_replace("\'", "''", $smile_data[0]), str_replace("\'", "''", $smile_data[1]), 1, $pack);
     }
   }
   drupal_set_message(t('Smiley package %pack installed.', array('%pack' => $pack)));
