Get Social & Collaborate!
Tags
« Infinite scrolling Activity Stream in IBM Connections | Main | INFORM (AusLUG) 2015 - Call for Speakers and Sponsors »
Monday
May042015

Jay's awesome auto-magic News Feed tweak for IBM Connections 

The other day Jay was looking for something to do with his spare moments in between finalising Kudos Analytics Cloud and Kudos Boards Mobile (come on Jay you don't really have spare time;) and he made an awesome tweak to our internal deployment of IBM Connections. I thought it was worth sharing so here it is:

There's no mechanism in Connections by default to notify people of new posts in the News Feed. Forcing users to refresh the page, or click on 'Discover' / 'I'm Following' to find out if something new has happened. 

 

I had an idea to solve this problem with a little javascript injection into the header.jsp. 

A couple of hours of coding and testing later, it actually worked as planned and is now implemented in our production environment (feedback welcome). 

 

What does it do?

A - Shows a button with 'X New Posts' at the top of the news feed (screenshot below)

B- Updates the page title, which lets you see if there are any updates without switching to the tab. (Also makes the tab glow if it is pinned - as seen on Facebook, Instagram, etc.)

 

How?

The script first checks to see if it's in Homepage on load. You don't want to make a request every X seconds from every page in connections.

It then periodically polls the RSS feed for the current stream to retrieve any entries since the time the page was loaded. (Thanks to Mr. Andrew "API" Welch for his input here)

If it finds any new entries, it shows a bar at the top indicating the number of new updates and, my favourite part, updates the document.title allowing you to see if there are any updates without the need to actually switch to the tab

You might need to refresh your homepage for it to take effect. And you might have to wait till there are some new posts as well :) 

 Code to implement this:

  1. Put the activity-stream-notifier.jsp file in the same folder as the customised header.jsp. 
  2. Add the following line at the end of your header.jsp:‚Äč  --%><%@ include file="./activity-stream-notifier.jsp" %><%--
The results are as per the below screenshot:

 

Well I think that is pretty neat. Hope you can make use of it!

 

 

 

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (3)

Hi
We have been looking for such tool for a while. I have tried it but unfortunately I can't get it to load properly. I followed the instructions above and once I save the header.jsp, the top bar completely disappear from our connections.
Did I miss any step ?
May 27, 2015 | Unregistered CommenterArey
Hi Adam, works like a charm, many thx to you and Jay!
May 28, 2015 | Unregistered CommenterKlaus
What an amazing job, great stuff Jay.
June 5, 2015 | Unregistered CommenterServicing Stop

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.