Author
Christopher Marshall (christopherlmarshall@yahoo.com)
Raw Notes on MoinMoin
# MoinMoin is a python based wiki system
# main web page for MoinMoin is http://moinmoin.wikiwikiweb.de
# A link to a page on the same wiki
# camel case names are the simplest ones to do
PageOne
PageTwo
# Establishing Anchor points
[[Anchor(anchor_name_section_one)]]Section One
[[Anchor(anchor_namr_section_two)]]Section Two
# linking to an anchor point on the same page
[#anchor_name_section_one A link to section one]
# linking to an anchor point on the a different page
[wiki:Self:OtherPage This is a link to another page]
# embedding URLs directly
http://www.slashdot.org
# embedding a URL and choosing the display text.
[http://www.slashdot.org This is a link to Slashdot.]
# a link to an arbitrary page name.
["An Arbitrary Page Name"]
# Quoting Code
{{{
for (int i=0; i<10; i++){
}
} } }
# experiments with moinmoin
user accounts
AaUser,auser,auser@nowhere.com
BbUser,buser,auser@nowhere.com
user accounts are stored in files in /usr/share/moin/wikis/mywiki/data/user
#There are three variables of interest here you can set in wikiconfig.py:
acl_rights_default
acl_rights_before
acl_rights_after
# order of rights application if no page acl is defined
acl_rights_before
acl_rights_default
acl_rights_after
# order of rights application if page acl is defined
acl_rights_before
page acl
acl_rights_after
# default values of rights variables if not defined in wikiconfig.py:
acl_rights_before=""
acl_rights_after=""
acl_rights_default="Trusted:read,write,delete,revert Known:read,write,delete,revert All:read,write"
# this group refers to all users, anonymous or logged in
All
# this group refers to logged in users only
Known
# this group refers to users using some sort of http authentication beyond simply
# logging in to the wiki
Trusted
# this line establishes AdminUser as having admin rights
# in wikiconfig.py:
acl_rights_before = u"AdminUser:read,write,delete,revert,admin"
# preventing normal users from creating pages:
# in wikiconfig.py:
acl_rights_before = u"AdminUser:read,write,delete,revert,admin"
acl_rights_default = u"All:read"
# wikiconfig.py settings
# these settings allow the creator of a page admin rights at creation time
# but later visitors are denied admin rights
acl_enabled=True
acl_rights_before = u"AdminUser:read,write,delete,revert,admin"
acl_rights_default = u"Known:read,write,delete,revert,admin All:read"
# the first thing you would typically want to do, as a page creator, then, is grant
# yourself admin rights by writing a line like:
#acl MyUser:read,write,delete,revert,admin Known:read,write,revert All:read
# or, you can use a page template, (see templates below), with a line like
# this to achieve the same effect
#acl @USERNAME@:read,write,delete,revert,admin Known:read,write,revert All:read
# themes
# themes directories and files
/usr/share/moin/htdocs/<theme name>/css/
/usr/share/moin/htdocs/<theme name>/img/
/usr/share/moin/wikis/<wiki name>/data/plugin/theme/<themename>.py
# the main moinmoin logo is this directory:
/usr/share/moin/htdocs/common/
# in the files
moinmoin.png
moinmoin_alpha.png
# user accounts and passwords
# user information is stored in files (with numeric filenames) under
/usr/share/moin/wikis/<wiki name>/data/users/
# inside such a file, two of the lines look like this:
name=SomeUser
enc_password={SHA}qZk+NkcGgWq6PiVxeFDCbJzQ2J0=
# oddly, the python code responsible for authenticating logins will accept either
# the plain text password, in which case it calculates the hash then compares it to
# the value of enc_password, or is will accept the encrypted hash, which it detects
# by seeing if {SHA} is a prefix of the password. This means that anyone who can
# read the user files can login as anyone they wish.
# it also means that you can reset someone's password by setting it to
{SHA}
# then having them login with a blank password.
# password protecing through apache
# adding a stanza like this to /etc/apache/httpd.conf
<Directory /usr/share/moin/>
AuthType Basic
AuthName darkness
AuthUserFile /etc/apache/password
require valid-user
</Directory>
# then creating a password file with
htpasswd /etc/apache/password someuser
(enter password)
(reenter password)
# then restarting apache
/etc/rc.d/rc.httpd restart
# works by protecting access to the moin cgi script
# finer grained protection (some wiki pages and not others) is not possible
# through this mechanism. Apache doesn't analyze the URL, then consider whether
# it matches the Directory argument (by being more specific than it).
# You need to use Moin's ACLs and subpages to achieve that effect.
# subpages
# if you define put a link on a page, mywiki/PageOne like this
/PageTwo
/PageThree
# then the url for /PageTwo will be
mywiki/PageOne/PageTwo
# and not
mywiki/PageTwo
# If in PageTwo, you define a link like this:
/PointOne
# then the URL for that link will be
mywiki/PageOne/PageTwo/PointOne
# templates
# If you define a page with a name ending in Template, such as
MyTemplate
# it will show up in the "start a new page" page in the list of templates.
# If you define it like this:
#acl @USERNAME@:read,write,delete,revert,admin Known:read,write,revert All:read
Describe your page here
# then, after the user saves it, the username will be filled in the acl
# and the admin rights will have been assigned to the creating user and
# no one else.
# variables
# are useful when writing template pages
# they are expanded when first saved into the page text
# @PAGE@
# @DATE@
# @TIME@
# @USERNAME@
# @UER@
# @SIG@
# @MAILTO@
# macros
# general form: [[MacroName(arg1,arg2,...)]]
# The table of contents macro: [[TableOfContents([maxdepth])]]
# The include macro (which includes the text of another page): [[Include(page)]]
