hey love what you guys have going on thanks for the hard work. im having trouble adding extra smilies to my module how do you add new smilies to the forum.

Thx
Ian
www.bmorex.com

Comments

jonnyplunder’s picture

I also need to get custom smilies working, but while I've uploaded the images I can find no way to add them in. I've tried looking through the module files for anything hard-coded, but haven't been able to locate it.

edit: found it, in functions.inc.php. Duh me! Don't know how I missed it. Hope this solves everyone else's problems, too.

Anonymous’s picture

you must edit functions.inc.php if you want to add smilies ...

in the function uieforum_get_smiley_list you can add the smilie in the $smilies_array

$smilies_array = array
    (
      array(':idea:', 	'/:(?i)idea:/' ,	_uieforum_icon(null, null, null, 'idea.gif', true)),
      array(':mad:', 	'/:(?i)mad:/'  ,	_uieforum_icon(null, null, null, 'mad.gif', true)),
      array(':huh:', 	'/:(?i)huh:/'  ,	_uieforum_icon(null, null, null, 'confused.gif', true)),
      array(':lol:', 	'/:(?i)lol:/'  ,	_uieforum_icon(null, null, null, 'lol.gif', true)),
      array(':)'   , 	'/:-?\)/'      ,	_uieforum_icon(null, null, null, 'smile.gif', true)),
      array(':D'   , 	'/:-?[dD]/'    ,	_uieforum_icon(null, null, null, 'biggrin.gif', true)),
      array(':pirateship:',	'/:(?i)pirateship:/',	_uieforum_icon(null, null, null, 'pirateship.gif', true)),
      array(':p'   , 	'/:-?[pP]/'    ,	_uieforum_icon(null, null, null, 'tongue.gif', true)),
      array(':('   , 	'/:-?\(/'      ,	_uieforum_icon(null, null, null, 'sad.gif', true)),
      array(':cool:',	'/:(?i)cool:/' ,	_uieforum_icon(null, null, null, 'cool.gif', true)),
      array(':crazy:',	'/:(?i)crazy:/',	_uieforum_icon(null, null, null, 'crazy.gif', true)),
      array(':fight:',	'/:(?i)fight:/',	_uieforum_icon(null, null, null, 'fight.gif', true)),
      array(':lurking:',	'/:(?i)lurking:/',	_uieforum_icon(null, null, null, 'lurking.gif', true)),
      array(':rolleyes:',	'/:(?i)rolleyes:/',	_uieforum_icon(null, null, null, 'rolleyes.gif', true)),
      array(':shock:',	'/:(?i)shock:/',	_uieforum_icon(null, null, null, 'shockcombo.gif', true)),
      array(':shoot:',	'/:(?i)shoot:/',	_uieforum_icon(null, null, null, 'shooting.gif', true)),
      array(':sleeping:',	'/:(?i)sleeping:/',	_uieforum_icon(null, null, null, 'sleeping.gif', true)),
      array(':|',    	'/:-?\|/'      ,	_uieforum_icon(null, null, null, 'stern.gif', true)),
      array(';)',    	'/;-?\)/'      ,	_uieforum_icon(null, null, null, 'wink.gif', true)),
      array(':mysmilie:',    	'/:(?i)mysmilie:/',	_uieforum_icon(null, null, null, 'mysmilie.gif', true)),
    );

and in the function uieforum_get_smiley_samples you can add the position of the smilie

    $SmilieSamples = array
    ( 0 => array ( 5, 1, 13, 11),
      1 => array ( 7, 2, 10, 14),
      2 => array ( 4, 3, 17, 12),
      3 => array ( 9, 8, 16, 15),
      4 => array (18,19, 20)
    );

as example i add "mysmilie.gif" and it is the number 20 in the $SmilieSamples array ...

daniel.hunt’s picture

Assigned: Unassigned » daniel.hunt
Status: Active » Closed (fixed)

This is something that really bothers me about uieforum. I haven't had the time to create an admin interface for smilies :/