[Pkg-mediawiki-devel] Skins

Daniel Friesen daniel at redwerks.org
Tue Jul 3 15:19:02 UTC 2012


On 12-07-03 7:21 AM, Thorsten Glaser wrote:
> On Tue, 3 Jul 2012, Daniel Friesen wrote:
>
>>> • put some stuff before </title> after what’s normally written there
>> Could you clarify what you want to add.
>> The title is controllable in OutputPage so if you want to add some text
>> to the title it should be possible.
> Hm, okay. Basically, append ": ".$project->getPublicName() to the
> <title> content, where $project is determined by some other code
> already added.
$out->setHTMLTitle( $out->getHTMLTitle() . ": " .
$project->getPublicName() );

>>> • 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)
>> Without seeing what's outputted I'm not sure whether you should be using
>> output buffering and which of addInlineStyle or addHeadItem you should use.
> Well, the problem is, plugins can add *anything*. A naïve implementation
> would just say we skip the plugin call for MW. That _could_ work.
Sounds like you want output buffering + addHeadItem.
Using output buffering will allow you to let the code echo whatever it
wants, wrap it up into a variable, and then give it to addHeadItem which
takes raw html.

>>> • then, there's a patch that prevents MW from echoing <ul></ul> as
>>>   that’s invalid XHTML, no idea if it’s still needed
>> You're not trying to make your own skin?
> No, just adapt MonoBook.
>
>> Do you have a good good reason for XHTML to be your target?
> Of course – the entire site uses XHTML 1.0 Transitional + RDFa 1.0,
> and we chose XHTML 1.0 Transitional mostly because Mediawiki uses it…
Sorry, but MediaWiki doesn't use XHTML 1.0. MediaWiki uses HTML5. The
only reason it's possible to output XHTML 1.0 in MediaWiki is so that
wikis can migrate away from XHTML slowly instead of suddenly all at
once. The only reason Wikipedia doesn't output HTML5 right now is due to
some broken anti-spam bots. And Wikimedia is going to be turning HTML5
on on Wikipedia soon.

As for RDFa, you don't need any type of XHTML for that. In fact
MediaWiki already has RDfa support.
What you want is $wgHtml5 = true; + $wgAllowRdfaAttributes = true;

>> anymore. If you really need XML's extensibility there's XHTML5.
> No, I’m not going to write *another* DTD, especially not for a moving
> target, so it’s going to be 1.0 Transitional, or 1.1.
You're focusing too much on obsessive validity and false assumptions.
HTML5 is perfectly usable. What matters is not what standards say but
what browsers actually do. And THAT is what HTML5 is based on. All this
junk about things like "<ul> must contain at least one <li>" don't
matter because the browsers never cared about that. Hence in the newest
version of the standard that false restriction was removed. Likewise the
'moving target' points are irrelevant. HTML5 is a standard written to be
usable before it's finalization. It has numerous pieces to it. And those
pieces are at different levels of completion. Some of them like <dialog>
and <menu> are not ready to use use. While others, like syntax parsing
rules, elements carried over from earlier versions and improved, etc...
ARE ready to use. And are what browser vendors are matching and using in
their implementations. (ie: No browser is even using the XHTML standards
as a guideline, so you're aiming at a false target)

>>> • change $footerlinks
>> Naturally, modify $this->data['footerlinks'] from the *Template class.
> OK, thanks.
>
>> Though, the sane person would use SkinTemplateOutputPageBeforeExec and
>> $tpl so that the modifications show up in all skins.
> Well yes, but the FF integration (as it was handed to me) is like so
> that it takes the MonoBook theme and manipulates it with the *forge
> stuff.
>
>> MediaWiki uses HTML5 going forwards. A lot of these 'bugs' look like
>> you're erroneously leaving $wgHtml5 on and expecting it to output XHTML.
> Ah, ok, that’s new. I’ll have a look into that, then. Like I said,
> I wasn’t got very far in the patchwork yet…
>
> bye,
> //mirabilos


~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]





More information about the Pkg-mediawiki-devel mailing list