Contents
Why and Wherefore
I've been using several different wiki tools over the past few years, both at work and home. Zwiki, UseMod and now MoinMoin have seen use. I'm currently enamoured with MoinMoin as it's in Python, like Zwiki, but much easier to code for. Here are a list of some of the ideas that i've been working on in MoinMoin.
You can reach me at <jos AT theorganization NOSPAM DOT net>.
Pages i'm following
Wiki as a ProjectManagement tool
Really, there is more to come here!
Wiki as a game playing platform
I really like how easy it is to both code up a rules engine (a macro), and the framework that the wiki offers (pages for move entry), when looking at Moin as a game playing tool.
Rock Paper Scissors
I just uploaded my rock-paper-scissors game macro to the MacroMarket (see MacroMarket/RockPaperScissors).
Checkers links and things
The Standard Laws of Checkers]
The numbered Checker board] - excellent! This is all i need to get started!
Patches and other code goodies
Footnotes macro
There is a request (see MoinMoinTodo Release 1.3) for the footnotes macro to be able to display wiki markup.
I've got a version of this running, but it required some largish hacking on the MoinMoin\parser\wiki.py file to get to work.
I had to add a new format function, one that, rather then using self.request.write to output its results, it simply adds to a string (self.output), which it then returns. I added the following function (formatInMemory.py) (please note, all i did was to copy the base format function, and replace all the request.write calls to self.output += blah_blah().) to MoinMoin\parser\wiki.py.
What about changing the format method to accept an output stream keyword arg, which defaults to request? So you could just give format a StringIO instance and removes the redundant formatInMemory method which only duplicates code. -- OliverGraf 2004-07-20 11:11:28
See CodeBlockColorizer for my alternate diff. Example: FootNoteTest -- OliverGraf 2004-07-22 10:40:22
That's a much more elegant solution then mine - good idea. -- JosYule 2024-11-24 22:03:30
Also, changes were made to macro\FootNote.py. You can use the diff (footnotediff.txt) or copy and paste the new code /FootNotesCode.
Yay! Very cool, that's great! -- Adam.
Form
I've gotten forms working to the point where i can define a form in the wiki, and have the date update or create a new page. It requires the the following diff to the form.py macro: form.py.diff
What this does is allows for 2 extra args to the form macro. The name of the action (formaction) you want executed and the page that you want the output of the action to affect (addtopage). Only the formaction arg is required. So, you can now put actions into the action folder and submit data to them with from a form. See the example below.
Example
Here is an example which uses a form to post blog-like entries.
The form itself (on a page called BlogForm)
#form type=caption name=dummy label="Weblog Entry Form" #form type=text name=headline label="Headline" size=40 maxlength=50 #form type=textarea name=text label="Text" rows=10 cols=60 #form type=submit name=save label="Add entry"
The blogpost.py action that will be called (put this into the action folder): blogpost.py
And the macro call to Form:
[[Form(BlogForm,blogpost,JosYule/MyBlog)]]
The actual post is created on a subpage of JosYule/MyBlog. I've got the MonthCalendar macro running on the /MyBlog page, and the Form creates new posts on sub-pages of /MyBlog in the same format as MonthCalendar, allowing easy use of the macro/IncludePages macro to create a blog like thing.
Thank-you so much, the patch for form is amazing and the blogpost action is the main reason I wanted forms to work in the first place! These two pieces of code should really be rolled into the main distribution as it makes forms actually useful, and blogpost is a great example. -- JonathanDietrich 2004-09-26 14:43:43
glad you find it useful! -- JosYule
Can you tell me what Form macro you modified for the diff? The pathname refers to an old version of moinmoin, I'm on 1.8.7, and the only Form.py macro that I have stores the data in a database.
I actually came here searching for clues to help me implement something like the CreateEvent form macro referenced on http://www.iam-wiki.org/Veranstaltungskalender_Identity_Management. I have modified a version of EventCalendar.py, and I'd like to put a form on the page that can be used to add a new event. If my users have to edit a freeform wiki page, they will probably make mistakes and then get annoyed that it does not work. A form to fill out would be better. Suggestions? The part that sort of boggles my brain is adding the form output to the same or another existing page. 2010-09-04 13:59:27
Ok, its been years since i've looked at this stuff, so i'm not surprized that it doesn't work any more. I'm sorry, but i don't really have any experience with the recent moinmoin codebase, so i can't even give you a hint as to what you might have to do to get this working. Sorry! Good luck! Jos 2010-09-06
Good work, even it needed changes (Page object) to work with 1.5 Question: how can I use radio buttons, selects and checkboxes? Do I need to hack some core file? -- JulianRomero 2005-11-12 12:09:28
Trackback
I've stopped dev on this till i can get TLA/Arch working on my windows box. Hopefully sometime in the next 2 weeks i'll have this up and running, and will get back to dev on this.
I'd like to see TrackBack in MoinMoin 1.4. With your permission I'd like to move your implementation log to an own page (TrackBack) to document its status as "official" development effort. Are you interested in further developing the TrackBack support or should we have look for a new maintainer of this feature? -- FlorianFesti 2004-09-29 13:44:00
I'd love to keep working on this, i just kinda dropped it as nobody else seemed too into it (other then AdamShand) ;). What is the schedule for 1.4? I guess i could be less lazy and look it up myself! -- JosYule
Stay cool! We are just tying to get 1.3 ready the next month. So the 1.4 branch will be opend soon (this, may be next week). So there is no need to hurry. -- FlorianFesti 2004-09-30 07:30:03
Have a look at MoinDev/MercurialGuide, should be easier to get this going on Windows.