Ok so now for Blogs. In past entries we have integrated Homepage, Profiles, Communities, Search, Dogear, Wikis, Files, and Activies. Blogs initially proved to be a challenge but wasn't that much harder in the end.
The main differences with Blogs are that:
1) You need to use a slightly different script.
2) You need to update the JSP's but also the Blog Theme templates
3) You need to use wsadmin to update the timestamp and restart the server.
So the script to use is:
<script type="text/javascript">
#if($model.getRequestParameter('FromPortal') == 'true')
document.cookie="FromPortal=true; path=/";
#else
if(testCookieForFromPortal()) {
document.cookie="FromPortal=true; path=/";
}
#end
function testCookieForFromPortal() {
if (getCookieValue("FromPortal") == "true") {
return true;
} else {
return false;
}
}
function getCookieValue(cookieName) {
var retVal = "";
var i = document.cookie.indexOf(cookieName);
if (i != -1) {
var iVal = i + cookieName.length + 1;
var j = document.cookie.indexOf(";", iVal);
if (j < 0) retval = document.cookie.substring(iVal);
else retval = document.cookie.substring(iVal,j);
}
return retVal;
}
// the themeTemplateURL variable should be set to the URL defined
// as the src attribute of the <script/> tag generated by the
// WebAppIntegrator portlet.
</script>
Update the following files:
\installedApps\Blogs.ear\blogs.war\WEB-INF\jsps\tiles\tiles-adminpage.jsp
\installedApps\Blogs.ear\blogs.war\WEB-INF\jsps\tiles\tiles-embeddedpage.jsp
\installedApps\Blogs.ear\blogs.war\WEB-INF\jsps\tiles\tiles-mainmenupage.jsp
\installedApps\Blogs.ear\blogs.war\WEB-INF\jsps\tiles\tiles-simplepage.jsp
\installedApps\Blogs.ear\blogs.war\WEB-INF\jsps\tiles\tiles-tabbedpage.jsp
Themes:
Update each Theme by adding the script to the _header.vm file . The themes are located in the blogs.was/themes directory.
Update Timestamp:
Next you need to update the timestamp for the configuration files:
http://publib.boulder.ibm.com/infocenter/ltscnnct/v2r0/topic/com.ibm.connections.25.help/t_admin_common_customize_postreq.html
and then restart the servers.
And that should be it!
So we now have all features with the ability to add the ?FromPortal=true paramater to the URL and the Top Navigation Banner will disappear.
Once this is all done integrating with Portal is really easy using the Web Page Portlet. Simply add the Portet to a page and point the configuration of the Portlet to the appropriate URL. When users access Connections within the Portal the top navigation automagically disappears and you can use the Portal navigation instead. I found setting the Web Page Portlet to a height of 1100 meant that you never get a scroll bar in the Portlet.
The next step for me to to try and do the same with the Web Application Integrator Portlet which will mean that we effectively wrap the Portal Navigation around Connections rather than use the iFrame that the Web Page Portlet method users. This is fairly easy but first I need to build our custom theme into the Web App Integrator. Might be Part 4!