Moin,
On Friday 07 April 2006 19:05, Brion Vibber wrote:
Tels wrote:
as an extension developer I'd like to have
two new features. I looked
at the doc, the code the FAQ etc but I couldn't find out if it is not
already possible to achive that:
$wgOut->addScript( "<style>....</style>" );
Ah cool, thanx.
Note that this applies only to the current HTTP
invocation. At this
time there's not a clean way to attach headers or external style sheets
to a *parser hook* extension other than adding it to every page
invocation in your setup function.
I am a bit confused about this comment:
Here is a snippet from DynamicPageList2:
// The callback function for converting the input text to HTML output
function DynamicPageList2( $input ) {
...
global $wgTitle;
global $wgOut;
$ts = mktime();
$now = gmdate("YmdHis", $ts + 60);
$ns = $wgTitle->getNamespace();
$ti = wfStrencode($wgTitle->getDBkey());
... [snip]
$wgOut->addMeta("http:Pragma", "no-cache");
...
When I add $wgOut->addScript( "<style>....</style>" ); here,
would that
add the style to every page in the wiki, or only pages that have a <DPL>
tag on it (which triggers that extension).
The later would be just what I want :)
As for the cache, I don't intent to do the "no-cache" etc, so, if I added
AddScript(), would the added style get cached or would it disappear when
someone views a cached copy?
(Ok, ok, i just might it try instead of buggering you :)
Thanx a lot!
Likewise, I
would like something along the lines of:
__NOCATEGORIES__ (or __NOCAT__
__NOMENU__
__NOTOOLBOX__
__NOSEARCH__
__NOFOOTER__
Vandals would love this!
That's why I said it is probably not usefull for wikipedia. However, on
small or closed wikis, it would be incredible usefull for some pages.
However it would not be generally useful on a
wiki, so I'd recommend against.
Er, it would be on mine :) Just think about: "setup a small test wikion a
laptoo, take it to a conference, make a presentation." There is no
vandalism to worry about, because you (and maybe your coworkers) are the
only one allowed to edit it.
(You could make a custom skin which works this way.)
But that would change all pages. What I want to achive is that everypage
is normal, even the first page of a presentation (the table of contents),
and when you switch to the second one, only the navigation box remains
and the menu etc disappears, making more space available for the actula
slide.
Sure, one could switch skins forth and back, but thats very awkward.
If the CSS trick works, one could achive this with CSS and an extension,
probably.
best wishes,
tels
--
Signed on Fri Apr 7 19:29:38 2006 with key 0x93B84C15.
Visit my photo gallery at
http://bloodgate.com/photos/
PGP key on
http://bloodgate.com/tels.asc or per email.
Morton's Law: If rats are experimented upon, they will develop cancer.