1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Legacy textparse class removed. Separate emote and profanity classes.

This commit is contained in:
Cameron
2021-01-14 17:26:15 -08:00
parent f7fdf19e24
commit d51f5cb936
8 changed files with 257 additions and 276 deletions

View File

@@ -402,6 +402,8 @@ if (!function_exists('asortbyindex'))
asort ($sort_values);
reset ($sort_values);
$sorted_arr = array();
foreach($sort_values as $arr_key =>$arr_val)
{
$sorted_arr[] = $array[$arr_key];
@@ -418,21 +420,17 @@ if (!function_exists('r_emote'))
*/
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;
}
$pack = e107::getPref('emotepack');
$list = e107::getEmote()->getList();
$str = '';
foreach($tp->e_emote->emotes as $key => $value) // filename => text code
foreach($list 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_ABS."emotes/" . $pref['emotepack'] . "/" .$key; // Add in the file path
$key = e_IMAGE_ABS."emotes/" . $pack . "/" .$key; // Add in the file path
$value2 = substr($value, 0, strpos($value, " "));
$value = ($value2 ? $value2 : $value);
@@ -509,6 +507,7 @@ if (!function_exists('multiarray_sort'))
$key = is_numeric($arr_key) ? "" : $arr_key; // retain assoc-array keys.
$sorted_arr[$key] = $array[$arr_key];
}*/
$sorted_arr = array();
foreach($sort_values as $arr_key=>$arr_val)
{