Peter Blaise says: After searching for a solution (MediaWiki.org and Google) and not finding one, I thought I'd explore this myself. I can add special:allpages to the navigation menu, but I can't add any of the sub-pages that any user can select from within special:allpages, such as all talk pages and so on. It seems that special:allpages brings all pages only in the namespece = 0, but if I want to just see talk pages, and that's namespace = 1, how would I add a link to that in the navigation menu?
I tried much iteration of the following: With a space on either side of the | (pipe character) - http://our-wiki-url/mediawiki/index.php?title=Special%3AAllpages&from=&a... amespace=1 | Discussion/talk index
Without space at the | (pipe character) - http://our-wiki-url/mediawiki/index.php?title=Special%3AAllpages&from=&a... amespace=1|Discussion/talk index
With single [ ] (single brackets) - [http://our-wiki-url/mediawiki/index.php?title=Special%3AAllpages&from=&a... namespace=1 | Discussion/talk index]
With double [[ ]] (double brackets) - [[http://our-wiki-url/mediawiki/index.php?title=Special%3AAllpages&from= &namespace=1 | Discussion/talk index]]
With internal abbreviation: - Special:Allpages&from=&namespace=1
... and so on, for many more tries, combinations of the above, and all it results in is either NOT showing up in the navigation menu, or showing up but linking to http://our-wiki-url/mediawiki/index.php/INVALID-TITLE
Argh! HELP! How can I permit a visitor to see, for instance, all "talk" pages in one step? I want it to look like this, AND work:
navigation - Main Page - Community portal - Current events - Recent changes - Random page - Help - Tell us what you think - Article index - Discussion/talk index
All links in the navigation menu above work EXCEPT the "Discussion/talk index" link which just brings up
http://our-wiki-url/mediawiki/index.php/INVALID-TITLE
Thanks! -- Peter Blaise peterblaise 19:59, 8 June 2007 (UTC)
Retrieved from "http://www.mediawiki.org/wiki/Manual_talk:Navigation_bar"
Monahon, Peter B. a écrit :
Peter Blaise says: After searching for a solution (MediaWiki.org and Google) and not finding one, I thought I'd explore this myself. I can add special:allpages to the navigation menu, but I can't add any of the sub-pages that any user can select from within special:allpages, such as all talk pages and so on. It seems that special:allpages brings all pages only in the namespece = 0, but if I want to just see talk pages, and that's namespace = 1, how would I add a link to that in the navigation menu?
It looks like there is a problem in function wfEmptyMsg** with the "&" url special char. So for now, you can't use & symbol in sidebar.
instead (while waiting someone to find a solution or someone to tell it's an intended feature or someone to tell I'm wrong), if you need that link, you can add it directly in your skin :
open /skins/monobook.php and look for
<ul> <?php foreach($cont as $key => $val) { ?> <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php if ( $val['active'] ) { ?> class="active" <?php } ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li> <?php } ?>
<!--Then add this-->
<li id="n-alltalk"> <a href="http://our-wiki-url/mediawiki/index.php?title=Special:Allpages&from=&namespace=1"> Discussion/talk index </a> </li>
<!--Then the skin continues-->
</ul>
**see function buildSidebar(), lines 1642-1643 in skin.php for mediawiki 1.10.0 : if (wfEmptyMsg($line[0], $link)) link = $line[0];
$link = http://yourwiki/Somepage returns true while http://yourwiki/Somepage&someaction returns false.
Should I fill a bugzilla request for this or is it intentional ?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Monahon, Peter B. wrote:
Peter Blaise says: After searching for a solution (MediaWiki.org and Google) and not finding one, I thought I'd explore this myself. I can add special:allpages to the navigation menu, but I can't add any of the sub-pages that any user can select from within special:allpages, such as all talk pages and so on. It seems that special:allpages brings all pages only in the namespece = 0, but if I want to just see talk pages, and that's namespace = 1, how would I add a link to that in the navigation menu?
I tried much iteration of the following: With a space on either side of the | (pipe character)
http://our-wiki-url/mediawiki/index.php?title=Special%3AAllpages&from=&a... amespace=1 | Discussion/talk index
The strings in MediaWiki:Sidebar ARE NOT TEXT STRINGS, they are MESSAGE KEY NAMES.
You should list something like:
ourwiki-url|ourwiki-text
then in MediaWiki:Ourwiki-url you put:
http://our-wiki-url/mediawiki/index.php?title=Special%3AAllpages&from=&a...
and in MediaWiki:Ourwiki-text you put:
Discussion/talk index
This keeps things clean and localizable.
- -- brion vibber (brion @ wikimedia.org)
Brion Vibber wrote :
The strings in MediaWiki:Sidebar ARE NOT TEXT STRINGS, they are MESSAGE KEY NAMES.
ok, so I guess that the possibility to directly use url links in Mediawiki:Sidebar is just a "message-not-found" side-effect ? (just wondering, because that was confusing : some urls work, others don't)
BTW wouldn't it make sense to replace line 1642 of skin.php :
if (wfEmptyMsg($line[0], $link))
with :
if (wfEmptyMsg(htmlspecialchars($line[0]), $link))
since, in case of "message-not-found", wfMsgForContent apply htmlspecialchars to $key (and < >) before returning it to $link ? (so that urls with "&" special char can be used ? (ok, we shouldn't need this since we can use Mediawiki namespace, but still ...))
and (if yes), probably change the same way line 1640 : if (wfEmptyMsg(htmlspecialchars($line[1]), $text = wfMsg($line[1])))
Thanks
You should list something like:
ourwiki-url|ourwiki-text
then in MediaWiki:Ourwiki-url you put:
http://our-wiki-url/mediawiki/index.php?title=Special%3AAllpages&from=&a...
and in MediaWiki:Ourwiki-text you put:
Discussion/talk index
This keeps things clean and localizable.
Indeed, thanks for the tip.
Alexis
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Alexis Moinet wrote:
Brion Vibber wrote :
The strings in MediaWiki:Sidebar ARE NOT TEXT STRINGS, they are MESSAGE KEY NAMES.
ok, so I guess that the possibility to directly use url links in Mediawiki:Sidebar is just a "message-not-found" side-effect ? (just wondering, because that was confusing : some urls work, others don't)
That's someone's attempt at a helpful graceful degradation effect. Personally I think it just makes the resulting behavior less consistent and more confusing.
BTW wouldn't it make sense to replace line 1642 of skin.php :
if (wfEmptyMsg($line[0], $link))
with :
if (wfEmptyMsg(htmlspecialchars($line[0]), $link))
I think it would be better if any inconsistency between behavior of wfEmptyMsg() and wfMsgForContent() were fixed.
- -- brion vibber (brion @ wikimedia.org)
mediawiki-l@lists.wikimedia.org