This is what the SelectCategory extension does:
<code>
$wgHooks['OutputPageParserOutput'][] = 'fnSelectCategoryOutputHook';
## Entry point for the hook for printing the CSS:
function fnSelectCategoryOutputHook( &$m_pageObj, &$m_parserOutput ) {
global $wgScriptPath;
# Register CSS file for our select box:
$m_pageObj->addLink(
array(
'rel' => 'stylesheet',
'type' => 'text/css',
'href' =>
$wgScriptPath . '/extensions/SelectCategory/SelectCategory.css'
)
);
# Be nice:
return true;
}
</code>
Not sure if that's the best way, though, since that would
cause another http request per unique user.
-- Leon
Hey, looks like that works. Thanks for the tip. Unfortunately the hook
is only available in mediawiki 1.8+, but I'll take what I can get ;).
V/r.
Ryan Lane