Configure the Recent Posts widget 

Configure the Recent Posts widget to display multiple feeds in a user's profile. The widget can be extended to display additional feeds from IBM Connections applications and external services as required.


Before starting

To edit configuration files, use the IBM WAS wsadmin client. See Starting the wsadmin client for information about how to start the wsadmin command-line tool.


About this task

The Recent Posts widget that displays on a user's profile page provides an aggregated summary of that user's recent activity in the different IBM Connections applications. The widget also displays the latest updates from content that the profile owner is a member of, such as communities and wikis. The widget only displays updates for content that is publicly accessible.

The Recent Posts widget is automatically configured to provide feeds from all the IBM Connections applications, but you can configure it to display information for only those applications that are included in your deployment.


Procedure

To configure the Recent Posts widget...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("profilesAdmin.py")

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  • Check out the widget configuration file:

      ProfilesConfigService.checkOutWidgetConfig("<working_directory>", "<cell_name>")

      where:

      • <working_directory> is the temporary working directory to which the configuration XML and XSD files will be copied. The files are kept in this working directory while you make changes to them.

      • <cell_name> is the name of the WAS cell hosting the Profiles application. This argument is required.

      For example:

      ProfilesConfigService.checkOutWidgetConfig("/wsadminoutput", "jdoe30Node02Cell")

  • Open widgets-config.xml in a text editor, and specify the widget attributes using the information in the following tables. You can find the configuration section for this component under config > widgets > definitions > widgetDef > defId = multiFeedReader > configData.

      Table 1. Recent posts widget attributes
      Attribute Description
      serviceNameResourceId The resource string that specifies the name of the given feed that is displayed in the tab.
      serviceNameFeedUrl The feed URL for the specified IBM Connections application. A standard URL can be used, or a serviceNameSvcRef parameter can be used if the serviceName has been defined in the lotusConnections-config.xml file.

      Specify the following URL parameters:

      Table 2. Recent posts widget URL parameters

      Parameter Description
      email A substitution variable for the user email displayed. This is used as a placeholder in the URL; it is replaced at runtime.
      serviceNameSvcRef A substitution variable for the URL value that is replaced at runtime. This parameter is retrieved from the lotusConnections-config.xml file for the given IBM Connections application.

      For example:

      <widgetDef defId="multiFeedReader" url="{contextRoot}/widget-catalog/multifeedreader.xml?version={version}">
        <itemSet>
          <item name="numberOfEntriesToDisplay" value="5" />
          <item name="communityResourceId" value="communityResourceId"/>
          <item name="communityFeedUrl" value="{communitiesSvcRef}/service/atom/communities/all?userid={userid}&amp;ps=5"/>
          <item name="dogearResourceId" value="dogearResourceId"/>
          <item name="dogearFeedUrl" value="{dogearSvcRef}/atom?userid={userid}&amp;access=any&amp;sort=date&amp;sortOrder=desc&amp;ps=5&amp;showFavIcon=true{appLangParam}"/>
          <item name="blogsResourceId" value="blogsResourceId"/>
          <item name="blogsFeedUrl" value="{blogsSvcRef}/roller-ui/feed/{userid}?order=asc&amp;maxresults=5&amp;sortby=0"/>
          <item name="activitiesResourceId" value="activitiesResourceId"/>
          <item name="activitiesFeedUrl" value="{activitiesSvcRef}/service/atom2/activities?public=only&amp;userid={userid}&amp;authenticate=no&amp;ps=5"/>
          <item name="filesResourceId" value="filesResourceId"/>
          <item name="filesFeedUrl" value="{filesSvcRef}/basic/anonymous/api/userlibrary/{userid}/feed?pagesize=5"/>
        </itemSet>
      </widgetDef>

  • To remove an application feed, comment out or delete the <serviceNameResourceId> and <serviceFeedUrl> attributes.

      Note: To comment out the attributes, use the <!-- XML notation to open the comment and --> to close the comment.

      In the following example, feeds from the Activities and Files applications are removed from the widget:

      <!--  <item name="activitiesResourceId" value="activitiesResourceId"/>
            <item name="activitiesFeedUrl" value="{activitiesSvcRef}/service/atom2/activities?public=only&amp;userid={userid}&amp;authenticate=no&amp;ps=5"/>                    
            <item name="filesResourceId" value="filesResourceId"/>
            <item name="filesFeedUrl" value="{filesSvcRef}/basic/anonymous/api/userlibrary/{userid}/feed?pagesize=5"/>  -->
        </itemSet>
      </widgetDef>

  • Save your changes and check the widgets-config.xml file back in using the following command:

      ProfilesConfigService.checkInWidgetConfig()

  • To exit the wsadmin client, type exit at the prompt.

  • Stop and restart the Profiles server.


    Parent topic

    Configure widgets in Profiles

    Related concepts
    Configure widgets in Profiles


    Related tasks


    Apply property changes in Profiles
    Checking out the widgets-config.xml file for Profiles
    Manage widgets in Profiles


       

     

    });

    +

    Search Tips   |   Advanced Search