Generate two media pages (on-campus and external) instead of using dynamic SSI pages.
This commit is contained in:
parent
ab5c717fb9
commit
20d9406ad9
|
@ -1 +0,0 @@
|
|||
AddHandler server-parsed .html
|
|
@ -29,10 +29,29 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="mediaitem">
|
||||
<xsl:call-template name="makemediaitem">
|
||||
<xsl:with-param name="mirror" select="$mirror_csc" />
|
||||
<xsl:with-param name="bittorrent">true</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="makemediaitem">
|
||||
<xsl:with-param name="suffix">-uw</xsl:with-param>
|
||||
<xsl:with-param name="infotext">
|
||||
If you are in residence, downloading these files will not count against
|
||||
your ResNet quota.<br/><br/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="mirror" select="$mirror_cs" />
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="makemediaitem">
|
||||
<xsl:param name="suffix" />
|
||||
<xsl:param name="infotext" />
|
||||
<xsl:param name="mirror" />
|
||||
<xsl:param name="bittorrent" />
|
||||
<xsl:result-document method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
href="{translate(concat($g_root, '/media/', @title , '.html'), ' ', ' ')}">
|
||||
href="{translate(concat($g_root, '/media/', @title , $suffix, '.html'), ' ', ' ')}">
|
||||
<html>
|
||||
<head>
|
||||
<title><xsl:value-of select="@title" /></title>
|
||||
|
@ -49,43 +68,27 @@
|
|||
<xsl:if test="flvfile">
|
||||
<h2>View</h2>
|
||||
<div>
|
||||
<xsl:comment><![CDATA[#if expr="($REMOTE_ADDR = /^129\.97\./) && ($QUERY_STRING != test)" ]]></xsl:comment>
|
||||
<xsl:apply-templates select="flvfile">
|
||||
<xsl:with-param name="mirror" select="$mirror_cs" />
|
||||
<xsl:with-param name="mirror" select="$mirror" />
|
||||
</xsl:apply-templates>
|
||||
<xsl:comment><![CDATA[#else ]]></xsl:comment>
|
||||
<xsl:apply-templates select="flvfile">
|
||||
<xsl:with-param name="mirror" select="$mirror_csc" />
|
||||
</xsl:apply-templates>
|
||||
<xsl:comment><![CDATA[#endif ]]></xsl:comment>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="mediafile">
|
||||
<h2>Download</h2>
|
||||
<div><strong>
|
||||
<xsl:comment><![CDATA[#if expr="($REMOTE_ADDR = /^129\.97\./) && ($QUERY_STRING != test)" ]]></xsl:comment>
|
||||
If you are in residence, downloading these files will not count
|
||||
against your ResNet quota.
|
||||
<br/><br/>
|
||||
<xsl:comment><![CDATA[#endif ]]></xsl:comment>
|
||||
<xsl:value-of select="$infotext" />
|
||||
HTTP (web browser):
|
||||
<xsl:comment><![CDATA[#if expr="($REMOTE_ADDR = /^129\.97\./) && ($QUERY_STRING != test)" ]]></xsl:comment>
|
||||
<xsl:apply-templates select="mediafile">
|
||||
<xsl:with-param name="mirror" select="$mirror_cs" />
|
||||
<xsl:with-param name="mirror" select="$mirror" />
|
||||
</xsl:apply-templates>
|
||||
<xsl:comment><![CDATA[#else ]]></xsl:comment>
|
||||
<xsl:apply-templates select="mediafile">
|
||||
<xsl:with-param name="mirror" select="$mirror_csc" />
|
||||
</xsl:apply-templates>
|
||||
<xsl:comment><![CDATA[#endif ]]></xsl:comment>
|
||||
<xsl:comment><![CDATA[#if expr="($REMOTE_ADDR != /^129\.97\./) || ($QUERY_STRING = test)" ]]></xsl:comment>
|
||||
<xsl:if test="$bittorrent">
|
||||
<br/><br/>
|
||||
BitTorrent:
|
||||
<xsl:apply-templates select="mediafile">
|
||||
<xsl:with-param name="ext">.torrent</xsl:with-param>
|
||||
<xsl:with-param name="mirror" select="$mirror_csc" />
|
||||
<xsl:with-param name="mirror" select="$mirror" />
|
||||
</xsl:apply-templates>
|
||||
<xsl:comment><![CDATA[#endif ]]></xsl:comment>
|
||||
</xsl:if>
|
||||
</strong></div>
|
||||
</xsl:if>
|
||||
<xsl:if test="@buttons">
|
||||
|
|
Loading…
Reference in New Issue