Adding IBM Connections Feeds to TweetDeck

Here’s a guide on how to add feeds from IBM Connections to TweetDeck which was prompted by this tweet from Bruce Elgort:

The basic process is:

1. Identify the IBM Connections feed URL that you want to add
2. Submit the IBM Connections fee URL to FreeMyFeed to create an unauthenticated version of it
3. Create a Twitter account to post the feed to
4. Submit the unauthenticated feed generated from FreeMyFeed in step 2 to twitterfeed and configure twitfereed to post the feed content to the Twitter account created in step 3
5. Add the Twitter account to Tweetdeck

DISCLAIMER: The process requires you to publish content from your IBM Connections implementation and make it public on the Internet. I take no responsibility for you publishing restricted information from your IBM Connections implementation publicly on the Internet. You know your content and if it is sensitive or not, if it’s sensitive don’t make it public.

1. Identify the IBM Connections Feed URL

The feed URLs for status updates are documented in the IBM Connections 3.0.1 Documentation and for this blog post I’m using the feed of all public updates from Lotus Greenhouse which is:

https://greenhouse.lotus.com/news/atom/stories/public

This feed will return the same status updates as the “Discover” section of the “Updates” tab.

For your feed follow the documentation to determine the feed URL that you wish to use and obviously replace “https://greenhouse.lotus.com” with the address of your IBM Connections implementation.

2. Submit the IBM Connections Feed to FreeMyFeed

As most IBM Connections implementations will require authentication the feed needs to be submitted to a service such as FreeMyFeed which will create an unauthenticated version of the IBM Connections feed. Just visit https://freemyfeed.com and supply the feed URL from step 1 and the username and password of your IBM Connections implementation.

3. Create a Twitter Account to Post the Feed to

Rather than posting the IBM Connections status updates to your own Twitter account you probably want to create a new Twitter account so that you (and anyone else that may find it useful) can subscribe to it separately.

4. Submit the FreeMyFeed Feed to twitterfeed

In order to automatically post the status updates to the Twitter account created in step 3 I use the twitterfeed service.

a. Create an account on twitterfeed and select “Create New Feed”
b. Provide a name for your feed, e.g. “IBM Greenhouse” and copy and paste the URL generated by FreeMyFeed in step 2, e.g. “https://freemyfeed.com/feed/aHR0cHM6Ly9ncmVlbmhvdXNlLmxvdHVzLmNvbS9uZXdzL2F0b20vc3Rvcmllcy9wdWJsaWM6OmZyYXlsaW5nYWoxQGNhcmRpZmYuYWMudWs6OlBRcU9NT0NPVUZhQ3JYek5ENmhDTWpvNk1nPT0=”
c. Click “test rss feed” and you should see that the feed is “Active” and that the “Feed parsed OK” as shown below

Twitterfeed Feed OK

d. Before moving on to Step 2 of the twitterfeed wizard select the “Advanced Settings” option and change the “Post Content” field to “title only”

Twitterfeed Advanced Settings

e. Continue to Step 2 of the twitterfeed wizard and you should see that the feed has been successfully created:

Twitterfeed Success

f. Select the option to connect to Twitter and authenticate the twitterfeed service to the Twitter account created in step 3.
g. Leave the UTM Tags as the defaults, select “Create Service” and you should see:

Twitterfeed Service Successful

h. Click “All Done” and “Go to Dashboard”

It can take up to an hour for twitterfeed  to start processing feeds, but after a while you should see that it is posting to the Twitter account:

Twitter Updates

5. Add the Twitter Account to Tweetdeck

Add the account to Tweetdeck, add a column, select to display “Tweets” and select the relevant Twitter account.

TweetDeck

Related Links

Confluence Space Meta Data User Macro

As an alternative / addition to the bundled Space Details macro for Confluence:

Space Details

here’s a simple user macro which displays extra details about a Confluence Space such as number of pages, number of blog posts, total size of attachments, etc. which you may find useful for a Community Management Dashboard:

