Posts on Google Moderator tend to be very high-level and the teams I've worked with capture more detailed requirements using Atlassian Confluence so I wanted to have a play with embedding Google Moderator into Confluence - which turned out to be really easy for a basic integration.
Here's what you need to do:
Add the Google Moderator Javascript to a Main Layout
- Login as the owner of a Confluence Space
- Navigate to Browse -> Space Admin -> Layout
- Select Create Custom next to Main Layout
Then add the following to the <head> section of the Main Layout:
<script src="http://www.google.com/moderator/static/moderator-embed-api.js" type"text/javascript">E.g.
</script>
Create a User Macro
You don't need to do this, but I decided to create a User Macro so people could embed Google Moderator with a simple {moderator} macro rather than needing to know the Javascript code for embedding directly.
- Login as a Confluence Administrator
- Navigate to Browse -> Confluence Admin -> User Macros -> Create a User Macro
- Populate with the following information:
Macro Name: moderator
Macro Body: unchecked
Output: Macro generates HTML markup
Template:
<div id="moderator-embed-target"></div>
<script type="text/javascript">
var mod = new MODERATOR("http://www.google.com/moderator/[ID of your Moderator series]);
mod.hl = "en";
mod.width = 1000;
mod.height = 500;
mod.embed("moderator-embed-target");
</script>
E.g.
Use the {moderator} Macro on a Page
Just edit a page in the normal way and add the {moderator} macro to the page.
View the Results
Next Steps
The above works quite well for a basic integration, but I'd like to have more control over the look and feel of Google Moderator on a page so I'm going to see if I can create a Confluence plugin or OpenSocial gadgets using the Google Moderator API.
No comments:
Post a Comment