Add field to the XML stream

hi all,

I would like to add a field in the search result stream XML, and it is sent by my ejabberd server to the client.

I would like to add something like :

<photo>www.myWebSite.com/photo/paul.jpg</photo>

I know how i can find the files .erl, where is written this stream.
but i don t know what change I have to do for that...

Could you help me please?? i am beginner in erlang...

Moreover if someone has ever done this kind of add. Could you say to me if I have to attempt to some pb about the functionnement of the server??

thanks
best regards,

latin3g wrote: I know how i

latin3g wrote:

I know how i can find the files .erl, where is written this stream.
but i don t know what change I have to do for that...

What file is it, in which line and which function do you consider the string could be added?

I speake about the

I speake about the "mod_vcard.erl" files. and I have simply added new ligns each times it is needed.

like this lign : ?FIELD("photo",Photo)

Actually i have make the modify yersterday and it looks work...

You should look into vcard

You should look into vcard format. All you have to do is probably to provide a vcard that suite your need (with your extra field). There are some rule to format the vcard and you should try as much as possible to keep the largest possible part compliant.

See the XEP-0054 for an overview on how to use Vcards in the XMPP world: http://www.xmpp.org/extensions/xep-0054.html

Syndicate content