Space Meta Data

NB: I couldn’t figure out how to round to 2 decimal places for the attachment size in Velocity without Velocity MathTool, if you know how to do that please drop me a line via the comments ;-)

To create the user macro:

1. Login to Confluence as a Confluence Administrator
2.  Select Browse -> Confluence Admin
3. Select User Macros -> Create a new user macro
4. Enter the information as provided below:

Edit Space Meta Macro

Template:

## Macro title: Space Meta Data
## Macro has a body: Y or N (N)
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Andrew Frayling
## Date created: 03/05/2012
## Installed by: <your name>

## Macro to display information such as number of pages, number of blog posts, attachment size, etc. about a Space. 

## @noparams

## Get space details
#set ( $spaceName = $space.getName() )
#set ( $spaceKey = $space.getKey() )
#set ( $spaceHome = $space.getHomePage() )
#set ( $spaceCreator = $space.getCreatorName() )
#set ( $spaceCreationDate = $space.getCreationDate() )
#set ( $spaceDescription = $space.getDescription() )
#set ( $pageCount = $spaceManager.findPageTotal($space) )
#set ( $blogCount = $spaceManager.getNumberOfBlogPosts($space) )

## Get all pages in the current Space
#set ( $allPagesInSpace = $pageManager.getPages($space, true) )

## Reset total attachment file size
#set ( $totalAttachmentFileSizeForSpace = 0 )

## Reset total number of attachments
#set ( $totalAttachmentCount = 0 )

## Loop through all pages in the current Space
#foreach ($page in $allPagesInSpace)
  ## reset the attachment count for each page
  #set ( $pageAttachmentCount = 0 )
  ## reset the attachment file size total for each page
  #set ( $totalFileSizePerPage = 0 )
  ## get the attachments for each page
  #set ( $allAttachments = $page.getAttachments() )
  ## Loop through each attachment
  #foreach ($attachment in $allAttachments)
    ## Increment the attachment count for the page
    #set ( $pageAttachmentCount = $pageAttachmentCount + 1 )
    ## Sum the size of the attachments on the page
    #set ( $totalFileSizePerPage = $totalFileSizePerPage + $attachment.getFileSize() )
  #end
  ## End looping through attachments
  ## Increment total attachment count for the current Space
  #set ( $totalAttachmentCount = $totalAttachmentCount + $pageAttachmentCount )
  ## Sum the total size of attachments for the current Space
  #set ( $totalAttachmentFileSizeForSpace = $totalAttachmentFileSizeForSpace + $totalFileSizePerPage )
#end
## End looping through pages

## Convert attachment size to MBs
#set ( $attachmentSizeMb = ($totalAttachmentFileSizeForSpace / 1024.00) / 1024.00 )

## Display Space Details
<table class="confluenceTable">
  <tbody>
    <tr>
      <th class="confluenceTh">Name</th>
      <td class="confluenceTd">$spaceName</td>
    </tr>
    <tr>
      <th class="confluenceTh">Key</th>
      <td class="confluenceTd">$spaceKey</td>
    </tr>
    <tr>
      <th class="confluenceTh">Description</th>
      <td class="confluenceTd">$spaceDescription.getBodyAsString()</td>
    </tr>
    <tr>
      <th class="confluenceTh">Home Page</th>
      <td class="confluenceTd">#contentLink2($spaceHome true false)</td>
    </tr>
    <tr>
      <th class="confluenceTh">Created By</th>
      <td class="confluenceTd">#usernameLink($spaceCreator) ($action.dateFormatter.formatDateTime($spaceCreationDate))</td>
    </tr>
    <tr>
      <th class="confluenceTh">Number of Pages</th>
      <td class="confluenceTd">$pageCount</td>
    </tr>
    <tr>
      <th class="confluenceTh">Number of Blog Posts</th>
      <td class="confluenceTd">$blogCount</td>
    </tr>
    <tr>
      <th class="confluenceTh">Number of Attachments</th>
      <td class="confluenceTd">$totalAttachmentCount (including all versions)</td>
    </tr>
    <tr>
      <th class="confluenceTh">Total Size of Attachments</th>
      <td class="confluenceTd">$attachmentSizeMb MB</td>
    </tr>
  </tbody>
