Forced correct (non-uw) url to be used in digg/reddit/etc... buttons.

Added stroustrup media page stub.
This commit is contained in:
David Bartley 2007-08-12 16:06:22 -04:00
parent 54653ee823
commit e9d9d40458
10 changed files with 23 additions and 5 deletions

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:param name="g_date" required="yes" />

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template match="all-books">

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template match="cscpage">

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template match="directory">

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template name="events">

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template match="execlist">

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:function name="csc:term" as="xs:string">

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template match="mediafile">
@ -51,10 +52,11 @@
<xsl:param name="infotext" />
<xsl:param name="mirror" />
<xsl:param name="bittorrent" />
<xsl:variable name="realurl" select="fn:encode-for-uri(concat('http://csclub.uwaterloo.ca/media/', @title, '.html'))" />
<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 , $suffix, '.html'), ' ', ' ')}">
href="{concat($g_root, '/media/', @title, $suffix, '.html')}">
<html>
<head>
<title><xsl:value-of select="@title" /></title>
@ -94,14 +96,21 @@
</xsl:if>
</strong></div>
</xsl:if>
<xsl:if test="@buttons">
<xsl:if test="@buttons = 'yes'">
<br/><br/>
<!-- digg button -->
<script type="text/javascript">
digg_url = '<xsl:value-of select="$realurl" />';
</script>
<script src="http://digg.com/tools/diggthis.js"
type="text/javascript"><xsl:text> </xsl:text></script>
<!-- reddit button -->
<script type="text/javascript"
src="http://reddit.com/button.js?t=3"><xsl:text> </xsl:text></script>
<script type="text/javascript">
reddit_url = '<xsl:value-of select="$realurl" />';
reddit_title = '<xsl:value-of select="@title" />';
</script>
<script src="http://reddit.com/button.js?t=3"
type="text/javascript"><xsl:text> </xsl:text></script>
</xsl:if>
<xsl:if test="other">
<div>
@ -111,7 +120,7 @@
<br/>
<!-- AddThis Bookmark Button -->
<script type="text/javascript">
addthis_url = location.href;
addthis_url = '<xsl:value-of select="$realurl" />';
addthis_title = document.title;
addthis_pub = 'calumt';
</script>

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template match="members-this-term">

View File

@ -4,6 +4,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template match="menuitem">