<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');/** * CodeIgniter * * An open source application development framework for PHP 4.3.2 or newer * * @package		CodeIgniter * @author		Rick Ellis * @copyright	Copyright (c) 2006, EllisLab, Inc. * @license		http://www.codeigniter.com/user_guide/license.html * @link		http://www.codeigniter.com * @since		Version 1.0 * @filesource */// ------------------------------------------------------------------------/** * CodeIgniter Text Helpers * * @package		CodeIgniter * @subpackage	Helpers * @category	Helpers * @author		Rick Ellis * @link		http://www.codeigniter.com/user_guide/helpers/text_helper.html */// ------------------------------------------------------------------------/** * Word Limiter * * Limits a string to X number of words. * * @access	public * @param	string * @param	integer * @param	string	the end character. Usually an ellipsis * @return	string */	function word_limiter($str, $n = 100, $end_char = '&#8230;'){	if (strlen($str) < $n)	{		return $str;	}		$words = explode(' ', preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str)));		if (count($words) <= $n)	{		return $str;	}				$str = '';	for ($i = 0; $i < $n; $i++)	{		$str .= $words[$i].' ';	}	return trim($str).$end_char;}	// ------------------------------------------------------------------------/** * Character Limiter * * Limits the string based on the character count.  Preserves complete words * so the character count may not be exactly as specified. * * @access	public * @param	string * @param	integer * @param	string	the end character. Usually an ellipsis * @return	string */	function character_limiter($str, $n = 500, $end_char = '&#8230;'){	if (strlen($str) < $n)	{		return $str;	}			$str = preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str));	if (strlen($str) <= $n)	{		return $str;	}										$out = "";	foreach (explode(' ', trim($str)) as $val)	{		$out .= $val.' ';					if (strlen($out) >= $n)		{			return trim($out).$end_char;		}			}}	// ------------------------------------------------------------------------/** * High ASCII to Entities * * Converts High ascii text and MS Word special characters to character entities * * @access	public * @param	string * @return	string */	function ascii_to_entities($str){   $count	= 1;   $out	= '';   $temp	= array();	   for ($i = 0, $s = strlen($str); $i < $s; $i++)   {	   $ordinal = ord($str[$i]);		   if ($ordinal < 128)	   {		   $out .= $str[$i];	   }	   else	   {		   if (count($temp) == 0)		   {			   $count = ($ordinal < 224) ? 2 : 3;		   }				   $temp[] = $ordinal;				   if (count($temp) == $count)		   {			   $number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);			   $out .= '&#'.$number.';';			   $count = 1;			   $temp = array();		   }	   }   }   return $out;}	// ------------------------------------------------------------------------/** * Entities to ASCII * * Converts character entities back to ASCII * * @access	public * @param	string * @param	bool * @return	string */	function entities_to_ascii($str, $all = TRUE){   if (preg_match_all('/\&#(\d+)\;/', $str, $matches))   {	   for ($i = 0, $s = count($matches['0']); $i < $s; $i++)	   {						   $digits = $matches['1'][$i];		   $out = '';		   if ($digits < 128)		   {			   $out .= chr($digits);				   }		   elseif ($digits < 2048)		   {			   $out .= chr(192 + (($digits - ($digits % 64)) / 64));			   $out .= chr(128 + ($digits % 64));		   }		   else		   {			   $out .= chr(224 + (($digits - ($digits % 4096)) / 4096));			   $out .= chr(128 + ((($digits % 4096) - ($digits % 64)) / 64));			   $out .= chr(128 + ($digits % 64));		   }		   $str = str_replace($matches['0'][$i], $out, $str);					   }   }   if ($all)   {	   $str = str_replace(array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "&#45;"),						  array("&","<",">","\"", "'", "-"),						  $str);   }   return $str;}	// ------------------------------------------------------------------------/** * Word Censoring Function * * Supply a string and an array of disallowed words and any * matched words will be converted to #### or to the replacement * word you've submitted. * * @access	public * @param	string	the text string * @param	string	the array of censoered words * @param	string	the optional replacement value * @return	string */	function word_censor($str, $censored, $replacement = ''){	if ( ! is_array($censored))	{		return $str;	}	$str = ' '.$str.' ';	foreach ($censored as $badword)	{		if ($replacement != '')		{			$str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword)).")\b/i", $replacement, $str);		}		else		{			$str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword)).")\b/ie", "str_repeat('#', strlen('\\1'))", $str);		}	}		return trim($str);}	// ------------------------------------------------------------------------/** * Code Highlighter * * Colorizes code strings * * @access	public * @param	string	the text string * @return	string */	function highlight_code($str){			// The highlight string function encodes and highlights	// brackets so we need them to start raw	$str = str_replace(array('&lt;', '&gt;'), array('<', '>'), $str);		// Replace any existing PHP tags to temporary markers so they don't accidentally	// break the string out of PHP, and thus, thwart the highlighting.		$str = str_replace(array('&lt;?php', '?&gt;',  '\\'), array('phptagopen', 'phptagclose', 'backslashtmp'), $str);			// The highlight_string function requires that the text be surrounded	// by PHP tags.  Since we don't know if A) the submitted text has PHP tags,	// or B) whether the PHP tags enclose the entire string, we will add our	// own PHP tags around the string along with some markers to make replacement easier later		$str = '<?php //tempstart'."\n".$str.'//tempend ?>';		// All the magic happens here, baby!	$str = highlight_string($str, TRUE);	// Prior to PHP 5, the highlight function used icky font tags	// so we'll replace them with span tags.		if (abs(phpversion()) < 5)	{		$str = str_replace(array('<font ', '</font>'), array('<span ', '</span>'), $str);		$str = preg_replace('#color="(.*?)"#', 'style="color: \\1"', $str);	}		// Remove our artificially added PHP	$str = preg_replace("#\<code\>.+?//tempstart\<br />\</span\>#is", "<code>\n", $str);	$str = preg_replace("#\<code\>.+?//tempstart\<br />#is", "<code>\n", $str);	$str = preg_replace("#//tempend.+#is", "</span>\n</code>", $str);		// Replace our markers back to PHP tags.	$str = str_replace(array('phptagopen', 'phptagclose', 'backslashtmp'), array('&lt;?php', '?&gt;', '\\'), $str); //<?					return $str;}	// ------------------------------------------------------------------------/** * Phrase Highlighter * * Highlights a phrase within a text string * * @access	public * @param	string	the text string * @param	string	the phrase you'd like to highlight * @param	string	the openging tag to precede the phrase with * @param	string	the closing tag to end the phrase with * @return	string */	function highlight_phrase($str, $phrase, $tag_open = '<strong>', $tag_close = '</strong>'){	if ($str == '')	{		return '';	}		if ($phrase != '')	{		return preg_replace('/('.preg_quote($phrase, '/').')/i', $tag_open."\\1".$tag_close, $str);	}	return $str;}	// ------------------------------------------------------------------------/** * Word Wrap * * Wraps text at the specified character.  Maintains the integrity of words. * Anything placed between {unwrap}{/unwrap} will not be word wrapped, nor * will URLs. * * @access	public * @param	string	the text string * @param	integer	the number of characters to wrap at * @return	string */	function word_wrap($str, $charlim = '76'){	// Se the character limit	if ( ! is_numeric($charlim))		$charlim = 76;		// Reduce multiple spaces	$str = preg_replace("| +|", " ", $str);		// Standardize newlines	$str = preg_replace("/\r\n|\r/", "\n", $str);		// If the current word is surrounded by {unwrap} tags we'll 	// strip the entire chunk and replace it with a marker.	$unwrap = array();	if (preg_match_all("|(\{unwrap\}.+?\{/unwrap\})|s", $str, $matches))	{		for ($i = 0; $i < count($matches['0']); $i++)		{			$unwrap[] = $matches['1'][$i];							$str = str_replace($matches['1'][$i], "{{unwrapped".$i."}}", $str);		}	}		// Use PHP's native function to do the initial wordwrap.  	// We set the cut flag to FALSE so that any individual words that are 	// too long get left alone.  In the next step we'll deal with them.	$str = wordwrap($str, $charlim, "\n", FALSE);		// Split the string into individual lines of text and cycle through them	$output = "";	foreach (explode("\n", $str) as $line) 	{		// Is the line within the allowed character count?		// If so we'll join it to the output and continue		if (strlen($line) <= $charlim)		{			$output .= $line."\n";						continue;		}					$temp = '';		while((strlen($line)) > $charlim) 		{			// If the over-length word is a URL we won't wrap it			if (preg_match("!\[url.+\]|://|wwww.!", $line))			{				break;			}			// Trim the word down			$temp .= substr($line, 0, $charlim-1);			$line = substr($line, $charlim-1);		}				// If $temp contains data it means we had to split up an over-length 		// word into smaller chunks so we'll add it back to our current line		if ($temp != '')		{			$output .= $temp . "\n" . $line; 		}		else		{			$output .= $line;		}		$output .= "\n";	}	// Put our markers back	if (count($unwrap) > 0)	{			foreach ($unwrap as $key => $val)		{			$output = str_replace("{{unwrapped".$key."}}", $val, $output);		}	}	// Remove the unwrap tags	$output = str_replace(array('{unwrap}', '{/unwrap}'), '', $output);	return $output;	} ?>