</table>

5. Click Save

You can then use the macro on a page by using:

{spacemeta}

Or select the macro from the Macro Browser via Insert -> Other Macros:

Insert Space Meta Data Macro

I Hope you find this useful. The source code is available on Bitbucket.

Related Links

Tips via Twitter for Confluence enterprise wiki

Got a Confluence tip? Tweet it now then see it in the Confluence docs.

Confluence Space Administrators – Remixed

A few weeks ago I blogged about how to write a Confluence user macro to list Space Administrators. The macro works, but is not ideal for implementations with a large user base as it loops through every user to find out if that user can administer the Space or not. This is a new version which loops through the permissions on the current Space and then lists the users and groups that can administer the Space – which should be a lot more performant than the previous version.

General instructions for creating the macro are the same as the previous post, but replace the Template with the following code:

## Macro title: Space Administrators
## Macro has a body: Y or N (N)
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Andrew Frayling
## Date created: 28/04/2012
## Installed by: <your name>

## Macro to list all users and groups with the permission to administer the current space.
## @noparams

<h1>Space Adminstrators</h1>
<p>The following users and groups have permission to administer the <strong>$space.getName()</strong> Space.</p>

<h2>Users</h2>

<table class="confluenceTable">
  <tr>
    <th class="confluenceTh">Space Administrators</th>
  </tr>

  #foreach ($permission in $space.getPermissions())
    #if ($permission.isUserPermission() && $permission.getType() == "SETSPACEPERMISSIONS")
      <tr>
        <td class="confluenceTd">#usernameLink($permission.getUserName())</td>
      </tr>
    #end
  #end
</table>

<h2>Groups</h2>

#foreach ($permission in $space.getPermissions())
  #if ($permission.isGroupPermission() && $permission.getType() == "SETSPACEPERMISSIONS")
    #set ( $groupString = $permission.getGroup() )
    #set ( $groupObject = $userAccessor.getGroup($groupString) )
    #set ( $memberList = $userAccessor.getMemberNamesAsList($groupObject) )

    <h3>$groupString</h3>
    <table class="confluenceTable">
      <tr>
        <th class="confluenceTh">Space Administrators</th>
      </tr>

      #foreach ($member in $memberList)
        <tr>
          <td class="confluenceTd">#usernameLink($member)</td>
        </tr>
      #end
    </table>
  #end
#end

The macro loops through the permissions twice – once to pick up the users that have been given the administration permission directly, and a second time to pick up users that have inherited the permission by being a member of a group with the permission.

Using this macro will then give you the following:

Space Administrators

I hope you find it useful and if there are other ways of improving this macro please drop me a line via the comments.

Related Links

Tips via Twitter for Confluence enterprise wiki

Got a Confluence tip? Tweet it now then see it in the Confluence docs.

An Experiment with Dropbox and Google AdWords

The other weekend I ran an experiment with Google AdWords to see if I could max out my Dropbox referrals to get an extra 16GB of free storage using my free £75 AdWords voucher. This is the same hack that Vladik Rikhter blogged about back in September 2011; and with a ton of people doing the same following Vladik’s post I wanted to see if it still worked. Short answer: yes it does :-)

For those that don’t know what Dropbox is, it’s an online service for backing up, synching and sharing files and has clients for Web, Windows, OSX, Linux, iPhone, iPad, Android and Blackberry. The basic service gives you 2GB of storage for free (with paid plans offering more storage) and you can earn up to an extra 16GB of free storage through referrals (500MB per referral). If you want to sync files to have them available on multiple devices, or want to share files with other people it’s incredibly useful.

