Usage instructions for webber ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By now you should have already setup the webberbot, and the webber.php script (read INSTALL) or should have decided to use a public webber service. For the impatient: ~~~~~~~~~~~~~~~~~~ Add the webberbot to your roster/contact list. Then, in your HTML file, add the following line wherever you want the presence to be displayed: Of course, replace the webserver and the path to the script, and the jid with your own. The icons have to be located in a directory "webbericons/" with respect to the webber.php script. That's about it. To use more advanced features, read on! Detailed instructions ~~~~~~~~~~~~~~~~~~~~~ To get your presence displayed on a webpage, the first step is to add the webberbot's jid to your roster, so that the bot can keep track of your presence information, and update the database whenever your presence changes. You can change settings and preferences by sending the bot certain commands which are described below: Commands for webberbot ~~~~~~~~~~~~~~~~~~~~~~ set outputtype can be one of "image" or "text". If type is "image", the webber.php script will output an image file depending on the presence of the user. If type is "text", then the php script will output some custom text which you can set by using the "set customtext" command. set imagebase Changes the location where images are loaded from. This can be something like "http://a.b.c/webbericons/" or simply a relative URL like "webbericons/" (the latter is the default) set imageextension Sets the extension of the images you want to use (png, gif, etc) These are the image files which will be loaded by the script (from the imagebase, and with ".imageextension" appended): available away chat dnd unavailable xa set customtext Sets the text which will be displayed by the script if the outputtype is set to text. The following variables will be substituted in the text: %jid% - The jid of the user %resource% - The resource of the user %priority% - The priority of the jid/resource %show% - The presence of the user - one of available, away, chat, dnd, unavailable, or xa %status% - The status message set by the user %image% - The image file which would have been loaded in image mode (nothing but imagebase/%show%.imageextension) %musictitle% - The song title as reported by the Gabber client if XMMS support is enabled (untested). set password Sets a password to restrict access to your presence information. Does not make sense (and is not checked) if outputtype=image, because in that case the password will have to be in the HTML file. webber.php ~~~~~~~~~~ The script can be used in two modes - image or text mode. Image mode is simpler to use and requires almost no configuration. To display your presence information on your webpage, just include the following text in your HTML file: webber.php outputs the correspnding presence image from the file. This mode does not require any server side scripting support on the machine which hosts the webpage. In some circumstances, you may want to output extra information like the status message of the user. You can use the text mode of webber in this case - the mode can be switched by sending the bot a command (see above). The custom text which you set will be output by the script. This text needs to be included in your html file, so you need server side scripting support on the machine hosting the webpages as well. In PHP, you can use the following line in the HTML file: That line reads the output of the webber script and includes it in the current page before sending it to the browser. You could also achieve the same thing using a CGI script or any other server side scripting mechanism. If you're using text mode, and have set a password for restricting access to your presence, then pass a password parameter to the script like this: That's about it. If you have any questions, comments or suggestions, bug fixes, or patches, mail me at , or you can jabber me at .