[ejabberd] Create PubSub Collection

Guillaume Ludmann guillaume.ludmann at ip-media.fr
Fri Feb 12 14:51:10 MSK 2010


it works,

thanks

Le 11.02.2010 13:50, kael a écrit :
> On 02/11/2010 01:00 PM, Guillaume Ludmann wrote:
>> Hi,
>
> Hello,
>
>> I'm using ejabberd v2.1.2 and I would create a pubsub tree like this :
>> (root) --> toto --> titi --> info (leaf)
>>                         |          \-> ticket (leaf)
>>                         \-> tutu --> info (leaf)
>>                                       \-> ticket (leaf)
>
> Modify ejabberd.cfg with :
>
>> My ejabberd pubsub config is :
>>  {mod_pubsub,   [ % requires mod_caps
>>           {access_createnode, pubsub_createnode},
>>           {ignore_pep_from_offline, true},
>>           {last_item_cache, false},
>>           {plugins, ["flat", "hometree", "pep"]}
>             {plugins, ["dag", "hometree"]}]}, %% To replace
>             {nodetree, "dag"},                %% To add
>>          ]},
>>
>> How can I create a collection node?
>
> 1. Create a 'toto' collection node attached to the (implicit) root 
> collection node :
>
> <iq type='set' to='pubsub.localhost'>
> <pubsub xmlns='http://jabber.org/protocol/pubsub'>
> <create node='toto'/>
> <configure>
> <x xmlns='jabber:x:data' type='submit'>
> <field var='FORM_TYPE' type='hidden'>
> <value>http://jabber.org/protocol/pubsub#node_config</value>
> </field>
> <field var='pubsub#node_type'><value>collection</value></field>
> <field var='pubsub#collection'><value/></field>
> </x>
> </configure>
> </pubsub>
> </iq>
>
> 2. Create a 'titi' collection node attached to the 'toto' collection 
> node :
>
> <iq type='set' to='pubsub.localhost'>
> <pubsub xmlns='http://jabber.org/protocol/pubsub'>
> <create node='titi'/>
> <configure>
> <x xmlns='jabber:x:data' type='submit'>
> <field var='FORM_TYPE' type='hidden'>
> <value>http://jabber.org/protocol/pubsub#node_config</value>
> </field>
> <field var='pubsub#node_type'><value>collection</value></field>
> <field var='pubsub#collection'><value>toto</value></field>
> </x>
> </configure>
> </pubsub>
> </iq>
>
> 3. Create a 'info' leaf node attached to the 'titi' collection node :
>
> <iq type='set' to='pubsub.localhost'>
> <pubsub xmlns='http://jabber.org/protocol/pubsub'>
> <create node='info'/>
> <configure>
> <x xmlns='jabber:x:data' type='submit'>
> <field var='pubsub#collection'><value>titi</value></field>
> </x>
> </configure>
> </pubsub>
> </iq>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20100212/29eb4ac4/attachment.html>


More information about the ejabberd mailing list