Mandarin

mandarin.png

An orange theme with editable sidebar (just edit the SideBar page) and universal wiki edit button (that chalk icon in the corner).

Works with
1.5, 1.6, 1.7, 1.8, 1.9
Changelog

changelog

Download

mandarin

Author

RadomirDopieralski

To use the sidebar, just create a page called SideBar, and put anything you want on it. It will be displayed on every page then, with a slightly different formatting.

Variants

You can now generate a variant of the Mandarin theme by using the Mandarin Color Generator (tm). Just enter your company's color as a hex (just like in HTML), and then copy the resulting CSS snippet.

Save the snippet as something.css in the theme's directory in htdocs, and add the line

@import url(something.css);

at the top of the style.css file. Done.

Strawberry

strawberry.png

An example on how to modify the theme's colors. This is a small, additional style file that you include in the original mandarin style to change the colors. The example colors are maybe not very useful: I'm a lazy bum so I just RGB-rotated them. You also need a differently colored image for the sidebar bullets.

strawbery.css

To install this theme in the original Mandarin theme, put this file in the htdocs/mandarin/ direcotry and add this line on top of htdocs/mandarin/style.css:

@import url(strawberry.css);

Also put this image in the htdocs/mandarin/img directory.

Chocolate

chocolate.png

A theme in the color of a fresh... chocolate. Included in the mandarin archive, just uncomment the line:

@import url(chocolate.css);

Plum

plum.png

You like pink and violet? This is a theme for you. Included in the mandarin archive, just uncomment the line:

@import url(plum.css);

Discussion

Usability: is it possible to remove or place the messages, like the one that appears after editing a page, somewhere else? Maybe move them at the top of the content page like in the Modernized theme? If you are searching for a page and the wiki doesn't find it, you have to clear the message before you can search again, because the message box covers the search field. Things are even worst if you are mainly using the keyboard to access links instead of the mouse. Another option would be to just move the search field, in the sidebar, maybe? I love how easy it is to configure the sidebar. aless 2010-09-02 14:32:21

I found a bug or missing feature: I use moin from Debian and installed the mandarin theme. Now I found out, that the line "#pragma section-numbers XXX" is ignored. I do not want to have section numbers for all pages. Does anyone know how to solve this problem? -- Jeronimo 2009-12-01 13:26:00

Supporting MoinMoin 1.9

Your PageAction, necessary for the theme is not working with 1.9, see my error log:

2009-12-14 21:14:25,615 MoinMoin.wsgiapp ERROR An exception has occurred [https://wiki.wikiwiki.ch/StartSeite?action=PageActions].
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 251, in __call__
    response = run(context)
  File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 70, in run
    response = dispatch(request, context, action_name)
  File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 118, in dispatch
    response = handle_action(context, pagename, action_name)
  File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 177, in handle_action
    handler(context.page.page_name, context)
  File "/var/www/moinmoin/data/intranet/plugin/action/PageActions.py", line 13, in execute
    request.emit_http_headers()
  File "/usr/local/lib/python2.6/dist-packages/MoinMoin/web/contexts.py", line 224, in __getattr__
    return super(HTTPContext, self).__getattribute__(name)
AttributeError: 'AllContext' object has no attribute 'emit_http_headers'

-- MarcelHäfner 2009-12-14 20:19:46

I applied the patch, thank you. -- -- RadomirDopieralski 2010-01-17 17:01:07

Error in RecentChanges with MoinMoin 1.9.2

[Tue May 25 14:56:04 2010] [error] 2010-05-25 14:56:04,578 ERROR MoinMoin.macro:132 Macro RecentChanges (page: 'Aktuelle\xc3\x84nderungen') raised an exception:
[Tue May 25 14:56:04 2010] [error] Traceback (most recent call last):
[Tue May 25 14:56:04 2010] [error]   File "/srv/www/MoinMoin/macro/__init__.py", line 122, in execute
[Tue May 25 14:56:04 2010] [error]     return execute(self, args)
[Tue May 25 14:56:04 2010] [error]   File "/srv/www/MoinMoin/macro/__init__.py", line 107, in <lambda>
[Tue May 25 14:56:04 2010] [error]     _self.request, call, _args, [_self])
[Tue May 25 14:56:04 2010] [error]   File "/srv/www/MoinMoin/wikiutil.py", line 1954, in invoke_extension_function
[Tue May 25 14:56:04 2010] [error]     return function(*fixed_args, **kwargs)
[Tue May 25 14:56:04 2010] [error]   File "/srv/www/MoinMoin/macro/RecentChanges.py", line 320, in macro_RecentChanges
[Tue May 25 14:56:04 2010] [error]     output.append(format_page_edits(macro, p, bookmark_usecs))
[Tue May 25 14:56:04 2010] [error]   File "/srv/www/MoinMoin/macro/RecentChanges.py", line 139, in format_page_edits
[Tue May 25 14:56:04 2010] [error]     return request.theme.recentchanges_entry(d)
[Tue May 25 14:56:04 2010] [error]   File "/srv/www/wiki/data/plugin/theme/mandarin.py", line 386, in recentchanges_entry
[Tue May 25 14:56:04 2010] [error]     ', '.join(d['editors']),
[Tue May 25 14:56:04 2010] [error] TypeError

The RecentChanges macro works with other themes. Any idea to fix the problem?

Hi Radomir, I have just created a not-mandarin tag to use together with mandarin in the Solenoid bug tracker at Laucnhpad. I have tagged all bugs in Solenoid which are not related to Mandarin as not-mandarin. This way, the links below can be used to track common bugs, I thought they could be useful for Mandarin:

MoinMoin: ThemeMarket/Mandarin (last edited 2010-05-25 13:11:57 by abel06)