I just have the basic plan and had zero referrals before I started the AdWords campaign so needed 32 referrals to reach the 16GB maximum. I ran the campaign over the weekend of 14-15 April 2012, switching it off at around 6am on Monday 16 April 2012, and gained 59 referrals – more than enough for the extra 16GB of free storage.

The Figures

Ad Impressions: 21,141
Click Thru’s: 484
Click Thru Rate: 2.29%
Average Cost Per Click: £0.09
Total Ad Spend: £44.73

From the 484 click thru’s this generated the following numbers:

Total Joined Dropbox: 83
Total Installed Dropbox: 59
Total Ineligible: 1
Abandonment Rate: 28.91% (24 not installed / 83 joined)
Conversion Rate: 12.19% (59 installs / 484 click thru’s)
Cost Per Conversion: £0.79 (£44.73 ad spend / 59 installs)

NB: you only get the referral bonus if someone installs Dropbox after joining.

It’s the first time I’d used AdWords and the stats geek in me found the numbers really interesting. From running this short experiment you can see how online advertising costs could soon mount up and why targeted advertising to help increase that magic “conversion rate” is so appealing.

Related Links

List Blog Posts Confluence User Macro

Following on from my previous post on Creating a Blog Summary Page in Confluence here is a simple user macro which will list all of the blog posts in the current Confluence Space which were posted in the current month and the previous month, grouped by month.

List Blog Posts

To create the user macro:

1. Login to Confluence as a Confluence Administrator
2.  Select Browse -> Confluence Admin
3. Select User Macros -> Create a new user macro
4. Enter the information as provided below:

Edit Blog Post Macro

Template:

## Macro title: List Blog Posts
## Macro has a body: Y or N (N)
## Body processing: Selected body processing option (No macro body)
## Output: Selected output option
##
## Developed by: Andrew Frayling
## Date created: 13/04/2012
## Installed by: <your name>

## Macro to display blog posts for the current and previous months
## @noparams

#set ( $allBlogsInSpace = $pageManager.getBlogPosts($space, true) )

## get a calendar object for the current date
#set ( $currentDate = $action.dateFormatter.getCalendar() )

## Define an array of Month names
#set ( $monthArray = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] )

## set the current month
#set ( $currentMonthNum = $currentDate.get(2) )
#set ( $currentMonth = $monthArray.get($currentMonthNum) )

## Display posts for the current month
<h5>$currentMonth</h5>
#foreach($blog in $allBlogsInSpace)
  #if ($blog.getPostingMonth() == $currentMonth)
    #contentLink2($blog, true, false) $blog.getPostingDayOfMonth() $blog.getPostingMonth() $blog.getPostingYear()<br />
  #end
#end

## set the previous month
#set ( $previousMonthNum = $currentDate.get(2) - 1 )
#set ($previousMonth = $monthArray.get($previousMonthNum) )

## Display posts for the previous month
<h5>$previousMonth</h5>
#foreach($blog in $allBlogsInSpace)
  #if ($blog.getPostingMonth() == $previousMonth)
    #contentLink2($blog, true, false) $blog.getPostingDayOfMonth() $blog.getPostingMonth() $blog.getPostingYear()<br />
  #end
#end

5. Click Save

You can then use the macro on a page by using:

{listblogposts}

Or select the macro from the Macro Browser via Insert -> Other Macros:

List Blog Post Macro Browser

Adding this macro to my Blog Summary Page it now looks like:

Blog Summary Page

Hope you find this useful. The source code is available on Bitbucket.

Related Links

Tips via Twitter for Confluence enterprise wiki

Got a Confluence tip? Tweet it now then see it in the Confluence docs.

Confluence 4.2 is Here

Confluence NinjaAtlassian continue to iterate faster than a ninja in slippers with the release of Confluence 4.2 today; a mere 4 months since the release of Confluence 4.1 and just 7 months after Confluence 4.0 was unleashed on the world.

