Language Bar Broken?
Cesar Eduardo Barros
cesarb at cesarb.net
Wed Aug 6 01:33:01 CEST 2008
Joachim Steiger escreveu:
> Cesar Eduardo Barros wrote:
>> Ferenc Veres escreveu:
>>> If that works, you can copy the whole
>>> http://wiki.openmoko.org/index.php?title=Template:Languages&action=edit
>>> to a new bulleted list in the sidebar. (Unfortunately it will push
>>> Search way too down, we will need the wiki admin to add ANOTHER sidebar
>>> instead extending the current one? Is there a way to add a second
>>> sidebar, below Search and Toolbox?)
>> On 1.13 (OM uses 1.12 according to [[Special:Version]]) there is a way
>> to set the placement of search and toolbox within the sidebar, but only
>> on the standard sidebar coding (something seems to have been changed in
>> the OM wiki to make it use the full wikitext coding, which probably
>> disables that trick). See
>> http://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Order_of_elements
>> for how it's supposed to be done.
>>
>> If the skin was hacked to make it use the wikitext coding, I'd expect it
>> would be easy to alter the hack to also read from another system message
>> for another part of the sidebar.
>>
>
> just take a look:
>
> http://admin-trac.openmoko.org/trac/browser/trunk/wiki.openmoko.org/space_www_wiki_skins/OpenMoko.php#L168
> is the skin we use.
>
> http://admin-trac.openmoko.org/trac/changeset/235 was the change about
> the sidebar
Yes, it looks easy. What was replaced was a loop to add several
portlets; just below that is the search portlet, the toolbox portlet,
and the languages portlet. Adding another block like the one which
replaced the original loop (just changing the page name from 'Sidebar'
to something else, for instance 'Sidebar2') in the correct place should
be the only thing needed (unless there is some MediaWiki rule about
parser state I don't know about; I don't expect any problems, however).
This makes me think about caching; I'm not sure if the sidebar content
is being cached or if it's being regenerated every time.
Looking at the code shows something else interesting: the real page
title seems to be reused, meaning there's a good chance that
{{PAGENAME}} and friends actually work.
--
Cesar Eduardo Barros
cesarb at cesarb.net
cesar.barros at gmail.com
More information about the documentation
mailing list