Adding Html to top of Namespaces

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding Html to top of Namespaces

Hunter Fernandes
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
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Adding Html to top of Namespaces

Olivier Beaton
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 <[hidden email]>wrote:

> 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
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Adding Html to top of Namespaces

Rusty Burchfield
In reply to this post by Hunter Fernandes
On Mon, Nov 14, 2011 at 7:04 PM, Hunter Fernandes <[hidden email]> 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_threaded#210132

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 mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l