[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] WMLify eff/
Update of /home/or/cvsroot/website/include
In directory moria:/tmp/cvs-serv17552/include
Modified Files:
head.wmi links.wmi
Log Message:
WMLify eff/
Index: head.wmi
===================================================================
RCS file: /home/or/cvsroot/website/include/head.wmi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -d -r1.9 -r1.10
--- head.wmi 20 Jan 2006 20:34:03 -0000 1.9
+++ head.wmi 26 Jan 2006 23:15:02 -0000 1.10
@@ -12,9 +12,9 @@
<title>Tor: $(TITLE)</title>
<meta name="Author" content="Roger Dingledine" />
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
- <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+ <link rel="stylesheet" type="text/css" href="$(DOCROOT)/stylesheet.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
- <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT).html" />">
+ <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT).html" />">
</head>
<body>
@@ -39,10 +39,10 @@
$page =~ s/\.wml//;
if ($page ne $key) {
if (-e "$(LANG)/$key.wml") {
- printf '<a href="%s.html.$(LANG)">%s</a>'."\n",
+ printf '<a href="$(DOCROOT)/%s.html.$(LANG)">%s</a>'."\n",
$key, $navigation{$key};
} else {
- printf '<a href="%s.html">%s</a>'."\n",
+ printf '<a href="$(DOCROOT)/%s.html">%s</a>'."\n",
$key, $navigation{$key};
}
} else {
@@ -61,7 +61,7 @@
if ($dir eq '$(LANG)') {
printf('<img src="$(IMGROOT)/%s.png" alt="%s" /> ', $dir, $LANGUAGES{$dir});
} else {
- printf('<a href="%s.html.%s"><img src="$(IMGROOT)/%s.png" alt="%s" /></a> ', $page, $dir, $dir, $LANGUAGES{$dir});
+ printf('<a href="$(DOCROOT)/%s.html.%s"><img src="$(IMGROOT)/%s.png" alt="%s" /></a> ', $page, $dir, $dir, $LANGUAGES{$dir});
};
} else {
printf('<img src="$(IMGROOT)/green-flagspace.png"/> ');
@@ -72,4 +72,4 @@
</tr>
</table>
-<ifneq "$(REDIRECT)" "" "Redirecting to <a href="$(REDIRECT).html">$(REDIRECT).html</a>.">
+<ifneq "$(REDIRECT)" "" "Redirecting to <a href="$(DOCROOT)/$(REDIRECT).html">$(DOCROOT)/$(REDIRECT).html</a>.">
Index: links.wmi
===================================================================
RCS file: /home/or/cvsroot/website/include/links.wmi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -d -r1.6 -r1.7
--- links.wmi 21 Jan 2006 01:14:30 -0000 1.6
+++ links.wmi 26 Jan 2006 23:15:02 -0000 1.7
@@ -9,11 +9,13 @@
<define-tag page whitespace=delete><:{
my $page="%0";
my $lang="$(LANG)";
- if (-e "$lang/$page.wml") {
- print "%0.html.$lang";
- } elsif (-e "en/$page.wml") {
- print "%0.html";
+ my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
+ $dir = '.' unless defined $dir;
+ if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
+ print "$(DOCROOT)/$dir/$base.html.$lang";
+ } elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
+ print "$(DOCROOT)/$dir/$base.html";
} else {
- warn "$WML_SRC_FILENAME has a [page $page], but that doesn't exist.";
+ warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
};
}:></define-tag>