On Aug 13, 2010, at 2:03 PM, laurent laffont wrote:

> On Fri, Aug 13, 2010 at 12:55 PM, Stéphane Ducasse 
> <[email protected]> wrote:
> send them the code for pharo :)
> 
> 
> Kata for better code ? (sorry German)
> 
> |md5 url|
> md5 := MD5 new hashStream: (ReadStream on: '[email protected]').
> url :=  String streamContents: [:aStream|
>                                                               aStream 
> nextPutAll: 'http://www.gravatar.com/avatar/'.
>                                                               md5 do: [:aByte|
>                                                                               
>   aStream nextPutAll: aByte hex asLowercase]].
> (ImageMorph fromStream: 
>       (url asUrl retrieveContents contentStream)) openInWorld.
> 


I would not hard code ReadStream

> md5 := MD5 new hashStream:  '[email protected]' readStream.


        
> 
> Laurent
> 
> 
>  
> 
> Stef
> 
> On Aug 13, 2010, at 8:18 AM, laurent laffont wrote:
> 
> > On Fri, Aug 13, 2010 at 8:11 AM, Serge Stinckwich 
> > <[email protected]> wrote:
> > 2010/8/13 laurent laffont <[email protected]>:
> > > How can I embed Gravatar profiles
> > > into http://pharo-project.org/about/contributors ?
> >
> > This is quite easy. If you just want to add the images, you have to
> > calculate the md5 hash of the email adress and add a parameter in the
> > URL for the size of the picture.
> > http://fr.gravatar.com/site/implement/images/
> > If you want to add also the profile, look here:
> > http://fr.gravatar.com/site/implement/profiles/
> >
> >
> > Thank you. I will have a look.
> >
> >
> > Hey !!!! No Smalltalk code sample http://fr.gravatar.com/site/implement/
> >
> >
> > Laurent
> >
> >
> >
> > --
> > Serge Stinckwich
> > UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
> > Every DSL ends up being Smalltalk
> > http://doesnotunderstand.org/
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> 
> 
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> 
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to