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:
@@ -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'))
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user