Some sweeping syntax changes for consistency:

(! foo) changed to ( ! foo)
|| changed to OR
changed newline standardization code in various places from preg_replace to str_replace
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index 2162ddd..8f75437 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -1,4 +1,4 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

 /**

  * CodeIgniter

  *

@@ -37,7 +37,7 @@
  * @param	string	field name

  * @return	string

  */	

-if (! function_exists('js_insert_smiley'))

+if ( ! function_exists('js_insert_smiley'))

 {

 	function js_insert_smiley($form_name = '', $form_field = '')

 	{

@@ -63,11 +63,11 @@
  * @param	string	the URL to the folder containing the smiley images

  * @return	array

  */	

-if (! function_exists('get_clickable_smileys'))

+if ( ! function_exists('get_clickable_smileys'))

 {

 	function get_clickable_smileys($image_url = '', $smileys = NULL)

 	{

-		if (! is_array($smileys))

+		if ( ! is_array($smileys))

 		{

 			if (FALSE === ($smileys = _get_smiley_array()))

 			{

@@ -111,7 +111,7 @@
  * @param	string	the URL to the folder containing the smiley images

  * @return	string

  */	

-if (! function_exists('parse_smileys'))

+if ( ! function_exists('parse_smileys'))

 {

 	function parse_smileys($str = '', $image_url = '', $smileys = NULL)

 	{

@@ -120,7 +120,7 @@
 			return $str;

 		}

 

-		if (! is_array($smileys))

+		if ( ! is_array($smileys))

 		{

 			if (FALSE === ($smileys = _get_smiley_array()))

 			{

@@ -150,18 +150,18 @@
  * @access	private

  * @return	mixed

  */	

-if (! function_exists('_get_smiley_array'))

+if ( ! function_exists('_get_smiley_array'))

 {

 	function _get_smiley_array()

 	{

-		if (! file_exists(APPPATH.'config/smileys'.EXT))

+		if ( ! file_exists(APPPATH.'config/smileys'.EXT))

 		{

 			return FALSE;

 		}

 

 		include(APPPATH.'config/smileys'.EXT);

 	

-		if (! isset($smileys) OR ! is_array($smileys))

+		if ( ! isset($smileys) OR ! is_array($smileys))

 		{

 			return FALSE;

 		}

@@ -170,6 +170,6 @@
 	}

 }

 

-
-/* End of file smiley_helper.php */
+

+/* End of file smiley_helper.php */

 /* Location: ./system/helpers/smiley_helper.php */
\ No newline at end of file