Not logged in. · Lost password · Register
Forum: agsXMPP RSS
How to implement Emoticons
Avatar
yeawsing #1
Member since Jul 2006 · 33 posts · Location: South Korea
Group memberships: Members
Show profile · Link to this post
Subject: Emoticons
Hi,

Has anyone tried to use emoticons in MiniClients?  If so, can you please provide some reference, resources and hints how to implement it.

Thanks.
I am still learning..., hope I can contribute back.
YS
Avatar
Jabberer #2
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Hello,

what we use in our custom clients is JISP[1].
This is an emoticon format which was build for Jabbere/XMPP and is used by many different clients now. Its compressed with a zip algorithm and contains all the icons and and icondef.xml file. If you download some files and take a look at the xml file you will see that its pretty easy use. The xml file contains a mapping from text to icon. Then you can easily replace the text with the icon. The big advantage of using such a "standard" is that even if people use different clients they have the same emotes.

[1] http://jisp.netflint.net
Software Developer
AG-Software
Avatar
yeawsing #3
Member since Jul 2006 · 33 posts · Location: South Korea
Group memberships: Members
Show profile · Link to this post
Hi Jabberer,

I can't find any JEP spec except the JEP-0038.  But this JEP-0038 is the standard for creating the icondef.xml as u mention.

Which mean, when implement this feature we need to get that special text in the message body and display the emoticon.

Eg in the message:

  1. <message>
  2.     ...
  3.     ...
  4.     <body> bla.. bla :-) </body>
  5. </message>

we need to get the ":-)" text and display it like this :) in our chatbox.

Need to check is the C# RichTextbox able to display GIF file or not.   Still not too sure how to implement yet, but I will try.
I am still learning..., hope I can contribute back.
YS
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
exactly.

You will find lots of c# examples in the internet to display images in a RTF-Control.
Or you have to use another control for displaying your messages.

Alex
Avatar
yeawsing #5
Member since Jul 2006 · 33 posts · Location: South Korea
Group memberships: Members
Show profile · Link to this post
Hi,

I found some interesting article that display images in a RTF-Control.

1. http://www.codeproject.com/cs/miscctrl/MyExtRichTextBox.asp
2. http://www.codeproject.com/cs/miscctrl/csexrichtextbox.asp

I am not sure, but I guess implement this emoticon biggest job is hacking this RTF-Control.

Does anyone got a better approach or using other WinForm Control?
I am still learning..., hope I can contribute back.
YS
Avatar
Jabberer #6
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
hello,

both articles on codeproject are very good.
The common controls in existing IM clients are the RTF-Control and the Webbrowser control. Using both of them is tricky if you want to display images and formatted text (XHTML-IM).
Software Developer
AG-Software
Avatar
yeawsing #7
Member since Jul 2006 · 33 posts · Location: South Korea
Group memberships: Members
Show profile · Link to this post
hi,

I just quickly check in the agsxmpp, and it does support this two namespace

'http://jabber.org/protocol/xhtml-im' and 'http://www.w3.org/1999/xhtml'

Very cool. :)

Is Wildfire support this <feature var='http://jabber.org/protocol/xhtml-im'/>
I am still learning..., hope I can contribute back.
YS
Avatar
Alex #8
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this is a client feature.
So there is no need for a server to support it. The server only routes the message, without taking care about the content. It doesnt matter if it is plain text, html or smth else.

Alex
Avatar
yeawsing #9
Member since Jul 2006 · 33 posts · Location: South Korea
Group memberships: Members
Show profile · Link to this post
Hi guys,

I guess I need to change the Richtextbox to something like a web editor and displayer.

Today, when I was reading my mail, I receive an article about this:

http://www.codeproject.com/useritems/editor_in_windows_for…

I got a new camera capture project and it going to take about 1 month to build the first prototype :(
When I get back to this IM project again, I will post the emoticon code for u guys to correct me again :)
I am still learning..., hope I can contribute back.
YS
Avatar
Alex #10
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

yes this example is a good start. We also use the HTML Control to display and edit messages in our IM projects.

2 other good examples:
http://www.itwriting.com/htmleditor/index.php
http://www.gotdotnet.com/Workspaces/Workspace.a…?id=ee97…

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS