Friday, 8 October 2010

Tungle + Confluence

A few days ago IBM announced support for integrating LotusLive with the excellent service for scheduling appointments with external parties.  Not being one to let IBM have all the fun I created a User Macro to embed in Atlassian's Confluence wiki.

Register a account
Visit and follow the on-screen instructions.

Create a User Macro
  1. Login to Confluence as a user with admin privileges
  2. Select Browse -> Confluence Admin -> User Macros
  3. Create a new User Macro with the following details:
Macro name: tungle
Macro body: unchecked
Output: Macro generates HTML markup

#set ($user = ($paramuser))
#if ($user)
  <img src="${user}/busyicon" class="tungle-me" teml="${user}"/>
  <script src="" type="text/javascript"></script>
  <div class="errorBox">You must specify a <strong>user</strong> parameter.</div>

Add the Macro to a Page
Edit any Confluence page in the normal way and add the following code:


where <username> is your username, e.g.


This will give you the following on your wiki page:

and when you click "schedule a meeting" you will see:

If you don't specify a "user" parameter then you will get: has a number of synchronisation integrations with calendar services - LotusLive, Lotus Notes, Google Calendar, Outlook, Entourage, Exchange - and embedding the widget in your website is a great way of making it easy for people outside your organisation to schedule appointments.

Saturday, 2 October 2010

Google Moderator + Confluence Take 2

A while ago I posted how to integrate Google Moderator with Confluence , but it was a hard-coded solution which would only embed one Moderator series.  After (finally) getting off my backside I've now got an improved User Macro which allows you to enter the URL of any Moderator series as a parameter to the macro.

Most of the steps are the same as the previous blog post , but the template for the macro has been changed from:

<div id="moderator-embed-target"></div>
<script type="text/javascript">
var mod = new MODERATOR("[ID of your Moderator series]);
mod.hl = "en";
mod.width = 1000;
mod.height = 500;


#set ($url = ($paramurl))

#if ($url)
  <div id="moderator-embed-target"></div>
  <script type="text/javascript">
    var mod = new MODERATOR("${url}");
    mod.hl = "en";
    mod.width = 1000;
    mod.height = 500;
  <div class="errorBox">You must specify a <strong>url<strong> parameter.<div>

This small change now allows you to enter something similar to:


into the body of a Confluence page, where the URL is just copied and pasted from the home page of your Google Moderator series.  This results in:

If you forget to enter a URL parameter by just entering:


you will be presented with:

I still need to work on turning this into a "proper" plugin or Open Social gadget, but it's more flexible than the old macro.

FOOTNOTE:  I didn't use $generalUtil.urlEncode($paramurl) in the macro as when the URL is encoded the macro fails to render.