There have already been a few teaser blog posts detailing some of the new functionality in 4.2:

but here’s a look at what else is new.

Page Layouts

If you’re familiar with Confluence you’re probably familiar with the fun and games you could get into nesting {section} and {column} macros to try and bring some order to your pages – see one of my previous blog posts for an example. With Confluence 4.2 that pain is taken away with the introduction of predefined page layouts.

Page Layouts

Likes and Quick Comments

Confluence 4.2 also introduces Facebook style “Likes” to help encourage user engagement and identify popular content. Engagement is also encouraged via the new comment functionality which invites users to comment by displaying their profile picture and launching the comment dialogue with a single click.

Likes and Quick Comments

Popular Content and Personalised Email Summaries

Your users are flagging the content that they like and Confluence 4.2 makes it easy for them to stay in the loop with what’s hot with popular content on the Dashboard and personalised email summaries.

Popular Content Dashboard

Popular Content Email Summary

If you like what you’ve seen so far head on over to the official announcement to get the full details, or why not jump right in and download Confluence 4.2 today.

Related Links

S7RUCAW2VRKH

Creating a Blog Summary Page in Confluence

Here’s a guide on how to create a blog home / summary page in Confluence that mimics traditional blog platforms layout and functionality. Displaying Recent Comments and Labels works best if the blog posts are in a dedicated Confluence Space.

Blog preview

Page Layout

Create the 2-column page layout using a Section Macro and 2 Column Macros with widths of 65% and 35% for the left and right hand columns respectively.

Blog Layout

Left Hand Column

In the left hand column insert a Blog Posts Macro configured with the following parameters:

Content Type to Display: excerpts
Time Frame: 31d
Maximum Number of Blog Posts: 100
Sort By: modified
Reverse Sort: checked

All other parameters left blank.

Right Hand Column

In the right hand column insert 3 Panel Macros with the relevant titles: Recent Posts, Recent Comments and Labels.

In the first Panel Macro insert a Recently Updated Macro with the following parameters:

Width of Table: 100%
Include these Content Types Only: blogpost
Maximum Number of Results: 15
Theme: concise

All other parameters left blank.

In the second Panel Macro insert a Recently Updated Macro with the following parameters:

Width of Table: 100%
Include these Content Types Only: comment
Maximum Number of Results: 15
Theme: concise

All other parameters left blank.

In the third Panel Macro insert a Popular Labels Macro with the following parameters:

Number of Labels to Display: 100
Restrict Labels to this Space Key: <the key of your blog space, e.g. BLOG>
Style of Labels: heatmap

As mentioned above, displaying Recent Comments and Labels works best if the blog posts are in a dedicated Confluence Space as there are no Recently Updated Macro parameters that allow you to specify “blog comments” as opposed to comments on pages nor are there macro parameters that allow you to restrict the Popular Labels Macro to labels applied to blog posts only.

Related Links

Tips via Twitter for Confluence enterprise wiki

Got a Confluence tip? Tweet it now then see it in the Confluence docs.

 

Tracking Confluence Attachment Downloads with Google Analytics

If you’re using Google Analytics to track Confluence usage – and if not, why not, David Simpson has an excellent guide on tracking Confluence usage with Google Analytics – you may have noticed that Google Analytics doesn’t track attachment downloads. This is because downloads such as PDFs, Word Docs, Powerpoint Presentations, etc. are not web pages and therefore do not include the Google Analytics tracking code. Fortunately there is a solution based on this support document from Google:

1. Login to Confluence as a Confluence Administrator
2. Select Browse -> Confluence Admin
3. Select Look and Feel -> Custom HTML and enter the following JS snippet in the “At end of HEAD” section in addition to your Google Analytics tracking code:

<script>
AJS.toInit(function() {
  AJS.$("a[href*='/download/attachments/']").click(function() {
    _gaq.push(['_trackPageview', AJS.$(this).attr('href')])
  });
});
</script>

4. Click Save

