[Mediawiki-l] Announcing PagesOnDemand extension
Jim Hu
jimhu at tamu.edu
Tue Apr 17 18:18:45 UTC 2007
Another "Ive been meaning to do this for months" message.
Jim Wilson and I made an extension system we call PagesOnDemand a
while ago.
http://www.mediawiki.org/wiki/Extension:PagesOnDemand
We wanted an easy way to force certain pages to use defined templates
based on the structure of the page title. With PagesOnDemand, pages
are created from templates when users follow links if the link
matches a string comparison that tells the PagesOnDemand system that
the desired page is of a desired type. For example, pages with titles
that match the regular expression '/^PMID:\\d+$/' are recognized by
PagesOnDemand.php+PMID_OnDemand.php as being about articles in the
scientific literature. When the system recognizes this pattern, it
creates a page based on a template for wiki articles about the
scientific literature and then forwards the user to the newly created
page, instead of to an edit page. PagesOnDemand effectively makes
some "red links" behave like "blue links".
I call it an extension system since it's an extension that supports
the creation of other extension that do the actual work.
Major thanks to Jim W. for helping with this based on my original
half-baked idea. The good aspects of the code are all his; I'll take
credit for the ugly bits.
=====================================
Jim Hu
Associate Professor
Dept. of Biochemistry and Biophysics
2128 TAMU
Texas A&M Univ.
College Station, TX 77843-2128
979-862-4054
More information about the MediaWiki-l
mailing list