Revisions for Preferences
changed:
-
<p>Start a user profile to use if you plan on participating on this wiki. This information will be stored as a cookie file on your computer. Create a WikiSignature for your name so that whenever you add comments to a page, there will be a link back to your personal page :-)</p>
<dtml-let cookielist="(
'zwiki_username',
'email',
'zwiki_timezone',
'zwiki_bookmarks',
'zwiki_showhierarchy',
'zwiki_theme',
'zwiki_displaymode'
)
">
<dtml-if setcookies>
<dtml-let e="(ZopeTime() + 365).rfc822()">
<dtml-in cookielist prefix=x>
<dtml-if "_.has_key(x_sequence_item)">
<dtml-call "RESPONSE.setCookie(x_sequence_item, REQUEST.get(x_sequence_item),
path='/', expires=e)">
<dtml-comment>use path=wiki_url() if you want per-wiki cookies</dtml-comment>
</dtml-if>
</dtml-in>
</dtml-let>
<dtml-if redirectURL>
<dtml-call "RESPONSE.redirect(redirectURL)">
<dtml-else>
<p style="color: red; font-weight: bold">Cookies configured</p>
</dtml-if>
<dtml-elif clearcookies>
<dtml-in cookielist prefix=x>
<dtml-call "RESPONSE.expireCookie(x_sequence_item,path='/')">
</dtml-in>
<p style="color: red; font-weight: bold">Cookies removed</p>
<dtml-comment>
Reload preferences since old cookie values are still in this REQUEST
</dtml-comment>
<dtml-call "RESPONSE.redirect(URL)">
</dtml-if>
</dtml-let>
<form action="&dtml-wiki_page_url;" METHOD="POST" ENCTYPE="multipart/form-data">
<h2>Your Name:</h2>
<input type="text" name="zwiki_username" size="20"
maxlength="20" tabindex=3 value="<dtml-var zwiki_username missing>"><br /><br />
<h2>Email Address:</h2>
<input type="text" name="email" size="20" maxlength="40" tabindex="4"
value="<dtml-var email missing>"><br /><br />
<h2>Time Zone:</h2>
<dtml-let
now=ZopeTime
timezones="(
'GMT-1130',
'GMT-1100',
'GMT-1030',
'GMT-1000',
'GMT-0930',
'GMT-0900',
'GMT-0830',
'GMT-0800',
'GMT-0730',
'GMT-0700',
'GMT-0630',
'GMT-0600',
'GMT-0530',
'GMT-0500',
'GMT-0430',
'GMT-0400',
'GMT-0330',
'GMT-0300',
'GMT-0230',
'GMT-0200',
'GMT-0130',
'GMT-0100',
'GMT',
'GMT+0100',
'GMT+0130',
'GMT+0200',
'GMT+0230',
'GMT+0300',
'GMT+0330',
'GMT+0400',
'GMT+0430',
'GMT+0500',
'GMT+0530',
'GMT+0600',
'GMT+0630',
'GMT+0700',
'GMT+0730',
'GMT+0800',
'GMT+0830',
'GMT+0900',
'GMT+0930',
'GMT+1000',
'GMT+1030',
'GMT+1100',
'GMT+1130',
)"
userzone="((REQUEST.get('zwiki_timezone',None) in timezones) and zwiki_timezone) or 'GMT'"
>
<select name="zwiki_timezone" tabindex=5>
<dtml-in timezones prefix=x>
<option value="&dtml-x_sequence_item;"
<dtml-if "userzone == x_sequence_item">selected</dtml-if>>
<dtml-var "now.toZone(x_sequence_item).ISO()"> (&dtml-x_sequence_item;)
</option>
</dtml-in>
</select>
</dtml-let>
<br /><br />
<h2>Available Themes</h2>
<dtml-let
usertheme="REQUEST.get('zwiki_theme')"
themeurl="absolute_url">
<select name="zwiki_theme">
<option value="themes/default.css">Choose a theme</option>
<dtml-in expr="themes.objectValues('File')" sort=title>
<option value="&dtml-absolute_url;"
<dtml-if expr="usertheme == absolute_url()">selected</dtml-if>>
<dtml-var title>
</option>
</dtml-in>
</select>
</dtml-let>
<br /><br />
<h2>Page Hierarchy</h2>
<select name="zwiki_showhierarchy">
<option value="">No</option>
<option value="1"
<dtml-if zwiki_showhierarchy>selected</dtml-if>
>Yes</option>
</select>
<br /><br /><br /><br />
<input type="submit" name="setcookies" value="Save Options">
<input type="submit" name="clearcookies" value="Cancel">
<input type="hidden" name="zwiki_displaymode" value="<dtml-var zwiki_displaymode missing=simple>">
</form>