About this theme

The monobook theme, available from the ThemeMarket is an adaption of the default theme from wikipedia. It uses a complete copy of the css style sheet from wikipedia, then applies some moin-specific alterations afterwards. Hopefully this should mean any other style sheets developed for MediaWiki can be used directly.

Most of the changes involve using the monobook.py file to output HTML that is closer to the MediaWiki format. These changes are:

Some other notes

Comments, Questions, Suggestions

Great work! It can be very nice for those who want a wikipedia/media wiki like design.

However, I'm not sure that its done right (I did not look into the code, only read the description here):

-- NirSoffer 2005-04-16 22:49:23

The theme name is strange. Why not WikiPedia, MediaWiki, MoinMedia or MoinPedia?

This will enable MoinMoin to emulate Wikipedia and confuse all users. I am currently working on assembling MonoBook, the MediaWiki parser, the current WikiPedia data and the VirtualPage plugin. -- AlexanderSchremmer 2005-04-18 22:07:47

I found a bug in Python which is triggered by the CSS files of the theme if they are served by the standalone server of MoinMoin. Please unify the line endings to \n (UNIX) in the .CSS files. Thanks! -- AlexanderSchremmer 2005-04-26 21:24:06

Congratulations for your work Jim, Just one question. Are there is no trails? Thanks. -- -- EduardoMercovich 2005-05-20 15:45:12

   1     def navibar(self, d):
   2 ...
   3         html = [
   4 ##RS trail in extra portlet
   5             u'<div class="portlet" id="p-nav">',
   6             u'<div class="pBody">',
   7             self.trail(d),
   8             u'</div>',
   9             u'</div>',
  10 ##RS end
  11             u'<div class="portlet" id="p-nav">',
  12             u'<div class="pBody">',
  13             u'<ul id="navibar">',
  14             u'<li>%s</li>' % '</li>\n<li>'.join(links),
  15             u'</ul>',
  16             u'</div>',
  17             u'</div>',
  18             ]
  19 ...

To show parent page, i added this code after line 153:

   1         parent = page.getParentPage()
   2         if parent:
   3             items += u'<li class="none">%s</li>' % parent.link_to(self.request, _("Show Parent", formatted=False))

-- LiDongHa 2005-06-13 16:45:04

Here is a workaround for this URL problem. Find this line (2 places):

Change it both times to this. It seems to work for me.

-- JoergSteinberg

   1     def editorheader(self, d, **kw):
   2         """ Assemble wiki header for editor
   3 
   4         @param d: parameter dictionary
   5         @rtype: unicode
   6         @return: page header html
   7         """
   8         html = [
   9             # Header
  10             u'<div id="globalWrapper">',
  11             u'<div id="column-content">',
  12             self.startPage(),
  13             self.msg(d),
  14             self.title(d),
  15         ]
  16         return u'\n'.join(html)

Also I needed to add this to screen.css or monobook.css

/* Fix for a strang bug with textarea within fieldset within float element */
* html #editor-textarea {
    margin-left:-12.2em;
}

Plus changing the beginning of monobook.css like this (the -12.25em is important for IE6 to render it like it should:

#column-content {
    width: 100%;
    float: right;
    margin: 0 0 0.6em -12.25em;
    padding:0;

monobook for moin >1.5.6

Hi! I'd like to add a "What links here?" link to the toolbox on the side. The original theme has that functionality when clicking on the page title. Is it also included in this theme or can it be added somehow? Greetings, alpha (20.07.2007)

monobook 0.5 changes

Updated code to include all changes/fixes to make the theme work with moin 1.5.6, Internet Explorer and Firefox. Added an override to the title function, because the title appeared as a bulleted item and if the page started as bullets it threw the viewer (now appears in an <h1>). -- Frank Dowsett 2007-07-31 20:15:00

monobook for moin 1.6?

Any chance we can get this updated for mon 1.6? I've tried it but got error messages:

203925 ERROR    AttributeError: 'module' object has no attribute 'getSysPage'
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1283, in run
    handler(self.page.page_name, self)
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/action/__init__.py", line 239, in do_show
    content_only=content_only,
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/Page.py", line 1183, in send_page
    request.theme.send_footer(self.page_name, print_mode=print_mode)
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/theme/__init__.py", line 1699, in send_footer
    request.write(self.footer(d, **keywords))
  File "/home/moinmoin/my-wiki/data/plugin/theme/monobook.py", line 60, in footer
    self.columnone(d),
  File "/home/moinmoin/my-wiki/data/plugin/theme/monobook.py", line 72, in columnone
    self.username(d),
  File "/home/moinmoin/my-wiki/data/plugin/theme/monobook.py", line 302, in username
    prefpage = wikiutil.getSysPage(request, 'UserPreferences')

-- AdrianBuehlmann 2008-01-18 20:14:17

If someone updates the theme file, uploading a working version for 1.6.x would be nice. Or at least a diff produced with diff -urN oldfile newfile.

Any chance getting monobook working with IE 6? With the code changes above (2 lines) it's working with 1.6. But the first characters are missing in the editor window -- RalfGross 2008-02-06 09:03:11

Curious - the editor window seems to be ok (in text mode) for me. On the other hand, the page title is missing from the top left of the very first line of the displayed view :-( . Hence the above changes are more of a quick-and-dirty hack to get something to display without crashing under 1.6.0 than a working version. -- PeterSander 2024-04-27 04:09:51

#editor-textarea { 
 _position:relative;
 _display:block;
 _left:163px;
}

--ArminWalt 2024-04-27 04:09:51

monobook for moin 1.7

To get UserPreferences/Settings working properly in moin 1.7, I replaced the userlink code with that from the modern theme (see moin-theme-monobook-0.5-moin-1.7.2-compat.patch) -- PaulHowarth 2008-09-10 12:44:00

RufusPollock This patch applied here: https://bitbucket.org/moin/moin-theme-monobook/changeset/8a33055c75fd

monobook for moin 1.9

API changes in moin 1.9 require another patch on top of the 1.7 patch above -- PaulHowarth 2010-01-13 10:54:00

For convenience sake, the fully patched files can be downloaded. Full credit goes to Paul Howarth, who kindly sent me these based on his work. -- GregBarish 2010-04-27 12:03:00

RufusPollock This patch applied here: https://bitbucket.org/moin/moin-theme-monobook/changeset/a5bba01b3b44

As mentioned above I've created a bitbucket repo to track the monobook theme and apply patches. This seems a much better way to maintain these themes than lots of patches :) -- I will apply all pull requests and will give write to anyone who wants it. RufusPollock http://rufuspollock.org/

MoinMoin: ThemeMarket/MonoBook (last edited 2011-02-15 09:36:32 by cpc8-cmbg14-2-0-cust528)