[Moin-user] Wiki bookmarks toolbar Firefox extension

Thomas Waldmann tw-public at gmx.de
Fri Mar 5 11:18:36 EST 2010

Moin Paul,

> I have started to develop a Moinmoin wiki extension for Firefox.  The 
> extension will act as a 'bookmarks toolbar' but the bookmarks will come 
> from a moinmoin wiki.

Ah, nice. :)

> Each wiki page will be a folder on the toolbar, 

That may be rather many folders then.

> Features I plan to implement:
> * Selectable root wiki page for toolbar

Ah, so it's not necessarily ALL pages in the wiki. :)

> * Drag webpages onto a folder, adds the link to the underlying wiki page

Ah, nice. I want that! :)

> * right click folder options: 'goto page', 'set page as root', 'open all 
> in tabs'

Be careful, do not DOS the wiki. If moin thinks you're mean, you might
get locked out by surge protection.

> 1 - How should I update a wiki page with a new hyperlink? I have found 
> the python script "editmoin" and had a look at the source and it seams 
> that it sends a text string back to the url. The text string seams to 
> contain special fields like 'ticket', 'version' etc. Is this the correct 
> method to update a page?

If you like to do it via http (web ui), yes. Please check if the code
that you're locking at works with 1.9.2 - there were recent changes to
improve ticketing security.

>  Is there any particular fields I especially 
> need (considering I just want to append a hyperlinik)?

Moin does not make a difference between "just adding a hyperlink" or
doing other/bigger edits to a page.

If TextChas are enabled and you're not in the exclusion group, you might
have to answer one to successfully save a page.

> 2 - I am currently accessing a wiki pages data by fetching the page by 
> looking at  body/div"page"/div"content"

Hmm, for getting content, you could just use ...?action=raw.

You need to get the edit page html also, though, to extract the ticket.

So maybe extracting it from the html is better, only needs one access.

> Is this a 'nice' way todo this and will this work on 
> all moinmoin page layouts etc (sorry im not that great on html).

Well, there is also xmlrpc interface, but it needs to be enabled by the
wiki admin. That's easier to use to do automated stuff.

> 3 - How in should I manage logins to the wiki? I currently ignore this 
> and have a "open" wiki without users whilst I develop but I plan on 
> making this a fully functional extension so I will need this later.

You need username / password if you want it comfortable.

For http web ui, you need to log in with that and get/store the session
cookie. If you present that cookie, you are considered to be that logged
in user.

For xmlrpc, you can easily get an auth token using username/password
(auth token is a similar thing as the cookie) and apply it within an
xmlrpc multicall, so moin will do all the calls as that logged in user.

> ssh/ssl certificate things possible


Well, ssl client cert auth is doable. We even have / had code for it,
but I didn't use/test it recently.

> Or will I have to store user name and 
> password (I would prefer not todo this for security)

If the user of your extension is logged in to moin, he'll have the
session cookie. If you can use that from your extension, you're logged
in. It won't help you for xmlrpc, though.



More information about the Moin-user mailing list