AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Ejabberd plugins2/3/2024 Save this file in your WordPress plugins (and then activate). This adds two extra functions to the Wordpress XML-RPC list without having to hack into the Wordpress files, this means it will work with future Wordpress versions (assuming they don't change the plugin API for XML-RPC calls). To do this, we're going to install a quick plugin I wrote. It has many other handy functions, however, we're going to add a new function to the default list that allows us to simply authenticate users. What does this mean? XML-RPC allows you to use external software to interact with your Wordpress blogs (like use an iPhone app to write blog posts). Goto Settings -> Writing and check that the XML-RPC option is on (it is off by default). In that case try adjusting the shaper settings in ejabberd configuration as follows: shaper: normal: rate: 3000 burstsize: 20000 fast: 100000. Sometimes you may experience long delays while establishing calls. Adding authentication via XML-RPC to Wordpressįirst, before continuing, ensure that you have XML-RPC turned on in your Wordpress Dashboard. Both ejabberd video & voice calls were established quickly and the quality was between good and excellent. Restart your server to apply the configuration settings (after re-uploading your settings file). Modify the line beneath to read something like (or wherever you put the auth script): Uncomment this line and the line beneath it. Goto your Ejabberd configuration folder (mine is /opt/ejabberd-2.1.4/conf) - open "ejabberd.cfg". Otherwise, it should work out of the box with relatively little configuration (once you've installed the WordPress plugin). If you're having problems, try changing lines 167 and 176 to remove the https (replace with http). Note, this part is heavily borrowed from - however, I've essentially stripped out the MySQL code and added support for Wordpress's in-built XML-RPC libraries (this doesn't use the in-built PHP function calls as you need to recompile PHP to enable them, which isn't a general solution). To build this cleanly, we're going to be authenticating via XML-RPC with Wordpress. It tests for user logins (authenticating by username+password) and also checking for user existence on the system (check if a given username exists). This is simply a PHP file that resides somewhere on your webserver (may as well place it in an Ejabberd install directory). Add a new XML-RPC method to Wordpress to allow user-login checking.Configure Ejabberd to use the authentication script.An authentication script for Ejabberd to communicate with Wordpress. I'm pretty nifty at hacking about with Wordpress, so thought I'd challenge myself to do it as neatly as possible. Core developers are very easily accessible through GitHub issues, All and all great community support. and the code is well written, easy to understand too if you know the basics so creating your own plugin should not be a concern. I was recently installing Ejabberd and wanted to integrate it with a Wordpress installation. There are lots of plugins out there to support you.
0 Comments
Read More
Leave a Reply. |