Mailing List Archive

Date patch (Re: links in the sidebar)
Hi all,

I'm a frequent Wikipedia contributor, but only recently got motivated
enough to install the software and start hacking around with the code.

The date sidebar "feature" was always one that annoyed me, because it's a
good idea, but just wasn't done quite right. I can see looking at the
code and recent mails to this list that Brion Vibber got frustrated and
took it out. I'd like to propose re-adding a modified version, and I'm
including a patch off of a CVS snapshot from just a little while ago.

Here's Brion's criticisms that I hope I've addressed:

On 21 May 2002, Brion L. VIBBER wrote:
> * Doesn't fit article naming conventions and no one wants such pages

I'm linking to "June+3" rather than "June 3, 2002"

> * Not URL-escaped (the space can break on some browsers)

Wrapping this with a simple call to wikiLink() seems to fix this.

> * No path! (Thus doesn't work from http://www.wikipedia.com/ or
> http://www.wikipedia.com/wiki.phtml?blahblahblah)

Once again, wrapping this with wikiLink() seems to fix the problem.

Below is my patch. Please consider adding it.

Thanks
Rob
----
Index: wikiSkinStandard.php
===================================================================
RCS file: /cvsroot/wikipedia/phpwiki/fpw/wikiSkinStandard.php,v
retrieving revision 1.9
diff -u -r1.9 wikiSkinStandard.php
--- wikiSkinStandard.php 21 May 2002 19:57:42 -0000 1.9
+++ wikiSkinStandard.php 4 Jun 2002 06:15:16 -0000
@@ -138,6 +138,7 @@
$column .= "<br>\n<a
href=\"".wikiLink("special:WatchList")."\">$wikiMyWatchlist</a>" ;
}
$column .= "<br>\n<a
href=\"".wikiLink($wikiBugReportsLink)."\">$wikiBugReports</a>" ;
+ $column .= "<br>\n<a
href=\"".wikiLink($wikiGetBriefDate())."\">".$wikiGetBriefDate()."</a>" ;
$a = $page->getOtherNamespaces () ;
if ( count ( $a ) > 0 ) $column .= "<hr>".implode (
"<br>\n" , $a ) ;

Index: wikiTextDe.php
===================================================================
RCS file: /cvsroot/wikipedia/phpwiki/fpw/wikiTextDe.php,v
retrieving revision 1.11
diff -u -r1.11 wikiTextDe.php
--- wikiTextDe.php 22 May 2002 18:33:31 -0000 1.11
+++ wikiTextDe.php 4 Jun 2002 06:15:16 -0000
@@ -425,8 +425,7 @@
global $wikiDate ;
$monthName = $wikiDate [ strtolower ( date ( "F" ) ) ];
$dayNumber = date ( "j" ) ;
- $year = date ( "Y" ) ;
- return "$dayNumber. $monthName, $year" ;
+ return "$dayNumber. $monthName" ;
}
$wikiGetDate = 'wikiGetDateDe';
$wikiGetBriefDate = 'wikiGetBriefDateDe' ;
Index: wikiTextEn.php
===================================================================
RCS file: /cvsroot/wikipedia/phpwiki/fpw/wikiTextEn.php,v
retrieving revision 1.94
diff -u -r1.94 wikiTextEn.php
--- wikiTextEn.php 25 May 2002 17:25:19 -0000 1.94
+++ wikiTextEn.php 4 Jun 2002 06:15:19 -0000
@@ -454,8 +454,7 @@
global $wikiDate ;
$monthName = $wikiDate [ strtolower ( date ( "F" ) ) ];
$dayNumber = date ( "j" ) ;
- $year = date ( "Y" ) ;
- return "$monthName $dayNumber, $year" ;
+ return "$monthName $dayNumber" ;
}
$wikiGetDate = 'wikiGetDateEn';
$wikiGetBriefDate = 'wikiGetBriefDateEn' ;
Index: wikiTextEo.php
===================================================================
RCS file: /cvsroot/wikipedia/phpwiki/fpw/wikiTextEo.php,v
retrieving revision 1.18
diff -u -r1.18 wikiTextEo.php
--- wikiTextEo.php 24 May 2002 21:17:13 -0000 1.18
+++ wikiTextEo.php 4 Jun 2002 06:15:19 -0000
@@ -395,8 +395,7 @@
$dayName = $wikiDate [ strtolower ( date ( "l" , $x ) ) ];
$monthName = $wikiDate [ strtolower ( date ( "F" , $x ) ) ];
$dayNumber = date ( "j" , $x ) ;
- $year = date ( "Y" , $x ) ;
- return "${dayName}n, la ${dayNumber}a de $monthName, $year" ;
+ return "${dayName}n, la ${dayNumber}a de $monthName" ;
}
$wikiGetDate = 'wikiGetDateEo';

Index: wikiTextEs.php
===================================================================
RCS file: /cvsroot/wikipedia/phpwiki/fpw/wikiTextEs.php,v
retrieving revision 1.3
diff -u -r1.3 wikiTextEs.php
--- wikiTextEs.php 13 May 2002 16:48:23 -0000 1.3
+++ wikiTextEs.php 4 Jun 2002 06:15:19 -0000
@@ -433,8 +433,7 @@
global $wikiDate ;
$monthName = $wikiDate [ strtolower ( date ( "F" ) ) ];
$dayNumber = date ( "j" ) ;
- $year = date ( "Y" ) ;
- return "$dayNumber $monthName $year" ;
+ return "$dayNumber $monthName" ;
}
$wikiGetDate = 'wikiGetDateEs';
$wikiGetBriefDate = 'wikiGetBriefDateEs' ;