1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

42 lines
1.1 KiB
PHP
Raw Normal View History

2006-12-02 04:36:16 +00:00
<?php
/**
2009-11-12 15:11:17 +00:00
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
2009-11-12 15:11:17 +00:00
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* @DEPRECATED FILE
2009-11-12 15:11:17 +00:00
*/
2006-12-02 04:36:16 +00:00
if (!defined('e107_INIT')) { exit; }
/*
2006-12-02 04:36:16 +00:00
function r_emote()
{
global $sysprefs, $pref, $tp;
if (!is_object($tp->e_emote))
{
require_once(e_HANDLER.'emote_filter.php');
$tp->e_emote = new e_emoteFilter;
}
2007-04-15 16:07:39 +00:00
$str = '';
foreach($tp->e_emote->emotes as $key => $value) // filename => text code
2006-12-02 04:36:16 +00:00
{
$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
2006-12-02 04:36:16 +00:00
$value2 = substr($value, 0, strpos($value, " "));
$value = ($value2 ? $value2 : $value);
$value = ($value == '&|') ? ':((' : $value;
$value = " ".$value." ";
2009-07-25 07:54:36 +00:00
//TODO CSS class
$str .= "\n<a href=\"javascript:addtext('$value',true)\"><img src='$key' alt='' /></a> ";
2006-12-02 04:36:16 +00:00
}
return "<div class='spacer'>".$str."</div>";
}
*/
2006-12-02 04:36:16 +00:00
?>