如何将Laconica更新流集成到SharePoint中? [英] How can I integrate Laconica update stream into SharePoint?

查看:103
本文介绍了如何将Laconica更新流集成到SharePoint中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 Laconica (自行托管 twitter )配置在我的本地Intranet上,并希望通过Web部件将公共流集成到SharePoint网站中.我该怎么办?

I have Laconica (self hosted twitter) configured on my local intranet and would like to integrate the public stream into SharePoint site with a web part. How can I do this?

推荐答案

您可以将RSS Viewer Web部件指向laconi.ca公共流RSS feed,并使用此XSLT来确保吸引人的输出.

You can point an RSS Viewer web part at the laconi.ca public stream RSS feed and use this XSLT to ensure attractive output.

结果屏幕截图:

SharePoint工作组网站http://friendfeed.s3.amazonaws.com/9e1759e689923f47ed4aa8721c9e104980db

Screenshot of Laconica update stream in SharePoint Team Site http://friendfeed.s3.amazonaws.com/9e1759e689923f47ed4aa8721c9e104980db4b1c

XSL转换:

<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" version="1.0" exclude-result-prefixes="xsl ddwrt msxsl rssaggwrt"
               xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
               xmlns:rssaggwrt="http://schemas.microsoft.com/WebParts/v3/rssagg/runtime"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:msxsl="urn:schemas-microsoft-com:xslt"
               xmlns:rssFeed="urn:schemas-microsoft-com:sharepoint:RSSAggregatorWebPart"
               xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
               xmlns:dc="http://purl.org/dc/elements/1.1/"
               xmlns:rss="http://purl.org/rss/1.0/"
               xmlns:atom="http://www.w3.org/2005/Atom"
               xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
               xmlns:atom2="http://purl.org/atom/ns#"
               xmlns:ddwrt2="urn:frontpage:internal"
               xmlns:laconica="http://laconi.ca/ont/">
  <xsl:param name="rss_FeedLimit">5</xsl:param>
  <xsl:param name="rss_ExpandFeed">false</xsl:param>
  <xsl:param name="rss_LCID">1033</xsl:param>
  <xsl:param name="rss_WebPartID">RSS_Viewer_WebPart</xsl:param>
  <xsl:param name="rss_alignValue">left</xsl:param>
  <xsl:param name="rss_IsDesignMode">True</xsl:param>
  <xsl:template match="rdf:RDF">
    <xsl:call-template name="RDFMainTemplate"/>
  </xsl:template>
  <xsl:template name="RDFMainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
    <xsl:variable name="Rows" select="rss:item"/>
    <xsl:variable name="RowCount" select="count($Rows)"/>
    <div class="slm-layout-main" >
      <xsl:call-template name="RDFMainTemplate.body">
        <xsl:with-param name="Rows" select="$Rows"/>
        <xsl:with-param name="RowCount" select="count($Rows)"/>
      </xsl:call-template>
    </div>
  </xsl:template>
  <xsl:template name="RDFMainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
    <xsl:param name="Rows"/>
    <xsl:param name="RowCount"/>
    <xsl:for-each select="$Rows">
      <xsl:variable name="CurPosition" select="position()" />
      <xsl:variable name="RssFeedLink" select="$rss_WebPartID" />
      <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" />
      <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)">
        <xsl:element name="div">
          <xsl:if test="($CurPosition mod 2 = 1)">
            <xsl:attribute name="style"><![CDATA[background-color:#F9F9F9;]]></xsl:attribute>
          </xsl:if>
          <xsl:element name="table">
            <xsl:attribute name="cellpadding">0</xsl:attribute>
            <xsl:attribute name="border">0</xsl:attribute>
            <xsl:attribute name="style"><![CDATA[margin:0px;padding:0px;border-spacing:0px;background-color:transparent;]]></xsl:attribute>
            <xsl:element name="tr">
              <xsl:element name="td">
                <xsl:attribute name="style"><![CDATA[vertical-align:top;padding:0px;background-color:transparent;]]></xsl:attribute>
                <xsl:attribute name="rowspan">2</xsl:attribute>
                <xsl:element name="img">
                  <xsl:attribute name="src"><xsl:value-of select="laconica:postIcon/@rdf:resource"/></xsl:attribute>
                  <xsl:attribute name="style"><![CDATA[margin:3px;height:48px;width:48px;]]></xsl:attribute>
                </xsl:element>
              </xsl:element>
              <xsl:element name="td">
                <xsl:attribute name="style"><![CDATA[vertical-align:top;padding:0px;background-color:transparent;]]></xsl:attribute>
                <div>
                  <strong><xsl:value-of select="substring-before(rss:title, ':')"/></strong>
                </div>
                <div style="width:300px;overflow-x:hidden;">
                  <div>
                    <xsl:value-of select="substring-after(rss:title, ':')"/>
                  </div>
                </div>
              </xsl:element>
            </xsl:element>
            <xsl:element name="tr">
              <xsl:element name="td">
                <xsl:attribute name="style"><![CDATA[padding:0px;background-color:transparent;]]></xsl:attribute>
                <xsl:element name="a">
                  <xsl:attribute name="href"><xsl:value-of select="rss:link"/></xsl:attribute>
                  <xsl:value-of select="ddwrt:FormatDate(dc:date,number($rss_LCID),15)"/>
                </xsl:element>
              </xsl:element>
            </xsl:element>
          </xsl:element>
        </xsl:element>
      </xsl:if>
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>

这篇关于如何将Laconica更新流集成到SharePoint中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