1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00

Consolidate parsing classes into single file.

This commit is contained in:
Cameron
2013-05-20 17:10:38 -07:00
parent e55b3cbbd9
commit 4581b9986c
13 changed files with 234 additions and 53 deletions

View File

@@ -260,6 +260,44 @@ if (!function_exists('asortbyindex'))
}
}
if (!function_exists('r_emote'))
{
/**
* @DEPRECATED
*/
function r_emote()
{
global $sysprefs, $pref;
$tp = e107::getParser();
if (!is_object($tp->e_emote))
{
// require_once(e_HANDLER.'emote_filter.php');
$tp->e_emote = new e_emoteFilter;
}
$str = '';
foreach($tp->e_emote->emotes as $key => $value) // filename => text code
{
$key = str_replace("!", ".", $key); // Usually '.' was replaced by '!' when saving
$key = preg_replace("#_(\w{3})$#", ".\\1", $key); // '_' followed by exactly 3 chars is file extension
$key = e_IMAGE."emotes/" . $pref['emotepack'] . "/" .$key; // Add in the file path
$value2 = substr($value, 0, strpos($value, " "));
$value = ($value2 ? $value2 : $value);
$value = ($value == '&|') ? ':((' : $value;
$value = " ".$value." ";
//TODO CSS class
$str .= "\n<a href=\"javascript:addtext('$value',true)\"><img src='$key' alt='' /></a> ";
}
return "<div class='spacer'>".$str."</div>";
}
}
if (!function_exists('multiarray_sort'))
{