Hello guys,
I configured a sitenotice message [¹] but it now shows up on every page. I'd like to limit only for article pages but no category pages, system messages, etc.
Is something like that possible? Maybe with a css hack?
[¹] http://www.mediawiki.org/wiki/Manual:Interface/Sitenotice#CentralNotice
-robert
orschiro@googlemail.com wrote:
Hello guys,
I configured a sitenotice message [¹] but it now shows up on every page. I'd like to limit only for article pages but no category pages, system messages, etc.
Is something like that possible? Maybe with a css hack?
[¹] http://www.mediawiki.org/wiki/Manual:Interface/Sitenotice#CentralNotice
-robert
Yes, you can use CSS for that (hint: article page have ns-0 class). Another option is to use a parserfunction for comparing the current namespace with the one you want it to appear.
Hello Plaonides,
trying the first method via CSS I use the following hack,
/* Sitenotice */ div#SiteNotice { display:none; } .ns-0 div#SiteNotice { display:block; }
But I can't see why this doesn't work.
Nonetheless I'd be interested what you mean by comparing the namespace with a parser function. Is there any documentation on this topic?
-robert
2010/9/22 Platonides Platonides@gmail.com:
orschiro@googlemail.com wrote:
Hello guys,
I configured a sitenotice message [¹] but it now shows up on every page. I'd like to limit only for article pages but no category pages, system messages, etc.
Is something like that possible? Maybe with a css hack?
[¹] http://www.mediawiki.org/wiki/Manual:Interface/Sitenotice#CentralNotice
-robert
Yes, you can use CSS for that (hint: article page have ns-0 class). Another option is to use a parserfunction for comparing the current namespace with the one you want it to appear.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Wed, Sep 22, 2010 at 00:27, orschiro@googlemail.com wrote: ...
Nonetheless I'd be interested what you mean by comparing the namespace with a parser function. Is there any documentation on this topic?
Platonides is talking about the {{#ifeq ...}} parser function (which is provided by the ParserFunctions extension –http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions).
Here's a brief example using #ifeq that would include a page called SiteNotice if the current page isn't part of a namespace.
{{#ifeq: {{NAMESPACE}} | | {{SiteNotice}} | <!-- This page is part of a namespace. Do nothing --> }}
For a list of additional magic words (like {{NAMESPACE}} that are available, read:
http://www.mediawiki.org/wiki/Help:Magic_words
Thanks for your reply. I'm sure I'm on the right way and tried this one in MediaWiki:Sitenotice
{{#if: {{ns:0}} | My text for sitenotice }}
Unfortunately it doesn't work. I thought it should because it only says, include this text into sitenotice if a page that uses Sitenotices is in Main namespace.
Error in reasoning?
-robert
2010/9/22 Zak Greant (Foo Associates) zak@fooassociates.com:
On Wed, Sep 22, 2010 at 00:27, orschiro@googlemail.com wrote: ...
Nonetheless I'd be interested what you mean by comparing the namespace with a parser function. Is there any documentation on this topic?
Platonides is talking about the {{#ifeq ...}} parser function (which is provided by the ParserFunctions extension –http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions).
Here's a brief example using #ifeq that would include a page called SiteNotice if the current page isn't part of a namespace.
{{#ifeq: {{NAMESPACE}} | | {{SiteNotice}} | <!-- This page is part of a namespace. Do nothing --> }}
For a list of additional magic words (like {{NAMESPACE}} that are available, read:
http://www.mediawiki.org/wiki/Help:Magic_words
-- Zak Greant (Wikimedia Foundation Contractor) Plans, reports + logs at http://mediawiki.org/wiki/User:Zakgreant
Want to talk about the Mediawiki developer docs? Catch me on irc://irc.freenode.net#mediawiki on Wednesdays from 16:00-18:00 UTC & Thursdays from 04:00-06:00 UTC
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
{{#if: {{ns:0}} | My text for sitenotice }}
Nope: {{ns:0} always evaluates to the empty string. You'd really want {{#if:{{NAMESPACE}}|My text for sitenotice}}. But this doesn't work either: {{NAMESPACE}} is always evaluating to "MediaWiki"
Fortunately you can do it with CSS. Edit Mediawiki:common.css and add these two lines.
#siteNotice { display:none; } /* Hide sitenotice everywhere */ body.ns-0 #siteNotice { display:block; } /* Unhide in main namespace */
DanB
On Thu, Sep 23, 2010 at 06:35, Daniel Barrett danb@vistaprint.com wrote:
{{#if: {{ns:0}} | My text for sitenotice }}
Nope: {{ns:0} always evaluates to the empty string. You'd really want {{#if:{{NAMESPACE}}|My text for sitenotice}}. But this doesn't work either: {{NAMESPACE}} is always evaluating to "MediaWiki"
Are you sure that {{NAMESPACE}} behaves this way? Both on my local install and on mediawiki.org, {{NAMESPACE}} is empty on pages that are in the default namespace.
This is demonstrated at:
http://www.mediawiki.org/w/index.php?title=Sandbox&oldid=352248
It's the same on our wiki too... except in Mediawiki:sitenotice. Try putting {{NAMESPACE}} in Mediawiki:sitenotice (which is what the poster wanted), then viewing pages in different namespaces, and you'll see what I mean. It's always "MediaWiki".
DanB
-----Original Message----- From: Zak Greant (Foo Associates) Are you sure that {{NAMESPACE}} behaves this way? Both on my local install and on mediawiki.org, {{NAMESPACE}} is empty on pages that are in the default namespace.
Hello all, I was wondering if anyone could offer suggestions for including video on a wiki site. I guess this is more complicated than just graphics because some kind of player is needed. Any suggestions on how to do this? Thanks, Bruce
What is the source of the videos?
If it is YouTube and so on I suggest the extension EmbedVideo. It works flawlessly.
http://www.mediawiki.org/wiki/Extension:EmbedVideo
-robert
2010/9/24 Bruce Whealton bwhealton@futurewavedesigns.com:
Hello all, I was wondering if anyone could offer suggestions for including video on a wiki site. I guess this is more complicated than just graphics because some kind of player is needed. Any suggestions on how to do this? Thanks, Bruce
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
You might try installing the widgets extension: http://www.mediawiki.org/wiki/Extension:Widgets
There are several Video widgets available: http://www.mediawikiwidgets.org/Main_Page#Video_widgets. I've only used the YouTube one and it works well.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Bruce Whealton Sent: Friday, September 24, 2010 1:21 AM To: MediaWiki announcements and site admin list Subject: [Mediawiki-l] Mediawiki and video
Hello all, I was wondering if anyone could offer suggestions for including video on a wiki site. I guess this is more complicated than just graphics because some kind of player is needed. Any suggestions on how to do this? Thanks, Bruce
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
How can I learn more about widgets? I am still in the newbie stage with mediawiki. Forgive me if my question sounds dumb or naive but...It sounds like it might be an easy concept, though. Conceptually, how is a widget approach different than the embedvideo extension. I do see that one could actually include twitter widgets, I guess to have a running display of the latest tweets on a page/article? Thanks, Bruce
mrthetooth wrote:
You might try installing the widgets extension: http://www.mediawiki.org/wiki/Extension:Widgets
There are several Video widgets available: http://www.mediawikiwidgets.org/Main_Page#Video_widgets. I've only used the YouTube one and it works well.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Bruce Whealton Sent: Friday, September 24, 2010 1:21 AM To: MediaWiki announcements and site admin list Subject: [Mediawiki-l] Mediawiki and video
Hello all, I was wondering if anyone could offer suggestions for including video on a wiki site. I guess this is more complicated than just graphics because some kind of player is needed. Any suggestions on how to do this? Thanks, Bruce
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hello all, How does one include xml, html, links in a page without having the wiki software interpret, filter or process the code? Thanks, Bruce
On Fri, Sep 24, 2010 at 21:25, B. M. Whealton bwhealton@futurewavedesigns.com wrote:
How does one include xml, html, links in a page without having the wiki software interpret, filter or process the code?
The <nowiki> tag should do what you need.
The tag is described here:
http://www.mediawiki.org/wiki/Help:Formatting#Text_formatting_markup
Thanks for your response.
The CSS hack did it completely without the need for the parser techniques.
-- robert
2010/9/23 Daniel Barrett danb@vistaprint.com:
It's the same on our wiki too... except in Mediawiki:sitenotice. Try putting {{NAMESPACE}} in Mediawiki:sitenotice (which is what the poster wanted), then viewing pages in different namespaces, and you'll see what I mean. It's always "MediaWiki".
DanB
-----Original Message----- From: Zak Greant (Foo Associates) Are you sure that {{NAMESPACE}} behaves this way? Both on my local install and on mediawiki.org, {{NAMESPACE}} is empty on pages that are in the default namespace.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org