WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Jabber Feed

This plugin feeds Jabber server pubsub nodes when new posts are published on Wordpress and comments are added.

  1. Upload the plugin archive to wp-content/plugins/ directory on your WordPress installation;
  2. Uncompress it by keeping it in its own sub-directory called jabber_feed/;
  3. Activate the plugin through the 'Plugins' menu in WordPress;
  4. Configure the plugin through the appearing sub-menu 'Jabber Feed configuration' under the 'Plugins' menu.
  5. When aknowledging the configuration by pressing the "Update" button, the jabber login will be tested and the pubsub nodes created. Hence if anything is wrong with your configuration, you will be immediately informed.
  6. This plugin also defines two templates:

- jabber_feed_get ($node = 'posts', $what = 'url', $text = '') will return a string being a url (bare, or in a 'a' or 'link' tag). - jabber_feed_display ($node = 'posts', $what = 'url', $text = '') is the same as the previous template but display the string instead of returning it! These template functions can be used in your theme. Note that if your theme uses the 'wp_head' function in its header (most cases), a autodiscovery link on the post node will be automatically generated in the header. Otherwise, you can add it by yourself with these functions for instance.

dependencies

  • PHP must be built with the option --enable-sockets on PHP 4 >= 4.0.7 or PHP 5 (though I haven't tried with such a version, with PHP 5.3.0 and more, this extension is moved to the PECL repository!). If you have an error relating to socket, this is most likely a dependency issue. Note for gentoo users: you must set the 'sockets' USE flag.

  • It uses the library 'expat' to parse XML (enabled with the --with-xml option of the php compilation). Note for gentoo users: you must set the 'xml' USE flag.

  • It uses the Auth_SASL PEAR module (pear install Auth_SASL or install with your distribution's package manager) for SASL authentication. For now, this dependency is mandatory because this is the only supported authentication mechanism. Maybe in some future will it become optional.

  • OPTIONAL: to have the option of sending formated notification in XHTML, the "tidy" PECL extension must be installed. It is based on the libtidy library which must first be installed: http://tidy.sourceforge.net/ Then with PHP 4.3.X or PHP 5, you can install it as a PECL module: pecl install tidy; or with the --with-tidy compilation option in PHP 5. Without this, you won't have access to the XHTML option and all notifications will be sent as a normal textual message.

  • OPTIONAL: if the plugin is installed on a BSD (Mac included), in order to use the SRV records on the admin JID, which is the correct way of resolving the server and port addresses for a domain, the PEAR extension NET_DNS must be installed: 'pear install NET_DNS' (Note that it will ask to have php compiled with 'mhash' option). If it is installed on Windows, it is not anymore mandatory if you have PHP 5.3.0 or later installed (under this version of PHP, you should also install this extension to benefit SRV records). Linux servers do not need this extension to have SRV. Note for gentoo users: you must set the 'mhash' USE flag.

Working Platforms

This script has been tested only currently on WordPress 2.0 up to WordPress 2.9.1 with PHP 5.2.1 to 5.2.11, running on a GNU/Linux 64 bits (Gentoo Linux). Hopefully it should work with other software versions (not for PHP4, because of the TLS feature with is PHP5 specific. Yet if you are really interested into PHP4 compatibility and if TLS is not required for your connection, just ask me, I will try to make a compatibility layer), but I cannot guarantee. Tell me please if you tried this successfully with another configuration so that I update the known working platforms list.

At the opposite, if you find a bug or encounter an issue on some configuration, don't hesitate to tell me, and I will try and fix it.

Examples for using the function templates

jabber_feed_get and `jabber_feed_display` have the same parameters, but the

first returns the link whereas the latter displays it:

  1. jabber_feed_get ($node = 'posts', $what = 'url', $text = '')
  2. jabber_feed_display ($node = 'posts', $what = 'url', $text = '')
  • 'node' can be 'all', 'posts', 'pages', 'comments', 'current' (comments of the current page/post) or a number (comments of the given numbered post/page);
  • 'what' can be the bare 'url', or included in a 'a' tag, or a 'link' tag;
  • 'text' is optional displayed text (only when 'a' tag).

So for instance, if the pubsub server is 'pubsub.jabber.org' and the node is 'blog':

  • jabber_feed_display ('posts', 'bare') displays simply:

    xmpp:pubsub.jabber.org?action=subscribe;node=blog/posts
    

which is a bare url of the node containing all the posts.

  • jabber_feed_get ('comments', 'a', 'All the comments') will return:

    <a rel='alternate'
        href='xmpp:pubsub.jabber.org?action=subscribe;node=blog/comments;subscription_type=items;subscription_depth=1'>All
        the comments</a>
    

which is a link for all comments.

  • jabber_feed_display (5, 'link') will display:

    <link rel='alternate'
        href='xmpp:pubsub.jabber.org?action=subscribe;node=blog/comments/5' />
    

which is an autodiscovery link for the comments of post 5.

Etc.

Requires: 2.0 or higher
Compatible up to: 2.9.2
Last Updated: 2010-1-24
Downloads: 2,304

Ratings

4 stars
4.4 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2 0,1,0
0,1,0
0,1,0