After 24-48 hours you should then see your attachments being tracked in Google Analytics under Content -> Site Content -> Pages:

Google Analytics Page View

Happy Tracking :-)

Related Links

Tips via Twitter for Confluence enterprise wiki

Got a Confluence tip? Tweet it now then see it in the Confluence docs.

 

Confluence Blog Posts Macro Not Updating

A popular feature in Confluence is the ability to create blog posts and aggregate them using the Blog Posts Macro. In order to improve performance the Blog Posts Macro applies an aggressive caching mechanism and it is not uncommon for new blog posts to take a while to appear in the list of posts generated by the macro.

If posts are taking an unusually long time to appear you may need to rebuild Confluence’s indexes:

1. Login to Confluence as a Confluence Administrator
2. Select Browse -> Confluence Admin -> Administration -> Content Indexing
3. Rebuild both the “Search Index” and “Did You Mean Index”

Sometimes, however, the caches and indexes may have become corrupted and rebuilding the indexes via the Confluence UI does not resolve the issue. In this case the indexes may need to be manually rebuilt from scratch:

1. Shutdown Confluence
2. If it exists, backup your <Confluence Home>/index/plugin directory
3. Delete your <Confluence Home>/index directory
4. Create a new <Confluence Home>/index directory and copy in the <Confluence Home>/index/plugin directory from step 2
5. Restart Confluence
6. Follow the steps 1-3 above to rebuild Confluence’s indexes

Hopefully that should resolve the issue and you should not have to go through this manual rebuild from scratch too often, but it may be necessary if the caches and/or indexes become corrupted again.

Related Links

Tips via Twitter for Confluence enterprise wiki

Got a Confluence tip? Tweet it now then see it in the Confluence docs.

Confluence List Space Administrators User Macro

A recent question on Atlassian Answers asked if it was possible to display a list of Confluence Space Administrators to end users so that the end users could go directly to a Space Administrator to ask for permissions rather than having to go via the Confluence Administrators, who would then have to contact the Space Administrators to confirm that it was OK to grant the permissions, causing a delay in the process.

Detailed below is a simple user macro that lists all of the users with administration permissions on the current space with the profile card hover so that users can visit the administrators’ profiles and view their contact details. The macro lists users that have administration permissions inherited from group memberships and from being a Confluence Administrator in addition to the users who have explicitly been granted administration permissions on their individual accounts.

List Space Administrators

To create the macro:

1. Login to Confluence as a Confluence Administrator
2.  Select Browse -> Confluence Admin
3. Select User Macros -> Create a new user macro
4. Enter the information as provided below:

Edit Space Admin Macro

 Template:

## Macro title: Space Administrators
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Andrew Frayling
## Date created: 21/03/2012
## Installed by: <your name>
## Macro to display a list of user that are able to administer the current space.
## @noparams

#set($containerManagerClass = $content.class.forName('com.atlassian.spring.container.ContainerManager'))
#set($getInstanceMethod = $containerManagerClass.getDeclaredMethod('getInstance',null))
#set($containerManager = $getInstanceMethod.invoke(null,null))
#set($containerContext = $containerManager.containerContext)
#set($users = $userAccessor.getUsers())

<table class="confluenceTable">
  <tr>
    <th class="confluenceTh">Space Administrators</th>
  </tr>

  #foreach($user in $users)
  ## list the users who can administer the current space
  #if ($permissionHelper.canAdminister($user, $space))
    <tr>
      <td class="confluenceTd">#usernameLink($user.name)</td>
    </tr>
  #end
#end
</table>

5. Click Save

You can then use the following macro when editing a page:

{spaceadmins}

Or select the macro from the Macro Browser via Insert -> Other Macros:

Insert Space Admin Macro

Hope you find it useful :-) The source code for this user macro is available on Bitbucket.

Related Links

Tips via Twitter for Confluence enterprise wiki
Got a Confluence tip? Tweet it now then see it in the Confluence docs.