Last modified: 2006-01-17 21:27:16 UTC
this patch displays an article and its translation on the same page, on two columns. the translation is supposed to be accessible through an interlanguage link. the patch was primarily written for Wikisource, although other projects might find it useful.
Created attachment 1110 [details] patch: diff from cvs
Very ugly hack! Should: 1) be an extension 2) use action=render 3) be careful about which interwikis are allowed (security issues?)
thanks for your feedback. 1: I made it an extension, but I had to add new hooks to Outputpages.php. I think that I cannot use the existing hooks in Parser.php, because of the cache. Is that a problem? 2: done 3: Interwikis are defined by the admin of the wiki. I am not sure if there is a way to control that. any suggestion?
Created attachment 1112 [details] extension file
Created attachment 1113 [details] diff from cvs, OutputPage.php
Created attachment 1114 [details] extension file, corrected after brion's feedback
Created attachment 1115 [details] extension file, new version after Brion's comments
Created attachment 1151 [details] extension file improved some regular expressions, added matching of h2 and h3 subtitles
Created attachment 1171 [details] extension file Now generates valid html, assuming that input pages are themselves valid.
Created attachment 1176 [details] extension file, fixed null test
could some developer review/commit this code? apparently brion is too busy with other things, he said he has no time. I have been waiting for quite some time, and I do not know to whom I should ask. what should I do?
Created attachment 1225 [details] extension file minor fixes
Committed to extensions CVS.
Created attachment 1278 [details] cvs diff -u OutputPage.php You did not commit the patch for OutputPage.php. It adds a hook used by the extension. Here is an updated version of the patch, since recent changes to OutputPage.php deprecate the previous one.
Created attachment 1289 [details] cvs diff -u OutputPage.php
Created attachment 1290 [details] cvs diff -u docs/hooks.txt
As discussed in chat, the hook isn't quite right; breaks when parser cache is not used.
Created attachment 1296 [details] cvs diff -u OutputPage.php
Created attachment 1297 [details] cvs diff -u Article.php call AddPrimaryWikiText instead of AddWikiText
Created attachment 1303 [details] cvs diff -u DoubleWiki.php debugging code
Created attachment 1304 [details] cvs diff -u DoubleWiki.php oops
changing url to include match=foo
works. thanks, brion!