Forum:Add UnNetHack source code in Source namespace

From NetHackWiki
Jump to navigation Jump to search


This would allow providing references in articles. Bulwersator (talk) 20:56, 25 January 2013 (UTC)

Doing this might be slightly problematic as keeping all versions might be a lot of data ("all versions" as in "all revisions", which might be necessary to reference things in the most recent version). I thought about this at some point but discarded the thought, but: perhaps a MediaWiki extension could work? I'm not sure whether such a thing exists or whether it would be helpful, though.
The UnNetHack source is also viewable using the web. It might not be the nicest way, but I think I could get Template:Refsrc (and, for non-references, Template:Sourcecode) to allow parameters like {{refsrc|monst.c|42|game=UnNetHack|changeset=1032}} (or something like that) and target that source browser for now. If another solution (that allows to target a specific changeset) is later introduced, Template:Refsrc could be adjusted. —bcode talk | mail 21:54, 25 January 2013 (UTC)
…and {{refsrc}} works now. See the example on the Template:Refsrc page. —bcode talk | mail 22:22, 25 January 2013 (UTC)