cvs: php-news-web / article.php common.inc group.php index.php
| From: | Derick Rethans | Date: | Mon, 21 Jun 2004 17:22:31 +0000 |
| Subject: | cvs: php-news-web / article.php common.inc group.php index.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-25067@lists.php.net to get a copy of this message | ||
derick Mon Jun 21 13:22:31 2004 EDT
Modified files:
/php-news-web article.php common.inc group.php index.php
Log:
- Use nice URLs
http://cvs.php.net/diff.php/php-news-web/article.php?r1=1.23&r2=1.24&ty=u
Index: php-news-web/article.php
diff -u php-news-web/article.php:1.23 php-news-web/article.php:1.24
--- php-news-web/article.php:1.23 Mon May 19 12:55:03 2003
+++ php-news-web/article.php Mon Jun 21 13:22:31 2004
@@ -175,7 +175,7 @@
if (!$v) continue;
$v = trim($v);
if (!preg_match("/^<.+>\$/", $v)) continue;
- echo "<a
href=\"article.php?group=$group&article=".htmlspecialchars(urlencode($v))."\">".($c++)."</a>\n";
+ echo "<a
href=\"/$group/".htmlspecialchars(urlencode($v))."\">".($c++)."</a>\n";
}
echo "</td>\n";
}
@@ -184,7 +184,7 @@
echo '<td class="headerlabel">Groups:</td><td
class="headervalue">';
$r = explode(",", chop($headers["newsgroups"]));
while (list($k,$v) = each($r)) {
- echo "<a
href=\"group.php?group=".htmlspecialchars(urlencode($v))."\">".htmlspecialchars($v)."</a>\n";
+ echo "<a
href=\"/".htmlspecialchars(urlencode($v))."\">".htmlspecialchars($v)."</a>\n";
}
echo "</td>\n";
}
http://cvs.php.net/diff.php/php-news-web/common.inc?r1=1.22&r2=1.23&ty=u
Index: php-news-web/common.inc
diff -u php-news-web/common.inc:1.22 php-news-web/common.inc:1.23
--- php-news-web/common.inc:1.22 Mon May 19 12:28:05 2003
+++ php-news-web/common.inc Mon Jun 21 13:22:31 2004
@@ -8,20 +8,20 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?echo $title?></title>
- <link rel="stylesheet" href="style.css" type="text/css" />
+ <link rel="stylesheet" href="/style.css" type="text/css" />
</head>
<body leftmargin="0" topmargin="0" marginheight="0"
marginwidth="0">
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr bgcolor="#9999cc">
<td>
- <a href="index.php"><img src="i/l.gif" border="0"
width="120" height="64" alt="php" /></a>
+ <a href="index.php"><img src="/i/l.gif" border="0"
width="120" height="64" alt="php" /></a>
</td>
<td align="right" valign="bottom">
PHP.net <a href="news://news.php.net/"
clas="top">news server</a> web interface
</td>
</tr>
<tr bgcolor="#333366">
- <td colspan="3"><img src="i/g.gif" width="1"
height="1" alt="" /></td>
+ <td colspan="3"><img src="/i/g.gif" width="1"
height="1" alt="" /></td>
</tr>
</table>
<?php
http://cvs.php.net/diff.php/php-news-web/group.php?r1=1.15&r2=1.16&ty=u
Index: php-news-web/group.php
diff -u php-news-web/group.php:1.15 php-news-web/group.php:1.16
--- php-news-web/group.php:1.15 Tue Oct 15 19:53:45 2002
+++ php-news-web/group.php Mon Jun 21 13:22:31 2004
@@ -65,7 +65,7 @@
switch($format) {
case 'rss':
echo "<item>\n";
- echo "<link>http://news.php.net/article.php?group=$group&article=$n</link>\n";
+ echo "<link>http://news.php.net/$group/$n</link>\n";
echo "<title>", format_subject($subj, $charset),
"</title>\n";
echo "<description>", htmlspecialchars(format_author($author, $charset)),
"</description>\n";
echo "<pubDate>$date822</pubDate>\n";
@@ -74,7 +74,7 @@
case 'rdf':
echo "<item>\n";
echo "<title>", format_subject($subj, $charset),
"</title>\n";
- echo "<link>http://news.php.net/article.php?group=$group&article=$n</link>\n";
+ echo "<link>http://news.php.net/$group/$n</link>\n";
echo "<description>", htmlspecialchars(format_author($author, $charset)),
"</description>\n";
echo "<pubDate>$date822</pubDate>\n";
echo "</item>\n";
@@ -82,8 +82,8 @@
case 'html':
default:
echo "<tr>";
- echo "<td class=\"$class\"><a
href=\"article.php?group=$group&article=$n\">$n</a></td>";
- echo "<td class=\"$class\"><a
href=\"article.php?group=$group&article=$n\">";
+ echo "<td class=\"$class\"><a
href=\"/$group/$n\">$n</a></td>";
+ echo "<td class=\"$class\"><a
href=\"/$group/$n\">";
echo format_subject($subj, $charset);
echo "</a></td>";
echo "<td class=\"$class\">".format_author($author,
$charset)."</td>\n";
@@ -112,7 +112,7 @@
echo '<td width="20%">';
if ($i > $f) {
$p = max($i-20,$f);
- echo "<a
href=\"group.php?group=".htmlspecialchars($g)."&i=$p\"><b>«
previous</b></a>";
+ echo "<a
href=\"/".htmlspecialchars($g)."/start/$p\"><b>«
previous</b></a>";
}
else {
echo " ";
@@ -124,7 +124,7 @@
echo '<td align="right" width="20%">';
if ($i+20 < $l) {
$n = min($i+20,$l-20);
- echo "<a
href=\"group.php?group=".htmlspecialchars($g)."&i=$n\"><b>next
»</b></a>";
+ echo "<a
href=\"/".htmlspecialchars($g)."/start/$n\"><b>next
»</b></a>";
}
else {
echo " ";
http://cvs.php.net/diff.php/php-news-web/index.php?r1=1.4&r2=1.5&ty=u
Index: php-news-web/index.php
diff -u php-news-web/index.php:1.4 php-news-web/index.php:1.5
--- php-news-web/index.php:1.4 Mon Aug 19 14:00:40 2002
+++ php-news-web/index.php Mon Jun 21 13:22:31 2004
@@ -21,7 +21,7 @@
list($group,$high,$low,$active) = explode(" ", $line);
echo "<tr>";
echo "<td class=\"$class\">";
- echo "<a class=\"active$active\"
href=\"group.php?group=$group\">$group</a>";
+ echo "<a class=\"active$active\"
href=\"/$group\">$group</a>";
echo "</td>\n";
echo "<td align=\"right\" class=\"$class\">", $high-$low+1,
"</td>\n";
echo "<td class=\"$class\">";