UserPreferences

Integrating Jabber


Short Take

  1. Install a jabber server.

  2. Place an applet on the webserver.

  3. Put a link on the OX Groupware page.

  4. Glue it all together.

And, it can actually be easy. Trust me.

Installing a Jabber Server

jive-messenger.xml
<jive>
  <adminConsole>
    <!-- Disable either port by setting the value to -1 -->
    <port>9090</port>
    <securePort>9091</securePort>
    <!-- By default, only the user with the username "admin" can login
         to the admin console. Alternatively, you can specify a comma-delimitted
         list usernames that should be authorized to login by setting the
         <authorizedUsernames> field below. -->
    <authorizedUsernames>$ADMINUSER</authorizedUsernames>
  </adminConsole>
  <locale>en</locale>
  <!-- Example LDAP settings -->
  <ldap>
    <host>localhost</host>
    <port>389</port>
    <usernameField>uid</usernameField>
    <nameField>cn</nameField>
    <emailField>mail</emailField>
    <baseDN>ou=OxObjects,dc=$DOMAIN,dc=$TLD</baseDN>
    <adminDN/>
    <adminPassword/>
    <groupMemberField>memberUid</groupMemberField>
    <posixMode>true</posixMode>
    <groupDescriptionField>cn</groupDescriptionField>
  </ldap>
  <provider>
    <user>
      <className>org.jivesoftware.messenger.ldap.LdapUserProvider</className>
    </user>
    <auth>
      <className>org.jivesoftware.messenger.ldap.LdapAuthProvider</className>
    </auth>
    <group>
      <className>org.jivesoftware.messenger.ldap.LdapGroupProvider</className>
    </group>
  </provider>
  <!-- End example LDAP settings -->
  <connectionProvider>
    <className>org.jivesoftware.database.DefaultConnectionProvider</className>
  </connectionProvider>
  <database>
    <defaultProvider>
      <driver>org.postgresql.Driver</driver>
      <serverURL>jdbc:postgresql://localhost:5432/$JIVEDB</serverURL>
      <username>$JIVEDBUSER</username>
      <password/>
      <minConnections>5</minConnections>
      <maxConnections>15</maxConnections>
      <connectionTimeout>1.0</connectionTimeout>
    </defaultProvider>
  </database>
  <setup>true</setup>
</jive>

Applet Time

Link on the OX Groupware Page

external.conf
<externalElement>
   <element title="Tools" language="EN"/>
   <content src="$OX/etc/groupware/jeti.txt"/>
</externalElement>
jeti.txt
<a href="" onClick="window.open('https://$OXDOMAIN.$TLD/cgi-bin/jetiapp/jetiapp.pl?sessionID=[NAS_ID]','Record_Viewer','width=250,height=400,left=50,top=50')">IM</a>

Setting "href=#rightArea" avoids the need to refresh the page in MS Internet Explorer

Da Glue Stick

jetiapp.pl
#!/usr/bin/perl

use OXtensions::OXSession qw(ox_getAuth);

use CGI qw(:standard);

my $sessionID   = param('sessionID');
my $sessionData = ox_getAuth($sessionID);

print header;
print "<HTML>\n";
print "<HEAD>\n";
print "<title>Jeti Applet</title></HEAD>\n";
print "<BODY>\n";
print "<APPLET name=\"jeti\" codebase=\"https://$OXDOMAIN.$TLD/jetiapp\" archive=\"applet.jar,plugins/alertwindow.jar,plugins/emoticons.jar,plugins/groupchat.jar,plugins/appletloadgroupchat.jar,plugins/sound.jar,plugins/xhtml.jar\" CODE=\"nu.fw.jeti.applet.Jeti.class\" WIDTH = 100% HEIGHT = 100%>\n";
print "<PARAM NAME=USER VALUE=".$sessionData->{'uid'}.">\n";
print "<PARAM NAME=PASSWORD VALUE=".$sessionData->{'passwd'}.">\n";
print "<PARAM NAME=SERVER VALUE=$OXDOMAIN.$TLD>\n";
print "<PARAM NAME=PORT VALUE=5223 >\n";
print "<PARAM NAME=SSL VALUE=true>\n";
print "<PARAM NAME=RESOURCE VALUE=JetiApplet >\n";
print "</APPLET>\n";
print "</BODY>\n";
print "</HTML>\n";

This script runs the perl OXSession to determine the username/password pair. Then sends the info with the configuration data to the java applet. I am not a fan of recovering the password and sending it back. But this falls into the *WOW IT WORKS* catagory.

Notes

'"Trust me" is another way of saying "Your screwed, but I'll pretend to help"