[Pkg-mediawiki-devel] Skins

Platonides platonides at gmail.com
Tue Jul 3 15:28:27 UTC 2012

On 03/07/12 09:32, Thorsten Glaser wrote:
> On Mon, 2 Jul 2012, Daniel Friesen wrote:
>> Tell me what you're trying to add to the <head>. Inevitably anything
>> you're trying to do should be doable without dropping headelement.
> Right now, that’s a few things, some of them might be doable,
> for some I didn’t find a way. This is from reading the diff
> against the 1.15 MonoBook, so it may not be accurate (have
> been working on this again yesterday, but still not “deep in”).
> • put some stuff before </title> after what’s normally written there

$wgOut->setHTMLTitle( $wgOut->getHTMLTitle() . " - Something else" ) ?

> • call a FusionForge function that displays the needed CSS for that
>   (which in turn echo’s stuff that can be gotten by an API call, but
>   also calls a plugin hook; the FF plugin API is totally misdesigned
>   as the hooks are expected to echo stuff when written, instead of
>   adding content to some variable that can be echo’d when needed)

You could wrap them with output buffering inside the extension code. Not
the best solution, but avoids needing to pollute a skin for that.

> • then, there's a patch that prevents MW from echoing <ul></ul> as
>   that’s invalid XHTML, no idea if it’s still needed

I don't think it was ever fixed. An issue with javascript code then
needing to change to add a <ul> if it's not there (while being legal in
html5 and all browsers doing the expected thing with them).

> • change $footerlinks
There's a hook for that.

> The rest, I’ve got already. Then, there are several occurrences
> of invalid XHTML in the pages output; things like
> – Element style does not carry attribute type
> – Value "auto" for attribute dir of span is not among the enumerated set
> – No declaration for attribute placeholder of element input
> – Syntax of value for attribute selected of option is not valid
> – No declaration for attribute primary of element a
> – No declaration for attribute context of element a
> – Value "search" for attribute type of input is not among the enumerated set
> I’ll have to spot and fix them all.

Do you have in your LocalSettings, $wgHtml5 = false; ?
When in HTML5 mode, the output is expected to be HTML5, not XHTML.

A number of those issues (such as style and script type, or the new
input type="search" defined in html5) will "fix" automatically then. Not
sure if it will cover all your XHTML issues.

More information about the Pkg-mediawiki-devel mailing list