2004-03-22 05:43
Scott, the BlogEdit feature only works with certain versions of MoinMoin. The plugin interfaces have evolved a bit over time.
2004-03-20 21:18
Downloaded BlogEdit and placed it in my /usr/share/moin/mywiki/data/plugin/action directory. It does not appear to be working, at least not for version 1.2.1 of MoinMoin.
Scott Carroll
2004-03-12 22:36
- I get it. A little odd.
2003-10-03 01:34
- Edit this entry.I'm trying...
A small action plugin for MoinMoin which adds a little bit of Wiki Markup to the begining of a page and drops you into the normal page editor so you can fill in the details. Should make things feel a bit more Blog like.
Once installed on a site, it should automatically show up in the list of actions at the bottom of each page. If you want to BlogEdit a page, just click BlogEdit. You'll probably be able to do it on this wiki soon.
-- SteveHowell & BrianDorsey
It's installed now! See SteveHowellBlog, SandBoxBlog, RecentBlogsCode.
Very cool addition, guys! Thank you! --AdamFeuer
This code evolved a bit as MoinMoin went through some refactorings, but it seems to be working now (12/12/2002).
BrianDorsey - can you verify that the code below is what's being used on the Wiki?
Thanks, SteveHowell
This is what I put in my MoinMoin, version 1.0, wikis:
I refactored it using the @TIME@ and @USER@ markups.
"""
MoinMoin - BlogEdit action
Copyright (c) 2001 by Steve Howell <showell@zipcon.com>
Copyright (c) 2001 by Brian Dorsey <brian@dorseys.org>
Copyright (2) 2002 by Jeff Sandys <sandysj@asme.org>
All rights reserved, see COPYING for details.
The BlogEdit action gives you the regular edit page, but
includes the contents of blogHeader added to the begining
of the saved wiki page. So, everytime you click BlogEdit,
you've automatically got a new blog block in place. The
comments will allow us to search for the most recent blog
entries accross the whole site.
"""
from MoinMoin.PageEditor import PageEditor
def execute(pagename, form):
BlogPage(pagename).send_editor(form)
class BlogPage(PageEditor):
def get_raw_body(self):
"""Override get_raw_body to add our blogHeader to the begining of the real raw body"""
blogHeader = """##BEGIN BLOG\n'''@%s@''' @%s@\n So I was\n""" % ('TIME', 'USER')
return blogHeader + PageEditor.get_raw_body(self)Thanks -- JeffSandys
This works with CVS current, but you should s/form/request/ since semantically this is a bug.
---
Above mentioned code won't work with the present version in CVS, because the interface of PageEditor changed. I made some changes and the Following code works for v1.1x. For now that is
"""
MoinMoin - BlogEdit action
Copyright (c) 2001 by Steve Howell <showell@zipcon.com>
Copyright (c) 2001 by Brian Dorsey <brian@dorseys.org>
Copyright (2) 2002 by Jeff Sandys <sandysj@asme.org>
All rights reserved, see COPYING for details.
2003 - adjusted the code so it works with MoinMoin 1.1x - iwan(A)vanderkleyn.com
The BlogEdit action gives you the regular edit page, but
includes the contents of blogHeader added to the begining
of the saved wiki page. So, everytime you click BlogEdit,
you've automatically got a new blog block in place. The
comments will allow us to search for the most recent blog
entries accross the whole site.
"""
from MoinMoin.PageEditor import PageEditor
def execute(pagename, request):
BlogPage(pagename, request).sendEditor()
class BlogPage(PageEditor):
def get_raw_body(self):
"""Override get_raw_body to add our blogHeader to the begining of the real raw body"""
blogHeader = """##BEGIN BLOG\n'''@%s@''' @%s@\n So I was\n""" % ('TIME', 'USER')
return blogHeader + PageEditor.get_raw_body(self)
Looks like this plugin had been mostly abandoned. I upgrade our Wiki from 1.2.x to 1.3.5 and broke BlogEdit. Since I couldn't find an upgraded version I took a shot and looks like this simple change (due to underlying APIs changing) works:
"""
MoinMoin - BlogEdit action
Copyright (c) 2001 by Steve Howell <showell@zipcon.com>
Copyright (c) 2001 by Brian Dorsey <brian@dorseys.org>
Copyright (2) 2002 by Jeff Sandys <sandysj@asme.org>
All rights reserved, see COPYING for details.
2003 - adjusted the code so it works with MoinMoin 1.1x - iwan(A)vanderkleyn.com
2005 - adjusted the code so it works with MoinMoin 1.3.5 - eric(at)eric(dash)stewart(dot)com
The BlogEdit action gives you the regular edit page, but
includes the contents of blogHeader added to the begining
of the saved wiki page. So, everytime you click BlogEdit,
you've automatically got a new blog block in place. The
comments will allow us to search for the most recent blog
entries accross the whole site.
"""
from MoinMoin.PageEditor import PageEditor
def execute(pagename, request):
BlogPage(request, pagename).sendEditor()
class BlogPage(PageEditor):
def get_raw_body(self):
"""Override get_raw_body to add our blogHeader to the begining of the real raw body"""
blogHeader = """##BEGIN BLOG\n'''@%s@''' @%s@\n So I was\n""" % ('TIME', 'USER')
return blogHeader + PageEditor.get_raw_body(self) --- EricStewart
[Orleans New]