.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
. if \nF \{
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "MojoMojo 3pm"
.TH MojoMojo 3pm "2013-05-12" "perl v5.20.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
MojoMojo \- A Wiki with a tree
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& # Set up database (see mojomojo.conf first)
\&
\& ./script/mojomojo_spawn_db.pl
\&
\& # Standalone mode
\&
\& ./script/mojomo_server.pl
\&
\& # In apache conf
\&
\& SetHandler perl\-script
\& PerlHandler MojoMojo
\&
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Mojomojo is a content management system, borrowing many concepts from
wikis and blogs. It allows you to maintain a full tree-structure of pages,
and to interlink them in various ways. It has full version support, so you can
always go back to a previous version and see what's changed with an easy diff
system. There are also a some of useful features like live \s-1AJAX\s0 preview while
editing, tagging, built-in fulltext search, image galleries, and \s-1RSS\s0 feeds
for every wiki page.
.PP
To find out more about how you can use MojoMojo, please visit
or read the installation instructions in
MojoMojo::Installation to try it out yourself.
.SH "METHODS"
.IX Header "METHODS"
.SS "prepare"
.IX Subsection "prepare"
Accommodate a forcing of \s-1SSL\s0 if needed in a reverse proxy setup.
.SS "ajax"
.IX Subsection "ajax"
Return whether the request is an \s-1AJAX\s0 one (used by the live preview,
for example), as opposed to a rgular request (such as one used to view
a page).
.SS "expand_wikilink"
.IX Subsection "expand_wikilink"
Proxy method for the MojoMojo::Formatter::Wiki expand_wikilink method.
.SS "wikiword"
.IX Subsection "wikiword"
Format a wikiword as a link or as a wanted page, as appropriate.
.SS "pref"
.IX Subsection "pref"
Find or create a preference key. Update it if a value is passed, then
return the current setting.
.SS "pref_cached"
.IX Subsection "pref_cached"
Get preference key/value from cache if possible.
.SS "fixw"
.IX Subsection "fixw"
Clean up wiki words: replace spaces with underscores and remove non\-\ew, / and .
characters.
.SS "tz"
.IX Subsection "tz"
Convert timezone
.SS "prepare_action"
.IX Subsection "prepare_action"
Provide \*(L"No \s-1DB\*(R"\s0 message when one needs to spawn the db (script/mojomojo_spawn.pl).
.SS "prepare_path"
.IX Subsection "prepare_path"
We override this method to work around some of Catalyst's assumptions about
dispatching. Since MojoMojo supports page namespaces
(e.g. \f(CW\*(C`/parent_page/child_page\*(C'\fR), with page paths that always start with \f(CW\*(C`/\*(C'\fR,
we strip the trailing slash from \f(CW\*(C`$c\->req\->base\*(C'\fR. Also, since MojoMojo
indicates actions by appending a \f(CW\*(C`.$action\*(C'\fR to the path
(e.g. \f(CW\*(C`/parent_page/child_page.edit\*(C'\fR), we remove the page path and save it in
\&\f(CW\*(C`$c\->stash\->{path}\*(C'\fR and reset \f(CW\*(C`$c\->req\->path\*(C'\fR to \f(CW$action\fR.
We save the original \s-1URI\s0 in \f(CW\*(C`$c\->stash\->{pre_hacked_uri}\*(C'\fR.
.SS "base_uri"
.IX Subsection "base_uri"
Return \f(CW\*(C`$c\->req\->base\*(C'\fR as an \s-1URI\s0 object.
.SS "uri_for"
.IX Subsection "uri_for"
Override \f(CW\*(C`$c\->uri_for\*(C'\fR to append path, if a relative path is used.
.SS "uri_for_static"
.IX Subsection "uri_for_static"
\&\f(CW\*(C`/static/\*(C'\fR has been remapped to \f(CW\*(C`/.static/\*(C'\fR.
.SS "_cleanup_path"
.IX Subsection "_cleanup_path"
Lowercase the path and remove any double-slashes.
.SS "_expand_path_elements"
.IX Subsection "_expand_path_elements"
Generate all the intermediary paths to \f(CW\*(C`/path/to/a/page\*(C'\fR, starting from \f(CW\*(C`/\*(C'\fR
and ending with the complete path:
.PP
.Vb 5
\& /
\& /path
\& /path/to
\& /path/to/a
\& /path/to/a/page
.Ve
.SS "get_permissions_data"
.IX Subsection "get_permissions_data"
Permissions are checked prior to most actions, including \f(CW\*(C`view\*(C'\fR if that is
turned on in the configuration. The permission system works as follows:
.IP "1." 4
There is a base set of rules which may be defined in the application
config. These are:
.Sp
.Vb 1
\& $c\->config\->{permissions}{view_allowed} = 1; # or 0
.Ve
.Sp
Similar entries exist for \f(CW\*(C`delete\*(C'\fR, \f(CW\*(C`edit\*(C'\fR, \f(CW\*(C`create\*(C'\fR and \f(CW\*(C`attachment\*(C'\fR.
If these config variables are not defined, the default is to allow anyone
to do anything.
.IP "2." 4
Global rules that apply to everyone may be specified by creating a
record with a role id of 0.
.IP "3." 4
Rules are defined using a combination of path(s)?, and role and may be
applied to subpages or not.
.Sp
\&\s-1TODO:\s0 clarify.
.IP "4." 4
All rules matching a given user's roles and the current path are used to
determine the final yes/no on each permission. Rules are evaluated from
least-specific path to most specific. This means that when checking
permissions on \f(CW\*(C`/foo/bar/baz\*(C'\fR, permission rules set for \f(CW\*(C`/foo\*(C'\fR will be
overridden by rules set on \f(CW\*(C`/foo/bar\*(C'\fR when editing \f(CW\*(C`/foo/bar/baz\*(C'\fR. When two
rules (from different roles) are found for the same path prefix, explicit
\&\f(CW\*(C`allow\*(C'\fRs override \f(CW\*(C`deny\*(C'\fRs. Null entries for a given permission are always
ignored and do not affect the permissions defined at earlier level. This
allows you to change certain permissions (such as \f(CW\*(C`create\*(C'\fR) only while not
affecting previously determined permissions for the other actions. Finally \-
\&\f(CW\*(C`apply_to_subpages\*(C'\fR \f(CW\*(C`yes\*(C'\fR/\f(CW\*(C`no\*(C'\fR is exclusive, meaning that a rule for \f(CW\*(C`/foo\*(C'\fR with
\&\f(CW\*(C`apply_to_subpages\*(C'\fR set to \f(CW\*(C`yes\*(C'\fR will apply to \f(CW\*(C`/foo/bar\*(C'\fR but not to \f(CW\*(C`/foo\*(C'\fR
alone. The endpoint in the path is always checked for a rule explicitly for that
page \- meaning \f(CW\*(C`apply_to_subpages = no\*(C'\fR.
.SS "user_role_ids"
.IX Subsection "user_role_ids"
Get the list of role ids for a user.
.SS "check_permissions"
.IX Subsection "check_permissions"
Check user permissions for a path.
.SS "check_view_permission"
.IX Subsection "check_view_permission"
Check if a user can view a path.
.SH "SUPPORT"
.IX Header "SUPPORT"
.IP "\(bu" 4
.IP "\(bu" 4
\&\s-1IRC: \s0.
.IP "\(bu" 4
Mailing list:
.IP "\(bu" 4
Commercial support and customization for MojoMojo is also provided by Nordaaker
Ltd. Contact \f(CW\*(C`arneandmarcus@nordaaker.com\*(C'\fR for details.
.SH "AUTHORS"
.IX Header "AUTHORS"
Marcus Ramberg \f(CW\*(C`marcus@nordaaker.com\*(C'\fR
.PP
David Naughton \f(CW\*(C`naughton@umn.edu\*(C'\fR
.PP
Andy Grundman \f(CW\*(C`andy@hybridized.org\*(C'\fR
.PP
Jonathan Rockway \f(CW\*(C`jrockway@jrockway.us\*(C'\fR
.PP
A number of other contributors over the years:
https://www.ohloh.net/p/mojomojo/contributors
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Unless explicitly stated otherwise, all modules and scripts in this distribution are:
Copyright 2005\-2010, Marcus Ramberg
.SH "LICENSE"
.IX Header "LICENSE"
You may distribute this code under the same terms as Perl itself.