Guestbook demonstration
Features
- Let visitors add entries in the guestbook in WYSIWYG mode.
- An entry is divided in 3 parts: name&date, message, horizontal separator.
- The name is entered in a text input field, the date is automatically created,
the message is edited in WYSIWYG.
- The name is automatically limited to 20 characters.
- External CSS styles are applied to the guestbook.
- A link is provided to switch between visitor and moderator view.
- The moderator can delete saved messages.
The demonstration
 |
|
|
|
Name:
23 Jul 2008
|
Type your message here…
|
|
Welcome to the guestbook!
brac attack
27 Jun 2008
|
![]()
Type your message here…
|
|
nano
17 May 2008
|
Test!!!!
|
|
bla bla
23 Apr 2008
|
this is my message, and it looks really nice, let's add a picture fdfd
|
|
Muiu
22 Apr 2008
|
Contextual editing... this would be nice to have with DOM handling only
|
|
GGi
19 Apr 2008
|
This is a test Yeap
|
|
Radek Svitak
12 Mar 2008
|
![]() This is really very nice :-))))
|
|
Hardik Akbari
29 Feb 2008
|
Awesome.
|
|
Rix
11 Feb 2008
|
It is interesting...
|
|
Serkan
18 Jan 2008
|
ışçöüğÇÖİŞÜĞ
|
|
9 Jan 2008
|
Type your message here…Este es un maldito mensaje.
|
|
28 Dec 2007
|
T ype your messag e here…dfsdsdfsdf
|
|
hello wow
29 Nov 2007
|
Type your message here…
|
|
Marc
22 Nov 2007
|
Written with Firefox 3.0b1, it kind of works... (we'll visit Bugzilla)
|
|
OHO
10 Nov 2007
|
OK. This is my message
|
|
Marc
15 Oct 2007
|
Written en Opera 9.50 alpha on Linux.
|
|
Name
7 Oct 2007
|
Write it here. This isn't in a text box. Different.
|
|
Woww
5 Oct 2007
|
Hello World!
|
|
nuddu
5 Oct 2007
|
Interessante !
|
|
Cool
5 Oct 2007
|
Musthave
|
|
eduardo
7 Sep 2007
|
Type your message here…esto es divertido
|
|
eduardo
7 Sep 2007
|
Type your message here…erererer
|
|
Marc
30 Aug 2007
|
Written with Opera on Linux. Marc
|
|
Marc Mongenet
30 Aug 2007
|
Written with Safari on Windows…
|
|
Marc Mongenet
14 Jun 2007
|
This is the 1st message written in this demonstration guestbook. Do not hesitate to leave your messages!
Written with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
|
|
View as
moderator.
|
|
|
|
 |
W2ML sources
<!-- ©2007 Marc Mongenet. You are free to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of this W2ML example. -->
<!-- User 'moderator', without password for demonstration.
This element is only processed by the w2:login attribute.. -->
<w2:user ac="x" user="none"><w2:name>moderator</w2:name></w2:user>
<!-- Only the moderator may delete messages. -->
<w2:g login="" ac="d" user="moderator">
<!-- The message template is hidden in an undisplayed table. -->
<table style="display:none">
<!-- The message template. -->
<tbody w2:template="msg" w2:del="delmsg">
<tr valign="top">
<th>
<!-- Write-once visitor name, display only 20 first characters. -->
<w2:once>Name: </w2:once><span w2:tfirst="20" w2:once="w2:ed='text'"/><br/>
<!-- Record message creation time. -->
<w2:res><w2:day/> <w2:month fmt="abbr"/> <w2:year/></w2:res>
</th>
<td>
<!-- Write-once visitor message. -->
<div w2:once="w2:ed='wysiwyg'">
Type your message here…
</div>
<!-- Delete button for the moderator. -->
<p w2:ac="x" w2:user="moderator">
<button w2:ed="del" w2:to="delmsg">Delete</button>
</p>
</td>
</tr>
<tr><td colspan="2"><hr/></td></tr>
</tbody>
</table>
<h3>Welcome to the guestbook!</h3>
<!-- Button to create a message. -->
<p><button w2:ed="new" w2:to="book">Write a message</button></p>
<!-- Message templates are instantiated as first child of this table. -->
<table w2:new="book" w2:from="msg" w2:to="firstChild" class="guestbook">
</table>
<!-- Link to switch between visitor and moderator login. -->
<p>View as
<a w2:ac="-x" w2:user="moderator" href="?w2mlusr=moderator">moderator</a
><a w2:ac="x" w2:user="moderator" href="?w2mllog=out">visitor</a>.
</p>
</w2:g>