Size: 3423
Comment:
|
Size: 3991
Comment: Added "CVS backend" section.
|
Deletions are marked like this. | Additions are marked like this. |
Line 52: | Line 52: |
== CVS backend == I've been tasked with creating a wiki that uses CVS as a backend for managing documentation at my company. Developers want CVS to be "the one" source of truth. They also want to be able to work offline, without using a Web browser at all, in their own text editors. Meanwhile, a lot of other people in the company could really benefit from using the wiki interface. Is there any way I can add this functionality to MoinMoin, or do I need to use an existing project like Pyle, which doesn't seem quite as mature? ---- CategoryFeatureRequest |
For more information on developing and customizing MoinMoin, check MoinDev.
How to implement interactive session
I am working on our intranet Wiki, and would like to warn users when they remove 'admin' privilege from a page (particularly for those users who inadvertently remove 'admin' from their own homepages). I have found the place in the class PageEditor, saveText method where I can determine that the old_acl differs from the new_acl, and that the old_acl had 'admin' privilege and the new_acl does not. I can then raise an appropriate exception, which caught by wikiaction.do_savepage method. What I now need is a means of presenting the user with a dialog that asks
Do you really want to remove 'admin' privilege? [Yes][No]
and returns his answer. In the case of No, I would like to replace the new_acl with the old_acl. Any suggestions? Is there a type of dialog form that I could use? - -- JohnSimonson DateTime(2005-04-19T13:21:15Z)
I don't think you really want to annoy people with "do you really" questions. Try to find another solution that does not require this kind of questions. Also, moin is not well suited to this interactive answer, question, answer, question style.
In this case I think you need some kind of automatic admin rights for user home pages and sub pages. This can be achieved with a simple security policy class. One example is here: NickWelch/RelativeGroups on the bottom of the page. -- NirSoffer DateTime(2005-04-23T22:34:03Z)
This is a similar problem to the one I have had in RecommendPage. ACLparse is a function defined in this macro. In your case you have to check if admin is in given_acl. -- ReimarBauer DateTime(2005-04-23T19:50:51Z) {{{ given_acl,body = ACLparse(request, body)
if len(string.join(given_acl,"")) > 0:
- acl="#acl %(given_acl)s \n" % {
- "given_acl":string.join(given_acl,"\n")}
- acl=""
PageEditor.saveText(page,acl+newtext+body,rev)
- acl="#acl %(given_acl)s \n" % {
}}}
Import text into MoinMoin 1.3
I want to import external text into some page automatically, without editing the page.
Solution
Try ScriptMarket/AppendTextScript. For more information on storage format read ["MoinDev/Storage"]. For example code check PageEditor.py.
Modifying "Make this page belong to category" format
I want that the categories line will starts with "Categories:". This will make it easier to find categories on categories pages and make the data on the page more clear.
Solution
This requires patching the code in wikiaction.py. Grep for categories and you will find the lines that handle categories. The modification should not be hard if you know Python. After you create a nice patch, probably factoring this out of the current function into a small and nice function, add a feature request for this with the patch. Generally it make sense and maybe other developers will like to use the patch.
Themes test
Is there theme test page where almost all "objects" (sidebar, dialog, messages ...) are visible?
Answer
No, but pages like SyntaxReference try to use many syntax options and thereby trigger many CSS classes.
CVS backend
I've been tasked with creating a wiki that uses CVS as a backend for managing documentation at my company. Developers want CVS to be "the one" source of truth. They also want to be able to work offline, without using a Web browser at all, in their own text editors. Meanwhile, a lot of other people in the company could really benefit from using the wiki interface. Is there any way I can add this functionality to MoinMoin, or do I need to use an existing project like Pyle, which doesn't seem quite as mature?