I've searched mediawiki endlessly, but I can't seem to find an answer as to how to Selectively add html/wikitext to the top of articles while they are being displayed to the user.
So if I had a Namespace:, I want every page within the namespace to have a piece of html tagged to the top of the page while it is being display to a user.
Could anyone clue me in to a hook or way to do this? - Hunter F.
The complete hack of an extension you're looking for is Extension:HeadersFooters by yours truly.
It's experimental right now, but I am using it on a production private wiki. It has many problems, which I hope some good error reporting will slowly solve, and I can solve as I learn more about MW.
Keep in mind HeadersFooters adds wikitext to the actual article, which means you can use it with things like Extension:Cite and Extension:Headertabs and those extensions will parse the headers and footers within the context of the article (say by adding a references footer to all articles in a category or namespace).
You can set global, per-namespace, per-category, per-page headers or footers.
And please report any problems / bugs / problems! The trickiest part right now is page cache stuff, which I still don't think is perfect (I think if you save a page I don't re-generate a header'ed cache, you need to purge the page manually).
- Finlay
On Mon, Nov 14, 2011 at 10:04 PM, Hunter Fernandes h.g.fern@gmail.comwrote:
I've searched mediawiki endlessly, but I can't seem to find an answer as to how to Selectively add html/wikitext to the top of articles while they are being displayed to the user.
So if I had a Namespace:, I want every page within the namespace to have a piece of html tagged to the top of the page while it is being display to a user.
Could anyone clue me in to a hook or way to do this?
- Hunter F.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Mon, Nov 14, 2011 at 7:04 PM, Hunter Fernandes h.g.fern@gmail.com wrote:
So if I had a Namespace:, I want every page within the namespace to have a piece of html tagged to the top of the page while it is being display to a user.
If MediaWiki:Sitenotice displays in the right places, you can use CSS (or maybe a parser function) to limit it to the namespace you want. http://www.mediawiki.org/wiki/Manual:Interface/Sitenotice http://www.gossamer-threads.com/lists/wiki/mediawiki/210132?do=post_view_thr...
If that scenario works for you, you don't need any extensions (except maybe ParserFunctions which is on most/all WMF sites).
~Rusty
wikitech-l@lists.wikimedia.org