Wed, 28 Nov 01 14:05 PST (-800) by 1Jerry

This is a very brief overview of a project I have been thinking about for a long time. I don't have much free time to work on it, but was still able to come up with some requirements, experiments and results. Maybe others can find this useful and/or further the research.

SubWikiExampleOne: Use a single multi-level wiki to provide simple tools to allow user-developers to have a simple tool to create their website, and optionally allow some or all visitors to add to or comment on the pages. This is an extension of and reason behind my multi-level wiki comments of a few weeks back.

user-developers: I (zope-developer) will create or cut & paste a sub-folder of the main wiki for a user-developer to create their own site.


1) separate the standard zwiki format from the standard help from the user's site.
2) allow each "site" user-developer to determine the look and limits for their wiki.
3) allow each "site" user-developer to add users and permissions that will allow editing and/or creation and/or commenting.

example "A" folder structure:


I would create a standard FrontPage and acl_users and place them in wiki/new. When I first set up John's site, I would just C&P wiki/new to wiki/John. John then navigates to /wiki/John (or I set up siteaccess) to set up his site. All of his personal pages reside on wiki/John, and all the standard help is on wiki.

Starting point: Zope 2.4.1 (modified to fix the STX underline bug) and Zwiki 9.6.

As I stated earlier, I found that you can link to wiki pages in a sub-folder by bracketing subfoldername/FrontPage. I created a simple site for someone who has no programming or HTML experience to create their own web site. With an unmodified Zwiki, there are some major problems.

I made a minor change to the standard_wiki_footer to NOT show the footer if the user in anonymous. This worked great. The user-developer (John, lets say) can then give his URL to all his friends or associates and they just see a website (with funny upper-lower case words ;). When John goes there, he clicks on the login button, enters his name & password, then has access to all the help and editing footer!

1) unmodified zwiki: works OK for navigation, adding pages, modifying pages AS LONG AS the pages are in the sub-folder. Clicking on HelpPage or RecentChanges will work, but will change your base back to the wiki base, and the user cannot get back (easily).
2) I changed some of the standard headers and footers to only show features that the user can access (most of the code was already there). I also changed the user options so that "show page hierarchy" cannot be set. (It is necessary to make the multi-level folders work - I don't know why). When new releases of Zwiki come out, I have to re-modify the standard pages, trying to remember the changes I did.
3) Zwiki changes the url to the absolute path, so changing the standard methods and pages didn't work. What I mean is the path wiki/wikidotorg/John will correctly display John's FrontPage with the standard header and footer from wikidotorg, but clicking on any linke will change the URL back to wiki/John.

MOD #1.
I wanted the URL to remain the same. This would solve problems 1 & 3 above. I created a dummy page and displayed all the URL variables I could find, including wiki_url, page_url, wiki_url1-7, and page_url1-7. I discovered the standard REQUEST variable URL1 was always the base I wanted. Living dangerously, I found the method wiki_url was the one used to generate the URLs from wiki links, so I modified wiki_url in Commented out the "return self.wiki_url7()" line and replaced it with

"return self.REQUEST['URL1']"
. (PS. can that last phrase be done using the STX single quote syntax or must one use <pre>?

Voila! Things seemed to be working! I could be at wiki/John or wiki/wikidotorg/John and click on all the links and they worked. Links within John would still be using the wikidotorg context. RecentChanges still show only the pages in John. HelpPage still shows up with the URL wiki/wikidotorg/John/HelpPage from wikidotorg through Zope Magic, and since John has no editing rights, he will not see the footer (which tells him it is a standard object).

Alas and alack (and ack!). It all isn't quite that easy. Once I got to testing the edit page or create new page options I found an area that didn't like my hack to wiki_url. The page comes up fine, it edits fine, then displays fine with the wrong URL. If I edit page wiki/John/FrontPage, save the changes, my URL is now wiki/John/FrontPage/FrontPage. Since I changed Zwiki to not re-calculate the absolute url, the user would be stuck.

MOD #2.
Maybe it is a a more basic level that the URL needs replaced. Finding something that looks like it might be related, I shot in the dark and made a change in _wikilink_replace (in and changed the two references to self.wiki_url() to another name that just returned URL1. That fixed ONLY the edit problem of duplicating the page name in the URL. By taking the URL1 out of wiki_url, it looses context again. It must be calling wiki_url twice. The sections of the footer that call wikilink() still work correctly. The references to dtml-wiki_page_url (same as page_url) reverted back to the absolute_url.

OK, something to do with editing is not getting the "correct" URL. I tried changing the try-except block to always use URL1 (in edit method) to no effect. I'm stuck without taking time to dig (or try random changes) further. Time which I don't have at the moment.

FlorianKonnertz, 2002/09/20 15:38 GMT (via web):
Hello Jerry, hi all, please help me with this feature:

from above: As I stated earlier, I found that you can link to wiki pages in a sub-folder by bracketing subfoldername/FrontPage. (...) I also changed the user options so that "show page hierarchy" cannot be set. (It is necessary to make the multi-level folders work - I don't know why).

I hope it is still possible in 0.10; what did i miss? - FloK

FlorianKonnertz, 2002/11/13 21:46 GMT (via web):
How can wiki pages in subfolder be addressed? Which brackets to take? []? It doesn't work for me.

FlorianKonnertz, 2002/11/13 21:53 GMT (via web):
Improved page text display --FloK

DeanGoodmanson, 2002/11/14 15:15 GMT (via web):
Not sure how he managed the sub-folder bracket stuff.

I put RemoteWikiLinks for all the SubWikis in the ParentWiki.

FlorianKonnertz, 2002/11/14 15:47 GMT (via web):
Ok - Thanks Dean for your statement - so I think i have to keep it that way. It's not too bad anyway. Originally i wanted it as in MoinMoin wiki with a slash FlorianKonnertz/Projects for example. But as the RemoteWikiURL and its real URl path can be different (because of the RemoteWikiURL mechanism :-) I can set the id of my personal SubWiki as floriankonnertz ie. and put that URL on my WikiHomePage FlorianKonnertz. All pages can be addressed from the parent wiki with FlorianKonnertz:MyProjects ie. - that's ok. - cu --FloK

Dean Goodmanson, 2002/11/14 16:09 GMT (via mail):

> All pages can
> be addressed from the
> parent wiki with FlorianKonnertz:MyProjects ie. -
> that's ok. - cu --FloK

Is FloK:MyProjects acceptable/simpler?

Ohh!! Good idea! As an alias, yes. -

Another change: Just to type Username:Projects instead of Username:MyProjects might make more sense for others, what do you think? - Everybody can have his Uname:Interests and Uname:Ideas etc. pages. It could become a naming convention. --FloK,11-15

SimonMichael, 2002/11/15 00:20 GMT (via web):
Allowing relative urls in brackets was handy, but I dropped it around 0.10 to avoid confusion with freeform names. - I see. --FloK,11-15

SimonMichael, 2002/11/15 00:22 GMT (via web):
Nice write-up, Jerry. I may have more to say on this later. I wonder what's a better name for this page, it makes me think of WikiWikiWeb:WikiMaster.