[Home]WikiPatches/OriginalAuthor

UseModWiki | WikiPatches | RecentChanges | Preferences

This is an attempt for implementing in Usemod a patch for storing the username used to create a page regardless of who else modifies a page later on.

Other perl wikis with this feature or related: http://www.oddmuse.org/cgi-bin/wiki/CreationDate_Module

Thanks in advance.

Patch

sub OpenNewPage {
...
  $Page{'tscreate'} = $Now;  # Set once at creation
+  $Page{'authorcreate'} = GetParam('username','') unless $Page{'authorcreate'}
  

sub OpenNewSection {
...
  $Section{'tscreate'} = $Now;  # Set once at creation
+  $Page{'authorcreate'} = GetParam('username','') unless $Page{'authorcreate'}	
   

sub GetFooterText {
...
  if ($Section{'revision'} > 0) {
  $result .= '<br>';
+  if ($Page{'authorcreate'}) {
+    $result .= Tss('Originally created %1 by %2', &TimeToText($Page{'tscreate'}), $Page{'authorcreate'});
+  } 
+  $result .= ' | ';
--JuanmaMP

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited September 27, 2009 1:22 pm by JuanmaMP (diff)
Search: