From c90579146ca676ceb2be2194a5db19a029865994 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Thu, 6 Dec 2007 09:29:28 +0000 Subject: [PATCH] enable pep by default and add pubsub plugin examples SVN Revision: 1031 --- ChangeLog | 9 +++++++++ doc/guide.html | 12 ++++++++++-- doc/guide.tex | 8 +++++++- src/ejabberd.cfg.example | 2 +- src/mod_pubsub/Makefile.in | 7 ++++++- src/mod_pubsub/Makefile.win32 | 7 ++++++- src/mod_pubsub/node_dispatch.erl | 4 ++-- 7 files changed, 41 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb60c8222..59f46ab48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-12-06 Christophe Romain + + * src/mod_pubsub/node_dispatch.erl: Correct syntax issue + * src/mod_pubsub/Makefile.in: include example plugins + * src/mod_pubsub/Makefile.win32: likewise + * src/ejabberd.cfg.example: use default and pep pubsub plugins + * doc/guide.tex: add nodetree and plugins pubsub option + * doc/guite.html: likewise + 2007-12-06 Badlop * doc/guide.tex: Document the Debug Console (EJAB-395) diff --git a/doc/guide.html b/doc/guide.html index 11d3981d7..ff27013ce 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -2933,7 +2933,14 @@ Options: be served, you can use this option. If absent, only the main ejabberd host is served.
access_createnode
This option restricts which users are allowed to create pubsub nodes using - ACL and ACCESS. The default value is pubsub_createnode. + ACL and ACCESS. The default value is pubsub_createnode. + +
plugins
To specify which pubsub node plugins to use. + If not defined, the default plugin is always used. + +
nodetree
To specify which nodetree plugin to use. + If not defined, the default pubsub nodetree used. Nodetrees are default and virtual. Only one nodetree can be used + and is shared by all node plugins. Example:
   {modules,
@@ -2941,7 +2948,8 @@ Example:
     ...
     {mod_pubsub, [{served_hosts, ["example.com",
                                   "example.org"]},
-                  {access_createnode, pubsub_createnode}]}
+                  {access_createnode, pubsub_createnode},
+                  {plugins, ["default","pep"]}]}
     ...
    ]}.
 
diff --git a/doc/guide.tex b/doc/guide.tex index 8890d7069..c24326a78 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -2653,6 +2653,11 @@ Options: \titem{access\_createnode} \ind{options!access\_createnode} This option restricts which users are allowed to create pubsub nodes using ACL and ACCESS. The default value is \term{pubsub\_createnode}. % Not clear enough + do not use abbreviations. +\titem{plugins} To specify which pubsub node plugins to use. If not defined, the default + pubsub plugin is always used. +\titem{nodetree} To specify which nodetree to use. If not defined, the default pubsub + nodetree is used. Nodetrees are default and virtual. Only one nodetree can be used + and is shared by all node plugins. \end{description} Example: @@ -2662,7 +2667,8 @@ Example: ... {mod_pubsub, [{served_hosts, ["example.com", "example.org"]}, - {access_createnode, pubsub_createnode}]} + {access_createnode, pubsub_createnode}, + {plugins, ["default","pep"]}]} ... ]}. \end{verbatim} diff --git a/src/ejabberd.cfg.example b/src/ejabberd.cfg.example index f2e6bdda8..b9f7d332e 100644 --- a/src/ejabberd.cfg.example +++ b/src/ejabberd.cfg.example @@ -407,7 +407,7 @@ {mod_privacy, []}, {mod_private, []}, %%{mod_proxy65,[]}, - {mod_pubsub, [{access_createnode, pubsub_createnode}]}, + {mod_pubsub, [{access_createnode, pubsub_createnode},{plugins,["default","pep"]}]}, {mod_register, [ %% %% After successful registration, the user receives diff --git a/src/mod_pubsub/Makefile.in b/src/mod_pubsub/Makefile.in index f23796eb5..8648b9489 100644 --- a/src/mod_pubsub/Makefile.in +++ b/src/mod_pubsub/Makefile.in @@ -25,7 +25,12 @@ OBJS = \ $(OUTDIR)/nodetree_virtual.beam \ $(OUTDIR)/mod_pubsub.beam \ $(OUTDIR)/node_default.beam \ - $(OUTDIR)/node_pep.beam + $(OUTDIR)/node_pep.beam \ + $(OUTDIR)/node_buddy.beam \ + $(OUTDIR)/node_club.beam \ + $(OUTDIR)/node_dispatch.beam \ + $(OUTDIR)/node_private.beam \ + $(OUTDIR)/node_public.beam all: $(OBJS) diff --git a/src/mod_pubsub/Makefile.win32 b/src/mod_pubsub/Makefile.win32 index d1680bb11..8d4e9f993 100644 --- a/src/mod_pubsub/Makefile.win32 +++ b/src/mod_pubsub/Makefile.win32 @@ -11,7 +11,12 @@ OBJS = \ $(OUTDIR)/nodetree_virtual.beam \ $(OUTDIR)/mod_pubsub.beam \ $(OUTDIR)/node_default.beam \ - $(OUTDIR)/node_pep.beam + $(OUTDIR)/node_pep.beam \ + $(OUTDIR)/node_buddy.beam \ + $(OUTDIR)/node_club.beam \ + $(OUTDIR)/node_dispatch.beam \ + $(OUTDIR)/node_private.beam \ + $(OUTDIR)/node_public.beam ALL : $(OBJS) diff --git a/src/mod_pubsub/node_dispatch.erl b/src/mod_pubsub/node_dispatch.erl index e0b9d0277..7c7341369 100644 --- a/src/mod_pubsub/node_dispatch.erl +++ b/src/mod_pubsub/node_dispatch.erl @@ -85,7 +85,7 @@ features() -> %%"purge-nodes", %%"retract-items", %%"retrieve-affiliations", - "retrieve-items", + "retrieve-items" %%"retrieve-subscriptions", %%"subscribe", %%"subscription-notifications", @@ -115,7 +115,7 @@ publish_item(Host, Node, Publisher, Model, MaxItems, ItemId, Payload) -> end, nodetree_default:get_subnodes(Host, Node)). remove_extra_items(_Host, _Node, _MaxItems, ItemIds) -> - {result, {ItemsIds, []}}. + {result, {ItemIds, []}}. delete_item(_Host, _Node, _JID, _ItemId) -> {error, ?ERR_ITEM_NOT_FOUND}.