2009/3/18 lee worden <[email protected]>:
> Attached is a patch for the skins directory that allows changing the
> Content-type dynamically.  After applying this patch, if any code sets the
> global $wgServeAsXHTML to true, the page will be output with the xhtml+xml
> content type.  This seems to work fine with the existing MW XHTML pages.

This mailing list doesn't accept attachments.  Patches should be
submitted at bugzilla.wikimedia.org.

> This has been done before, for instance in the ASCIIMath4Wiki extension [2].
>  I don't want to change the Content-type unconditionally, though, only some
> of the time, so that we can serve texvc-style images to browsers or users
> that don't like the modified content type.

Note that this will interfere with any kind of HTML caching, such as
Squid or file cache, and with the parser cache as well.  It won't work
correctly in most well-configured MediaWiki installs unless you make
sure to fragment the parser cache appropriately, at a minimum.

> The patch is made on the 1:1.13.3-1ubuntu1 mediawiki package (from Ubuntu
> 9.04), and only modifies Monobook.php and Modern.php.  There are other skins
> in my installation here, but they don't seem to work very well and I didn't
> see where to make the change.

Well, that's okay for a first stab at the implementation, if we want
to include this at all (hard to say without seeing the patch).  Not
your fault our skin system is a complete mess.  There are likely to be
some merge conflicts, though -- 1.13 is very old.  It's best to submit
patches based on trunk.

> Is there a better way to make MathML work in MW?  Might this option be
> included in a future MW release?  Any feedback or alternative suggestions is
> welcome.

Under "Math" in preferences on Wikipedia, there's already a "MathML if
possible (experimental)" option.  I'm not sure if it actually does
anything, though . . . if not, I guess it should be removed.

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to