CODE
Find :
function html_add_smilie_box($in_html="")
{
global $ibforums, $DB;
$show_table = 0;
$count = 0;
$smilies = "<tr align='center'>\n";
Add below :
// SEN
$m_id = $ibforums->member['id'];
$DB->simple_construct( array( 'select' => 'emo_fav', 'from' => 'member_extra','where' => "id='$m_id'" ) );
$DB->simple_exec();
$r_emo_fav = $DB->fetch_row();
if (($r_emo_fav['emo_fav'])&&( $in_html !=""))
{
$string_emo_fav = $r_emo_fav['emo_fav'];
$ibforums->cache['emo_fav'] = array();
$ibforums->cache['emoticons'] = array();
$DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' , 'where' => "id IN($string_emo_fav)") );
$DB->simple_exec();
while ( $r_emo = $DB->fetch_row() )
{
$ibforums->cache['emo_def'][] = $r_emo;
}
foreach( $ibforums->cache['emo_def'] as $emo_def_id => $emo_def )
{
$ibforums->cache['emoticons'][] = array ('typed' => $emo_def['typed'],'image' => $emo_def['image'] , 'clickable' => '1' , 'emo_set' => $emo_def['emo_set']);
}
}
else
{
// END SEN
Find :
usort( $ibforums->cache['emoticons'] , array( 'post', 'smilie_alpha_sort' ) );
Add above :
// SEN
}
// END SEN
I found that you can just put it around things like this:
CODE
// SEN
$m_id = $ibforums->member['id'];
$DB->simple_construct( array( 'select' => 'emo_fav', 'from' => 'member_extra','where' => "id='$m_id'" ) );
$DB->simple_exec();
$r_emo_fav = $DB->fetch_row();
if (($r_emo_fav['emo_fav'])&&( $in_html !=""))
{
$string_emo_fav = $r_emo_fav['emo_fav'];
$ibforums->cache['emo_fav'] = array();
$ibforums->cache['emoticons'] = array();
$DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' , 'where' => "id IN($string_emo_fav)") );
$DB->simple_exec();
while ( $r_emo = $DB->fetch_row() )
{
$ibforums->cache['emo_def'][] = $r_emo;
}
foreach( $ibforums->cache['emo_def'] as $emo_def_id => $emo_def )
{
$ibforums->cache['emoticons'][] = array ('typed' => $emo_def['typed'],'image' => $emo_def['image'] , 'clickable' => '1' , 'emo_set' => $emo_def['emo_set']);
}
}
else
{
// END SEN
//------------------------------
// Get the smilies from the DB
//------------------------------
if ( ! is_array( $ibforums->cache['emoticons'] ) )
{
$ibforums->cache['emoticons'] = array();
$DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) );
$DB->simple_exec();
while ( $r = $DB->fetch_row() )
{
$ibforums->cache['emoticons'][] = $r;
}
}
// sen
}
// end sen