I found out what preload is. See http://en.wikipedia.org/w/index.php?title=Noarticlehere&action=edit&...
So, in pseudocode (I don't know mediawiki), all that'd need to be done is change:
return $text;
to:
if ($text!='') { return $text; } else if (namespace is article namespace) { return $newarticleboilerplate; } else { return ''; }
On 12/11/05, Anthony DiPierro wikilegal@inbox.org wrote:
On 12/11/05, Anthony DiPierro wikilegal@inbox.org wrote:
Here's the relevant code from February 2005:
if ( 'edit' == $action ) { wfProfileOut( $fname ); return ''; # was "newarticletext", now
moved above the box) }
Oh yeah, that'd be phase3/includes/Article.php. I just cvs updated, and it's changed:
if ( 'edit' == $action ) { wfProfileOut( $fname ); # If requested, preload some text. $text=$this->getPreloadedText($preload); # We used to put
MediaWiki:Newarticletext here if # $text was empty at this point. # This is now shown above the edit box instead. return $text; }
Not sure what getPreloadedText is. Maybe this feature is already in there. Still doesn't seem to check namespace, though.
If not, I could make a patch if the developers want, but it's been a while since I've hacked mediawiki code and it's such a simple change, so it's probably better if they did it themselves.
Anthony