This plugin feeds Jabber server pubsub nodes when new posts are published on
Wordpress and comments are added.
This plugin enables the blog owner to publish their posts on a xmpp pubsub
node. This way, anyone subscribed to this same node will be notified through
Jabber when a new post is published.
It enables also to do the same with comments on separated xmpp pubsub nodes, so
that readers can also subscribe and get notified about new comments of a
specific post only if prefered.
Note: this is a early version, you can try it if you are interested (there can
be no harm! ;-), but I will provide far better versions progressively...
Detailed Features
- Connection with SRV records, TLS if available and known authentication
mechanisms (in this order of preference): Digest-MD5, CramMD5, PLAIN,
ANONYMOUS.
- Posts are published on the subnode posts/ of the given pubsub node;
- Comments are published on the subnode comments/ with being the id
of the corresponding post;
- Posts, as well as comments, are deleted automatically from the associated
pubsub nodes if you delete them, disapprove them, or flag them as spam from the WordPress website;
- Posts, as well as comments, are updated automatically on the associated
pubsub nodes if you edit them on your WordPress website;
- Autodiscover xmpp link for all posts is automatically set on all pages,
except single posts (if the 'wp_head' function is used by your theme, which is
the common procedure);
- Autodiscover xmpp link for comments of the current post is automatically set
on each single post (if the 'wp_head' function is used by your theme, which is
the common procedure);
- 2 templates functions for returning or displaying different xmpp links are
provided for your themes.
Screenshots
The configuration page;
The modified post management page;
The templates in practice: I added the code Subscribe to the Jabber feeds:
<?php jabber_feed_display ('posts', 'a', "entries (jabber)"); ?> and
<?php jabber_feed_display ('comments', 'a'); ?>
to the footer.php of the
theme (here default).
The templates in practice again: I added <?php jabber_feed_display
('current', 'a', 'Jabber') ?>
in the single.php file of the theme (between
the p tag of class 'postmetadata alt' in the default theme).
FAQ
Question from myself: how people can subscribe on a Jabber node?
Unfortunately this plugin is rather a “proof of concept” plugin as long as
there is no Jabber client allowing users to easily subscribe (and configure
their subscription) to xmpp pubsub nodes.
I could use Gajim to subscribe to nodes though, but I had much difficulty to
“browse” nodes with it, and it is impossible to create a node (at least I have
not found).
As for Psi, I could not do any subscription at all.
The only mean for the time being is to use a client with a XML console (the
only ones I know with such a console are Gajim, Psi, and Sameplace with an
official plugin) and send this raw XML subscription (which is indeed a non very
user-friendly method, I must admit).
It would be nice if people could implement soon a node subscription feature in
their favorite Jabber client (I will probably try to do so myself as a next
step) and also a relation in their favorite web-browser to Jabber links (so
that they could have their Jabber client propose them to subscribe and
configure a node just by clicking on a link on their browser).
Hopefully then I will update this readme to advice such Jabber client and web
browser! 🙂
From myself: which jabber server has a good pubsub implementation?
I am using ejabberd 2.0 and 2.0.1 for my own, but it is pretty flawed on many ways.
Especially it is impossible to configure your subscription to a node. What a
shame! 🙁
Anyway it is sufficient basically for the proof of concept, but probably not
for long-term (even mid-term) real use.
Yet I heard that the coming development version of ejabberd (3.0) has had a
rewrite of the pubsub implementation. I have not tested though.
I don’t know sufficiently others server softwares to give an opinion about
them. But I was told Openfire should have soon a pretty good PubSub support. I
am still waiting to test it though.
From myself: which Jabber client could I advice to visitors of my website?
As explained, there are few, if none, clients with good PubSub support. This
is why I told this plugin is more a proof of concept than an useful one. But
hopefully, soon it will be better!
Process One has developped recently a pubsub client called one-channel
, as
far as I know, the first one ever publicly released, fully dedicated to
pubsub. I had only one review from someone, not so enthousiast though. For my
own, I have unfortunately been unable to test, as it uses Flash technology
(Adobe AIR) and my MIPS computer does not take Flash very well (usually it
will crash, if it works at all, anyway). If someone had a chance to test it
with publication generated by my plugin, I would be happy to get a feedback…
From myself: but no browser can detect XMPP autodiscovery links. What are they for?!
I am writting a small Firefox plugin for this. Soon more infos!
Do you like to ask questions to yourself? Do you feel lonely?
Maybe. 😉
ChangeLog
0.5
-
Better SRV library gestion: the plugin can now “switch” between the NET_DNS library
if installed, to the core PHP SRV functions (if using Linux or a Windows
with a recent PHP) or nothing (no SRV gestion).
Hence for Linux or Windows (with recent PHP), no additional library is
anymore required.
-
Algorithm for dealing with priority and weight of target in SRV records is
now implemented, exactly as in RFC 2782. Therefore the only missing part for
a full SRV records compliance is now a support of Time To Live, which could
be interesting next implementation.
-
New widget for displaying the XMPP feeds in the sidebars.