<HTML>
<HEAD>
<TITLE>Re: [squeak-dev] [Q] help with requesting a html page </TITLE>
</HEAD>
<BODY>
<FONT SIZE="5"><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:12pt'><BR>
<BR>
<BR>
On 11/20/11 14:18 PM, "Chris Cunnington" <smalltalktelevision@gmail.com> wrote:<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="5"><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:12pt'>HVNaughtieUsers? OK, so you're using HttpView2. <BR>
<BR>
Your code example is too low level in an HVHttpView2 app. That stuff is abstracted away. You won't see <BR>
<BR>
request propertyAt: <BR>
<BR>
in here<BR>
<BR>
<FONT COLOR="#0000FF"><U><a href="http://map.squeak.org/srcautologin">http://map.squeak.org/srcautologin</a><BR>
<a href="http://map.squeak.org/srcnewaccount">http://map.squeak.org/srcnewaccount</a><BR>
</U></FONT><BR>
HttpView2 talks to Komanche for you. I'd look at the HVSimpleForms>>#megaform2 example and look at stuff like this:<BR>
<BR>
"Add a password."<BR>
pass _ b br; br; html: 'Password: '; inputPassword.<BR>
pass2 _ b br; html: 'Verify: '; inputPassword.<BR>
<BR>
(pass value isEmpty and: [pass2 value isEmpty]) ifFalse: [<BR>
pass value = pass2 value<BR>
ifTrue: [message value: '<b>Verified correctly!</b>']<BR>
ifFalse: [message value: '<b>Verified incorrectly!</b>']].<BR>
"Add two breaks and a submit button, end the form."<BR>
button _ b br; br; submit: 'Hit me'.<BR>
b endForm.<BR>
<BR>
<BR>
And in SMSqueakMapView>>#login:url: (in SMServer at Göran's repo) which has:<BR>
<BR>
b ifPost: [<BR>
(requestedUrl value = (self prefix, '/login')) ifTrue:[requestedUrl value: self prefix].<BR>
account _ model accountForUsername: username.<BR>
account ifNil: [account _ model accountForEmail: username].<BR>
account ifNil: [msg value: 'No account with that username or email!']<BR>
ifNotNil: [<BR>
account password isNil<BR>
ifTrue: [msg value: 'First login should be done using the link provided in the confirmation email!']<BR>
ifFalse: [<BR>
(account correctPassword: password)<BR>
ifTrue:[<BR>
KomSession current attributes at: #account put: account.<BR>
^self redirectTo: requestedUrl value ]<BR>
ifFalse:[<BR>
KomSession current attributes at: #failedAccount put: account.<BR>
msg value: 'Wrong password - ', (b getLinkLocal: '/mailnewpassword' text: 'would you like a new one?') ]]]<BR>
].<BR>
<BR>
Of course, you could try using a body of code that wasn't developed in Squeak 3.8. <BR>
<BR>
<FONT COLOR="#0000FF"><U><a href="http://www.squeakmap.org">http://www.squeakmap.org</a><BR>
</U></FONT><BR>
Chris <BR>
<BR>
Thank Chris.<BR>
In fact , is modified Kom + modified HV2.<BR>
Off course , SqueakMap and other code by Goran is always an inspirational example<BR>
<BR>
My poor man solution to my own question is (for now)<BR>
<BR>
login<BR>
| fields aPassword userName logged |<BR>
<BR>
fields := self request fields.<BR>
fields ifNotNil:[ userName := (fields at: 'username') first.<BR>
aPassword := (fields at: 'password') first.<BR>
logged := HVNaughtieUsers new verifyPassword: aPassword forUser: userName ].<BR>
self halt.<BR>
<BR>
I trying reverse engineering Mantis for a Squeak + Kom + HV2 + external Javascript.<BR>
Re using for how his .php<BR>
I called it Sapis see<BR>
<a href="http://imageshack.us/photo/my-images/525/screenshot20111120at503.png/">http://imageshack.us/photo/my-images/525/screenshot20111120at503.png/</a><BR>
<BR>
And for now I have the following directory tree<BR>
<a href="http://img840.imageshack.us/img840/2622/screenshot20111120at526.png">http://img840.imageshack.us/img840/2622/screenshot20111120at526.png</a><BR>
<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="5"><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:12pt'>It’s a long way to have Sapis in Squeak mimic the real Mantis.<BR>
This is my first steps<BR>
Edgar<BR>
<BR>
PS. Mantis eats bugs, Sapo eats Mantis and other bugs.<BR>
Bufonidae is the family <a href="http://en.wikipedia.org/wiki/Family_%28biology%29"><http://en.wikipedia.org/wiki/Family_%28biology%29></a> of the true toads, members of the order Anura <a href="http://en.wikipedia.org/wiki/Anura"><http://en.wikipedia.org/wiki/Anura></a> (frogs and toads). They are the only family of anurans all members of which are known as "toads <a href="http://en.wikipedia.org/wiki/Toads"><http://en.wikipedia.org/wiki/Toads></a> ." The bufonids now comprise more than 35 genera, Bufo <a href="http://en.wikipedia.org/wiki/Bufo"><http://en.wikipedia.org/wiki/Bufo></a> being the most widespread and well known.</SPAN></FONT></FONT>
</BODY>
</HTML>