parent
9fa670ca6d
commit
ed68304ca1
|
@ -2,5 +2,5 @@
|
||||||
<gallery id="media-lachmoewe">https://media.c3d2.de/u/lachmoewe/atom/</gallery>
|
<gallery id="media-lachmoewe">https://media.c3d2.de/u/lachmoewe/atom/</gallery>
|
||||||
<gallery id="media-bigalex">https://media.c3d2.de/u/bigalex/atom/</gallery>
|
<gallery id="media-bigalex">https://media.c3d2.de/u/bigalex/atom/</gallery>
|
||||||
<gallery id="media-astro">https://media.c3d2.de/u/astro/atom/</gallery>
|
<gallery id="media-astro">https://media.c3d2.de/u/astro/atom/</gallery>
|
||||||
<wiki id="wiki">https://wiki.c3d2.de/w/index.php?title=Spezial:Letzte_%C3%84nderungen&feed=atom&days=300&limit=60</wiki>
|
<wiki id="wiki">https://wiki.c3d2.de/w/api.php?action=query&list=recentchanges&format=xml&rcnamespace=0|1|4|5|6|7|10|11&rclimit=50&rcprop=title|user|comment|timestamp</wiki>
|
||||||
</config>
|
</config>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="/config/wiki">
|
<xsl:template match="/config/wiki">
|
||||||
<xsl:apply-templates select="document(concat('../portal/portal-', @id, '.xml'))/atom:feed/atom:entry" mode="wiki"/>
|
<xsl:apply-templates select="document(concat('../portal/portal-', @id, '.xml'))/api/query/recentchanges" mode="wiki"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="*">
|
<xsl:template match="*">
|
||||||
|
@ -60,23 +60,26 @@
|
||||||
<link><xsl:value-of select="@href"/></link>
|
<link><xsl:value-of select="@href"/></link>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="atom:entry" mode="wiki">
|
<xsl:template match="rc" mode="wiki">
|
||||||
<xsl:variable name="title" select="atom:title"/>
|
<xsl:variable name="title" select="@title"/>
|
||||||
<!-- Don't repeat any titles -->
|
<!-- Don't repeat any titles -->
|
||||||
<xsl:if test="not(preceding-sibling::atom:entry/atom:title = $title or
|
<xsl:if test="not(preceding-sibling::rc/@title = $title or
|
||||||
starts-with(atom:title, 'Intern:'))">
|
starts-with($title, 'Intern:'))">
|
||||||
<item date="{atom:updated}" class="wiki">
|
<item date="{@timestamp}" class="wiki">
|
||||||
<header>C3D2 Wiki</header>
|
<header>C3D2 Wiki</header>
|
||||||
<footer>
|
<footer>
|
||||||
<xsl:text>by </xsl:text>
|
<xsl:text>by </xsl:text>
|
||||||
<xsl:value-of select="atom:author/atom:name"/>
|
<xsl:value-of select="@user"/>
|
||||||
<xsl:for-each select="following-sibling::atom:entry[atom:title = $title]/atom:author/atom:name">
|
<xsl:for-each select="following-sibling::rc[@title = $title]">
|
||||||
<xsl:text>, </xsl:text>
|
<xsl:variable name="user" select="@user"/>
|
||||||
<xsl:value-of select="normalize-space(.)"/>
|
<xsl:if test="not(preceding-sibling::rc[@title = $title and @user = $user])">
|
||||||
|
<xsl:text>, </xsl:text>
|
||||||
|
<xsl:value-of select="normalize-space(@user)"/>
|
||||||
|
</xsl:if>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</footer>
|
</footer>
|
||||||
<content-text><xsl:value-of select="atom:title"/></content-text>
|
<content-text><xsl:value-of select="@title"/></content-text>
|
||||||
<link><xsl:value-of select="atom:link[@rel='alternate'][1]/@href"/></link>
|
<link>https://wiki.c3d2.de/<xsl:value-of select="@title"/></link>
|
||||||
</item>
|
</item>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
Loading…
Reference in New Issue