UserPreferences

0.706


  1. MoinMoin安装记
    1. 预备
    2. 安装
    3. 设置Web服务器
    4. 修改moin启动脚本
    5. 运行
  2. MoinMoin设置记
    1. 基本设置
    2. 页面外观

MoinMoin安装记

预备

安装

    python setup.py install --prefix=D:\Netapp\Moin --record=install.log

设置Web服务器

修改moin启动脚本

在前面加上

  1 
  2 
import sys
sys.path.append('D:\NetApp\Moin\lib\site-packages')

运行

MoinMoin设置记

基本设置

 sitename = "My Wiki"
charset = 'utf-8'
upperletters = "A-Z"
lowerletters = "0-9a-z"
default_lang = 'zh'
navi_bar = ['[FrontPage 首页]','[RecentChanges 最近更新]', '[FindPage 搜索]','[HelpContents 帮助]']

页面外观

  1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
 29 
 30 
 31 
 32 
 33 
 34 
 35 
 36 
 37 
 38 
 39 
 40 
 41 
 42 
 43 
 44 
 45 
 46 
 47 
 48 
 49 
 50 
 51 
 52 
 53 
 54 
 55 
 56 
 57 
# -*- coding: iso-8859-1 -*-
import urllib
from MoinMoin import config, i18n, wikiutil, version
from MoinMoin.Page import Page

from classic import Theme as ThemeBase

class Theme(ThemeBase):
    """ This is the starshine theme. """

    name = 'mytheme'
    icons = {
        # key         alt                        icon filename      w   h
        # ------------------------------------------------------------------
        # navibar
        'help':       ("%(page_help_contents)s", "moin-help.png",   12, 11),
        'find':       ("%(page_find_page)s",     "moin-search.png", 12, 12),
        'diff':       ("Diffs",                  "moin-diff.png",   15, 11),
        'info':       ("Info",                   "moin-info.png",   12, 11),
        'edit':       ("Edit",                   "moin-edit.png",   12, 12),
        'unsubscribe':("Unsubscribe",            "moin-unsubscribe.png",  14, 10),
        'subscribe':  ("Subscribe",              "moin-subscribe.png",14, 10),
        'raw':        ("Raw",                    "moin-raw.png",    12, 13),
        'xml':        ("XML",                    "moin-xml.png",    20, 13),
        'print':      ("Print",                  "moin-print.png",  16, 14),
        'view':       ("View",                   "moin-show.png",   12, 13),
        'home':       ("Home",                   "moin-home.png",   13, 12),
        'up':         ("Up",                     "moin-parent.png", 15, 13),
        # FileAttach (is this used?)
        'attach':     ("%(attach_count)s",       "moin-attach.png",  7, 15),
        # RecentChanges
        'rss':        ("[RSS]",                  "moin-rss.png",    36, 14),
        'deleted':    ("[DELETED]",              "moin-deleted.png",60, 12),
        'updated':    ("[UPDATED]",              "moin-updated.png",60, 12),
        'new':        ("[NEW]",                  "moin-new.png",    31, 12),
        'diffrc':     ("[DIFF]",                 "moin-diff.png",   15, 11),
        # General
        'bottom':     ("[BOTTOM]",               "moin-bottom.png", 14, 10),
        'top':        ("[TOP]",                  "moin-top.png",    14, 10),
        'www':        ("[WWW]",                  "moin-www.png",    11, 11),
        'mailto':     ("[MAILTO]",               "moin-email.png",  14, 10),
        'news':       ("[NEWS]",                 "moin-news.png",   10, 11),
        'telnet':     ("[TELNET]",               "moin-telnet.png", 10, 11),
        'ftp':        ("[FTP]",                  "moin-ftp.png",    11, 11),
        'file':       ("[FILE]",                 "moin-ftp.png",    11, 11),
        # search forms
        'searchbutton': ("[?]",                  "moin-search.png", 12, 12),
        'interwiki':  ("[%(wikitag)s]",          "moin-inter.png",  16, 16),
    }
    stylesheets = (
        # theme charset         media       basename
        (name,  'iso-8859-1',   'all',      'common'),
        (name,  'iso-8859-1',   'screen',   'screen'),
        (name,  'iso-8859-1',   'print',    'print'),
        )
def execute(request):
    return Theme(request)

page_iconbar = ['edit','view','diff','info','xml','print']
  1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
 29 
 30 
 31 
 32 
 33 
 34 
 35 
 36 
 37 

    def footer(self, d, **keywords):
        """
        Assemble page footer
        
        @param d: parameter dictionary
        @keyword ...:...
        @rtype: string
        @return: page footer html
        """
        dict = {
            'config_page_footer1_html': self.emit_custom_html(config.page_footer1),
            'config_page_footer2_html': self.emit_custom_html(config.page_footer2),
            'showtext_html': self.showtext_link(d, **keywords),
            'edittext_html': self.edittext_link(d, **keywords),
            'search_form_html': self.searchform(d),
            'available_actions_html': self.availableactions(d),
            'credits_html': self.emit_custom_html(config.page_credits),
            'version_html': self.showversion(d, **keywords),
            'footer_fragments_html': self.footer_fragments(d, **keywords),
        }
        dict.update(d)

        html = """
<div id="footer">
%(config_page_footer1_html)s
%(showtext_html)s
%(footer_fragments_html)s
%(edittext_html)s
%(search_form_html)s
%(available_actions_html)s
%(config_page_footer2_html)s
</div>
%(version_html)s
""" % dict

        return html


CategoryHomepage