Steve et. al.,
I was thinking about adding cookies for user names, when I realized how I=
=20
implemented this feature in gowiki.
Basically, once we introduce preferences, it has to be possible to have o=
ne=20
<FORM> where everything is set with one SUBMIT button. Howver, with the=20
traditional command for input boxes via a %%...%% this is impossible.
So, what I did for GoWiki is this: I added a flag called "SYSTEM_PAGE".
What it does it quite a hack (but not necessarily a bad one):
a) System pages allow HTML per default (however, not in the way like the
current "|" tag is implemented - instead it tokenizes everything in
between "<..>" -- maybe this should be adopted for regular HTML as wel=
l?)
b) after processing the wikipage the content itself is put through
GeneratePage() just like a template. Thus it's possible to use
placeholders like ###SCRIPTURL### *inside* the wiki page.
I'm not sure you'd like to have such a behaviour for phpwiki.
It could be useful though. So if you think this a reasonable hack, then
I'll commit the necessary changes. It also would rid us of these %%ADMIN-=
=2E..
placeholders.
/Arno
p.s. the cookie page could look like this in wiki-markup:
Preferences work by sending a cookie to your browser.
Every item is completely optional.
<FORM METHOD=3DPOST ACTION=3D"###SCRIPTURL###">
------------
<INPUT TYPE=3Dsubmit name=3Dpreferences value=3D"Set preferences">
------------
__UserName__: <INPUT NAME=3D"pref_username" SIZE=3D20>
The UserName will show up in RecentChanges and at the bottom of
each page as the user who last edited the page. If the corresponding page=
=20
exists within SL, then your name will also be linked.
-----------
</FORM>
|