This plugin feeds Jabber server pubsub nodes when new posts are published on Wordpress and comments are added.
Puanlar
Son güncellenme
January 24, 2010
Sürüm
0.5

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.

Configuration

In the ‘Jabber Feed configuration’ menu, you will see the following sections:

Publishing Account

This section contains the connection parameters of the account which will be used to publish the field. I would personnaly advice to create a new account just for it (you can also use your personal account of course, anyway the plugin’s bot will create a resource identifier unique for every connection) and to configure it to refuse any contact and communication (as noone will have to add it to one’s roster, except you maybe for test or debugging purpose?). The fields are:

  • The bot adress (full jid form: mybotname@myserveraddress);
  • the password.

Connection Parameters

By default Jabber Feed can now use SRV records which is a recommended way to advertize server and port from a domain name (see for instance http://dns.vanrein.org/srv/ for details).

This is an advanced section in case your server does not use SRV AND uses a server which is not the same as the domain from the jid or a port different from the default one (5222).

Hence there will be very very new cases where you will have to fill this section and if you don’t understand all what I say here, just don’t fill anything here (if you fill even only one field, then it will be used instead of SRV and default values).

The default values will be used if fields empty and no SRV is configured on the Jabber server:

  • the Jabber server (often the same as ‘myseveraddress’ of the jid);
  • the Jabber port (usually 5222).

PubSub configuration

Where to publish the notifications. It can be on a separate server.

  • the pubsub server;
  • the root publication node;
  • 2 checkboxes to uncheck if you don’t want to publish the posts or the comments.

Note that this node does not have to exist. When you will press the “Update” button, the providden Jabber login and connection parameters will be tested and the node will be created with all its tree. If anything goes wrong, you will be informed about it.

The providden Jabber account can have no right to create the required post/ node, but then it must be created first and publisher rights at least must have been given.

Manage Posts

The page with the list of published posts have been modified. A new column called “Jabber Feed” will display: * The publication date on the node (and the last update will appear on a bubble when the mouse passes by); * ‘Error on publication’ when an error has occured during publication (and the error text will be displayed when the mouse passes by); * ‘Not Published’ when no publication never occurred (which is simply when the post has been published on WordPress before the plugin has been installed.

Todo

  • TTL support for DNS/SRV records.

  • Still need to test extensively (and if necessary improve) the right system in WordPress:

    • will the non-approved comments be published on the comment nodes?
    • will the private posts be published?
  • In the “configuration” window, I should make a detection of the prerequisites, gray everything if a mandatory one is not fulfilled and give an explanation text.

  • And what about internationalization?!

  • Manage menu: with failed publication, it should be possible to retry the publication from this page (with multiple checkbox if possible to massively run publication!).

  • And what about an equivalent of post management for comments?! Is it possible (apparently not, according to WordPress documentation)?

  • The item should also be updated when a published post is edited.

  • Why not add support to pages? -> current work.

  • Create the bot account as well?

  • Why not retry to publish after a timer (let’s say 1 day?) after a failure, with a number maximum of tries?

  • What could be fun: if the subscribers could be also publisher, hence answering to a post by directly publishing to the node? But how is a publisher identified?! No “from” with a pseudo in it, and data about real jid accessible from admin.

  • Improve globally the message syntax (for instance the message ‘updated’ and ‘created’ tags).

  • Configure the node instead of simply create it with default configuration.

  • Check the node authorizations if it is already existing.

  • Improve the internationalization strings (and set at least 2 default languages: English and French).

  • And what if the post or page is private? Should it be added on a node? Maybe a node with a white list that the admin can manage?

  • Apparently if I disapprove or flag a comment as spam from the “edit comment” page, it does not remove it from the node. Why? Is it a bug from WordPress which does not trigger the action in all cases? Or is there another WordPress’ action for this specific case? Try this also with posts from the “edit post” page. Edit: it seems to be a known bug: https://trac.wordpress.org/ticket/5792 Is planned to be fixed for WordPress 2.9 apparently. => this seems to be fixed now! Woohoo!

  • Add more authentication mechanisms? (current: Digest-MD5, CramMD5, PLAIN, ANONYMOUS. Only Digest-MD5 and PLAIN has been tested)

  • SSLv23 added, but what about TLS? (TLS does not work on Gmail. SSL and TLS works on ejabberd. So I have decided to use SSL only for now) Note that it looks like the PHP implementation of TLS encryption does not seem like verifying the certificate…

  • Add poster/commenter name in ATOM format. Poster’s name http://tools.ietf.org/html/rfc4287

  • Add support for button of publishing all posts in once…

  • Propose max_items to change…

  • Improve title naming (different for comments, posts, and even for comments of each posts…)

  • Isn’t there a configuration option for getting notif of subnodes?.. Seem to remind yes.

Contacts

You can have some news about this plugin on my freedom haven or of course, by subscribing on the following xmpp pubsub node: http://jehan.zemarmot.net/blog/category/technologies/programmation/jabber-feed/feed/ If you want to contact me by jabber, ask me first by email (which you can find on my website. Yes I know, this is complicated: but I like my tranquility, so I make a filter).

Have a nice life!

ÜcretsizCreator paketinde
Yükleme işlemini tamamlayarak, WordPress.com'un Hizmet Şartları ile Üçüncü Taraf Eklenti Şartlarını kabul etmiş olursunuz.
Test edilen son sürüm
2.9.2
Bu eklenti, WordPress tarafından barındırılan kurulumunuzda kullanılmak üzere indirilebilir.