MyBB Community Forums

Full Version: How to add more emotes?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to make some custom emotes... such as the /slap that already exists.
How/where do I go about doing this?

Thanks. Cool
go to your admin cp
Message Filters => Smilie Manager => Add New Smilie or Add Multiple Smilies
The /me and /slap are hardcoded in inc/class_parser.php.
			$message = preg_replace('#(>|^|\r|\n)/me ([^\r\n<]*)#i', "\\1<span style=\"color: red;\">* {$options['me_username']} \\2</span>", $message);
			$message = preg_replace('#(>|^|\r|\n)/slap ([^\r\n<]*)#i', "\\1<span style=\"color: red;\">* {$options['me_username']} {$lang->slaps} \\2 {$lang->with_trout}</span>", $message);

I'd guess you can try adding a custom MyCode for whatever you want.
Coder:
Thanks, but I'm not talking about emoticons/smilies. I am talking about adding additional emotes... such as /me and /slap.

DennisTT:
Thanks for letting me know where to find the code for this stuff... though I'm doubtful I'll be able to figure out how to add what I want. ><; I'll give it a go, though.
What would you want to add? Well, if you know regex it should be easy adding as custom mycode. You can read here how to add custom mycodes.
I want to add:
/poke username... which will produce * jedk pokes username with a stick. :poke: (:poke: is a smilie I've uploaded).
/flirt username ... which will produce * jedk flirts with username. :flirt: (:flirt: is a smilie I've uploaded).
/cookie username ... which will produce * jedk gives username a cookie.
...etc/etc. Stuff like that.

I will read up on that link you provided.